forked from ClubNCaldes/SVLocoIO
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 984 Bytes
/
Copy pathcode-formatting-check.yml
File metadata and controls
39 lines (35 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Code Formatting Check
on:
pull_request:
paths:
- ".github/workflows/code-formatting-check.yml"
- "SVLocoIO/**"
push:
paths:
- ".github/workflows/code-formatting-check.yml"
- "SVLocoIO/**"
jobs:
arduino-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: arduino/arduino-lint-action@v2
with:
path: SVLocoIO/
project-type: sketch
library-manager: false
clang-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: RafikFarhad/clang-format-github-action@v3
with:
sources: "SVLocoIO/*.ino,SVLocoIO/*.cpp"
- name: Formatting feedback
run: |
if ! git diff --color --exit-code; then
echo "Please do an Auto Format on the sketches:"
echo "Arduino IDE: Tools > Auto Format"
echo "Arduino Web Editor: Ctrl + B"
exit 1
fi