File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Code Formatting
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ format :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v2
15+
16+ - name : Install clang-format
17+ run : sudo apt-get install -y clang-format
18+
19+ - name : Run clang-format and check for formatting issues
20+ run : |
21+ find . -name "*.cpp" -o -name "*.hpp" | xargs clang-format -i
22+
23+ - name : Commit formatting changes
24+ run : |
25+ git config --global user.name "github-actions"
26+ git config --global user.email "github-actions@github.com"
27+ git add .
28+ git commit -m "Apply code formatting changes" || echo "No changes to commit"
29+ continue-on-error : true
Original file line number Diff line number Diff line change 1+ name : Static Code Analysis
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ static-analysis :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v2
15+
16+ - name : Install Cppcheck
17+ run : sudo apt-get install -y cppcheck
18+
19+ - name : Run Cppcheck
20+ run : |
21+ cppcheck --enable=all --inconclusive --quiet --suppress=missingIncludeSystem . 2> cppcheck-results.txt
22+ cat cppcheck-results.txt
23+ continue-on-error : true
You can’t perform that action at this time.
0 commit comments