From 3e88cc8525430316acc2b8697562639e7bb0d444 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Mon, 19 Aug 2024 12:08:35 +0200 Subject: [PATCH] Fix formatter to old version (#56) * Fix formatter to old version * Update FormatCheck.yml * run old version of formatter --- .github/workflows/FormatCheck.yml | 39 ++++--------------------------- docs/make.jl | 2 +- test/pvtk_files.jl | 8 +++---- 3 files changed, 10 insertions(+), 39 deletions(-) diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml index 22bfde4..952fb4a 100644 --- a/.github/workflows/FormatCheck.yml +++ b/.github/workflows/FormatCheck.yml @@ -1,41 +1,12 @@ -name: format-check +name: Format suggestions on: - push: - branches: - - 'main' - tags: '*' pull_request: jobs: - format_check: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: [1] - julia-arch: [x86] - os: [ubuntu-latest] + code-style: + runs-on: ubuntu-latest steps: - - uses: julia-actions/setup-julia@latest + - uses: julia-actions/julia-format@v3 with: - version: ${{ matrix.julia-version }} - - - uses: actions/checkout@v4 - - name: Install JuliaFormatter and format - # This will use the latest version by default but you can set the version like so: - # - # julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))' - run: | - julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' - julia -e 'using JuliaFormatter; format(".", verbose=true)' - - name: Format check - run: | - julia -e ' - out = Cmd(`git diff --name-only`) |> read |> String - if out == "" - exit(0) - else - @error "Some files have not been formatted !!!" - write(stdout, out) - exit(1) - end' + version: '1.0.45' # default: '1' diff --git a/docs/make.jl b/docs/make.jl index 5126f9f..1683526 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -37,7 +37,7 @@ makedocs( "Reference" => "reference.md", "VTKBase.jl" => vtkbase_docs, "Contributing" => "contributing.md", - "License" => "license.md" + "License" => "license.md", ]) deploydocs(repo = "github.com/JuliaVTK/ReadVTK.jl", diff --git a/test/pvtk_files.jl b/test/pvtk_files.jl index 8f9f359..a3b8937 100644 --- a/test/pvtk_files.jl +++ b/test/pvtk_files.jl @@ -23,7 +23,7 @@ extents = [ (1:10, 1:5, 1:4), # process 1 (10:15, 1:5, 1:4), # process 2 (1:10, 5:12, 1:4), # process 3 - (10:15, 5:12, 1:4) # process 4 + (10:15, 5:12, 1:4), # process 4 ] saved_files = Vector{Vector{String}}(undef, 4) # files saved by each "process" @@ -102,14 +102,14 @@ all_data = [ (points = rand(3, 5), # 5 points on process 1 cells = [ # 2 cells on process 1 MeshCell(VTKCellTypes.VTK_TRIANGLE, [1, 4, 2]), - MeshCell(VTKCellTypes.VTK_QUAD, [2, 4, 3, 5]) + MeshCell(VTKCellTypes.VTK_QUAD, [2, 4, 3, 5]), ]), # Process 2 (points = rand(3, 4), # 4 points on process 2 cells = [ # 1 cell on process 2 - MeshCell(VTKCellTypes.VTK_QUAD, [1, 2, 3, 4]) - ]) + MeshCell(VTKCellTypes.VTK_QUAD, [1, 2, 3, 4]), + ]), ] saved_files = Vector{Vector{String}}(undef, 2) # files saved by each "process"