Skip to content

Commit 600df21

Browse files
Formatting suggestions (#260)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent e14fb83 commit 600df21

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,3 @@ jobs:
4747
with:
4848
github-token: ${{ secrets.GITHUB_TOKEN }}
4949
path-to-lcov: ./lcov.info
50-
51-
format-check:
52-
runs-on: ubuntu-latest
53-
steps:
54-
- uses: julia-actions/setup-julia@latest
55-
with:
56-
version: 1
57-
- uses: actions/checkout@v1
58-
- name: Install JuliaFormatter and format
59-
run: |
60-
julia --project=test/ -e 'using Pkg; Pkg.instantiate()'
61-
julia --project=test/ -e 'using JuliaFormatter; format(".", verbose=true)'
62-
- name: Format check
63-
run: |
64-
CHANGED="$(git diff --name-only)"
65-
if [ ! -z "$CHANGED" ]; then
66-
>&2 echo "Some files have not been formatted !!!"
67-
echo "$CHANGED"
68-
exit 1
69-
fi

.github/workflows/format.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Format suggestions
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
format:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: julia-actions/setup-julia@latest
12+
with:
13+
version: 1
14+
- run: |
15+
julia -e 'using Pkg; Pkg.add("JuliaFormatter")'
16+
julia -e 'using JuliaFormatter; format("."; verbose=true)'
17+
- uses: reviewdog/action-suggester@v1
18+
with:
19+
tool_name: JuliaFormatter
20+
fail_on_error: true

test/Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
55
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
66
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
77
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
8-
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
98
Kronecker = "2c470bb0-bcc8-11e8-3dad-c9649493f05e"
109
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1110
PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150"
@@ -22,7 +21,6 @@ Documenter = "0.25, 0.26"
2221
FiniteDifferences = "0.10.8, 0.11, 0.12"
2322
Flux = "0.10, 0.11"
2423
ForwardDiff = "0.10"
25-
JuliaFormatter = "0.12.2"
2624
Kronecker = "0.4"
2725
PDMats = "0.9, 0.10, 0.11"
2826
ReverseDiff = "1.2"

0 commit comments

Comments
 (0)