We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
check_code_format.yml
1 parent 5d3d7d4 commit 08c604bCopy full SHA for 08c604b
.github/workflows/check_code_format.yml
@@ -0,0 +1,36 @@
1
+---
2
+name: check_code_format
3
+
4
+'on':
5
+ workflow_dispatch:
6
+ push:
7
+ branches:
8
+ - main
9
+ pull_request:
10
11
+jobs:
12
+ check_format_code:
13
+ name: check format code
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
18
+ - name: Install fprettify
19
+ run: pip install fprettify
20
21
+ - name: Display fprettify version
22
+ run: fprettify --version
23
24
+ - name: Format code
25
+ run: |
26
+ git clean -f -x -d
27
+ fprettify --indent 4 --recursive .
28
29
+ - name: Fail if needs reformatting
30
31
+ if [[ $(git status --porcelain) ]]; then
32
+ echo "please reformat/fprettify these files:"
33
+ git status --porcelain=v1
34
+ exit 1
35
+ fi
36
+...
0 commit comments