Skip to content

Commit 2712bbc

Browse files
committed
format
1 parent fcdcb33 commit 2712bbc

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

.JuliaFormatter.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
style = "sciml"
2+
pipe_to_function_call=false
23
always_for_in = false
34
separate_kwargs_with_semicolon = true
4-
margin = 132
5+
margin = 132
6+
yas_style_nesting=true
7+
ignore = "examples/PlutoGridFactory.jl"

.github/workflows/format_check.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
name: format-check
3+
4+
on:
5+
push:
6+
branches:
7+
- 'master'
8+
- 'release-'
9+
tags: '*'
10+
pull_request:
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
julia-version: [1.3.0]
18+
julia-arch: [x86]
19+
os: [ubuntu-latest]
20+
steps:
21+
- uses: julia-actions/setup-julia@latest
22+
with:
23+
version: ${{ matrix.julia-version }}
24+
25+
- uses: actions/checkout@v1
26+
- name: Install JuliaFormatter and format
27+
# This will use the latest version by default but you can set the version like so:
28+
#
29+
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))'
30+
run: |
31+
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
32+
julia -e 'using JuliaFormatter; format(".", verbose=true)'
33+
- name: Format check
34+
run: |
35+
julia -e '
36+
out = Cmd(`git diff --name-only`) |> read |> String
37+
if out == ""
38+
exit(0)
39+
else
40+
@error "Some files have not been formatted !!!"
41+
write(stdout, out)
42+
exit(1)
43+
end'
44+
45+

0 commit comments

Comments
 (0)