We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ca1fa5 commit 3d28cf1Copy full SHA for 3d28cf1
1 file changed
.github/workflows/format.yml
@@ -0,0 +1,27 @@
1
+name: Format C++ Code
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - main
7
8
+jobs:
9
+ format:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout code
13
+ uses: actions/checkout@v4
14
+ with:
15
+ token: ${{ secrets.GITHUB_TOKEN }}
16
17
+ - name: Install clang-format
18
+ run: sudo apt-get update && sudo apt-get install -y clang-format
19
20
+ - name: Run clang-format
21
+ run: find src -name "*.h" -o -name "*.cpp" | xargs clang-format -i --style=file
22
23
+ - name: Commit changes
24
+ uses: stefanzweifel/git-auto-commit-action@v4
25
26
+ commit_message: "style: format code with clang-format"
27
+ file_pattern: src/**/*.h src/**/*.cpp
0 commit comments