From 4c04ea97360c044cfc7cf2e157f74029f548aaea Mon Sep 17 00:00:00 2001 From: Joshua Lampert Date: Tue, 30 Jul 2024 13:39:14 -0400 Subject: [PATCH 1/3] use julia-format action --- .github/workflows/Format-check.yml | 40 +++++------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/.github/workflows/Format-check.yml b/.github/workflows/Format-check.yml index cc9ac9f5..20f2b551 100644 --- a/.github/workflows/Format-check.yml +++ b/.github/workflows/Format-check.yml @@ -1,39 +1,11 @@ -name: format - +name: Format suggestions on: - push: - branches: - - 'main' - - 'release-' - tags: '*' - pull_request: + pull_request jobs: - check: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: ['1'] - julia-arch: [x64] - 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 - run: | - julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"))' - julia -e 'using JuliaFormatter; format(["src", "test", "examples", "docs"], 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' From 68e127163236803152b423c421a10f53cb429f05 Mon Sep 17 00:00:00 2001 From: Joshua Lampert Date: Tue, 30 Jul 2024 13:44:59 -0400 Subject: [PATCH 2/3] test reviewdog --- src/DispersiveShallowWater.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DispersiveShallowWater.jl b/src/DispersiveShallowWater.jl index c963d05c..669d2b5b 100644 --- a/src/DispersiveShallowWater.jl +++ b/src/DispersiveShallowWater.jl @@ -30,7 +30,7 @@ using TimerOutputs: TimerOutputs, print_timer, reset_timer! @reexport using TrixiBase: trixi_include using TrixiBase: TrixiBase, @trixi_timeit, timer -include("boundary_conditions.jl") + include("boundary_conditions.jl") include("mesh.jl") include("equations/equations.jl") include("solver.jl") From ac7fc2c071bae0e0e567169c3b53e5751966a497 Mon Sep 17 00:00:00 2001 From: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:45:42 -0400 Subject: [PATCH 3/3] Update src/DispersiveShallowWater.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/DispersiveShallowWater.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DispersiveShallowWater.jl b/src/DispersiveShallowWater.jl index 669d2b5b..c963d05c 100644 --- a/src/DispersiveShallowWater.jl +++ b/src/DispersiveShallowWater.jl @@ -30,7 +30,7 @@ using TimerOutputs: TimerOutputs, print_timer, reset_timer! @reexport using TrixiBase: trixi_include using TrixiBase: TrixiBase, @trixi_timeit, timer - include("boundary_conditions.jl") +include("boundary_conditions.jl") include("mesh.jl") include("equations/equations.jl") include("solver.jl")