Skip to content

Commit 3e88cc8

Browse files
authoredAug 19, 2024··
Fix formatter to old version (#56)
* Fix formatter to old version * Update FormatCheck.yml * run old version of formatter
1 parent 56e07b2 commit 3e88cc8

File tree

3 files changed

+10
-39
lines changed

3 files changed

+10
-39
lines changed
 

‎.github/workflows/FormatCheck.yml

+5-34
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,12 @@
1-
name: format-check
1+
name: Format suggestions
22

33
on:
4-
push:
5-
branches:
6-
- 'main'
7-
tags: '*'
84
pull_request:
95

106
jobs:
11-
format_check:
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
matrix:
15-
julia-version: [1]
16-
julia-arch: [x86]
17-
os: [ubuntu-latest]
7+
code-style:
8+
runs-on: ubuntu-latest
189
steps:
19-
- uses: julia-actions/setup-julia@latest
10+
- uses: julia-actions/julia-format@v3
2011
with:
21-
version: ${{ matrix.julia-version }}
22-
23-
- uses: actions/checkout@v4
24-
- name: Install JuliaFormatter and format
25-
# This will use the latest version by default but you can set the version like so:
26-
#
27-
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))'
28-
run: |
29-
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
30-
julia -e 'using JuliaFormatter; format(".", verbose=true)'
31-
- name: Format check
32-
run: |
33-
julia -e '
34-
out = Cmd(`git diff --name-only`) |> read |> String
35-
if out == ""
36-
exit(0)
37-
else
38-
@error "Some files have not been formatted !!!"
39-
write(stdout, out)
40-
exit(1)
41-
end'
12+
version: '1.0.45' # default: '1'

‎docs/make.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ makedocs(
3737
"Reference" => "reference.md",
3838
"VTKBase.jl" => vtkbase_docs,
3939
"Contributing" => "contributing.md",
40-
"License" => "license.md"
40+
"License" => "license.md",
4141
])
4242

4343
deploydocs(repo = "github.com/JuliaVTK/ReadVTK.jl",

‎test/pvtk_files.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extents = [
2323
(1:10, 1:5, 1:4), # process 1
2424
(10:15, 1:5, 1:4), # process 2
2525
(1:10, 5:12, 1:4), # process 3
26-
(10:15, 5:12, 1:4) # process 4
26+
(10:15, 5:12, 1:4), # process 4
2727
]
2828

2929
saved_files = Vector{Vector{String}}(undef, 4) # files saved by each "process"
@@ -102,14 +102,14 @@ all_data = [
102102
(points = rand(3, 5), # 5 points on process 1
103103
cells = [ # 2 cells on process 1
104104
MeshCell(VTKCellTypes.VTK_TRIANGLE, [1, 4, 2]),
105-
MeshCell(VTKCellTypes.VTK_QUAD, [2, 4, 3, 5])
105+
MeshCell(VTKCellTypes.VTK_QUAD, [2, 4, 3, 5]),
106106
]),
107107

108108
# Process 2
109109
(points = rand(3, 4), # 4 points on process 2
110110
cells = [ # 1 cell on process 2
111-
MeshCell(VTKCellTypes.VTK_QUAD, [1, 2, 3, 4])
112-
])
111+
MeshCell(VTKCellTypes.VTK_QUAD, [1, 2, 3, 4]),
112+
]),
113113
]
114114

115115
saved_files = Vector{Vector{String}}(undef, 2) # files saved by each "process"

0 commit comments

Comments
 (0)
Please sign in to comment.