File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ name : lint
2+
3+ on : [push]
4+
5+ jobs :
6+ lint :
7+ runs-on : ubuntu-latest
8+
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@v3
12+
13+ - name : clang-format
14+ id : clang-format
15+ uses : DoozyX/clang-format-lint-action@c3b2c943e924028b93a707a5b1b017976ab8d50c # v0.15
16+ with :
17+ exclude : ' ./third_party'
18+ extensions : ' c,h,cpp,hpp'
19+ clangFormatVersion : 15
20+ style : file
21+
22+ - name : clang-format instructions
23+ if : ${{ failure() && steps.clang-format.outcome == 'failure' }}
24+ run : |
25+ # Instructions for fixing the formatting errors
26+ echo -e "\n\033[0;31mTo fix the formatting, run:\nclang-format -style=file -i \$(git ls-files \"*.c\" \"*.h\" \"*.cpp\" \"*.hpp\")\033[0m\n"
27+ exit 1
Original file line number Diff line number Diff line change 1+ # Disable clang-format in this folder
2+ DisableFormat : true
3+ SortIncludes : Never
You can’t perform that action at this time.
0 commit comments