File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ always_for_in = true
Original file line number Diff line number Diff line change
1
+ name : Code style
2
+
3
+ on :
4
+ pull_request :
5
+
6
+ jobs :
7
+ JuliaFormatter :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@v2
11
+ - uses : julia-actions/setup-julia@v1
12
+ - name : Install dependencies
13
+ run : |
14
+ using Pkg
15
+ Pkg.add("JuliaFormatter")
16
+ shell : julia --color=yes {0}
17
+ - name : Format Julia files
18
+ run : |
19
+ using JuliaFormatter
20
+
21
+ base = ENV["GITHUB_BASE_REF"] # "main"
22
+ run(`git fetch origin $base`)
23
+
24
+ cmd = `git diff -z --name-only origin/$base`
25
+ files = split(read(cmd, String), '\0')
26
+ filter!(endswith(".jl"), files)
27
+
28
+ println("Formatting:")
29
+ foreach(println, files)
30
+
31
+ format(files)
32
+ shell : julia --color=yes --compile=min -O0 {0}
33
+ - name : suggester / JuliaFormatter
34
+ uses : reviewdog/action-suggester@v1
35
+ with :
36
+ tool_name : JuliaFormatter
You can’t perform that action at this time.
0 commit comments