File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
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
+ # If you update the version, also update the style guide docs.
22
+ Pkg.add(PackageSpec(name="JuliaFormatter", version="1"))
23
+ using JuliaFormatter
24
+ format("src", verbose=true)
25
+ format("test", verbose=true)
26
+ format("docs", verbose=true)
27
+ out = String(read(Cmd(`git diff`)))
28
+ if isempty(out)
29
+ exit(0)
30
+ end
31
+ @error "Some files have not been formatted !!!"
32
+ write(stdout, out)
33
+ exit(1)
You can’t perform that action at this time.
0 commit comments