We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ca1fa5 commit 45dba99Copy full SHA for 45dba99
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
+ permissions:
12
+ contents: write
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
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
+ with:
26
+ commit_message: "style: format code with clang-format"
27
+ file_pattern: src/**/*.h src/**/*.cpp
0 commit comments