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.
1 parent 981a0d7 commit 0b9f443Copy full SHA for 0b9f443
.github/workflows/format_check.yml
@@ -0,0 +1,30 @@
1
+name: format-check
2
+on:
3
+ push:
4
+ branches:
5
+ - master
6
+ - release-*
7
+ pull_request:
8
+ types: [opened, synchronize, reopened]
9
+jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: julia-actions/setup-julia@latest
14
+ with:
15
+ version: '1'
16
+ - uses: actions/checkout@v4
17
+ - name: Format check
18
+ shell: julia --color=yes {0}
19
+ run: |
20
+ using Pkg
21
+ Pkg.add(PackageSpec(name="JuliaFormatter", version="1"))
22
+ using JuliaFormatter
23
+ format(".", verbose=true)
24
+ out = String(read(Cmd(`git diff`)))
25
+ if isempty(out)
26
+ exit(0)
27
+ end
28
+ @error "Some files have not been formatted !!!"
29
+ write(stdout, out)
30
+ exit(1)
0 commit comments