From 5316136f1cb1711108c5f10c21b63b6eab1560a1 Mon Sep 17 00:00:00 2001 From: hyrodium Date: Sun, 1 Oct 2023 20:30:32 +0900 Subject: [PATCH] copy JuliaFormatter config from ChainRulesCore.jl --- .JuliaFormatter.toml | 1 + .github/workflows/format.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .JuliaFormatter.toml create mode 100644 .github/workflows/format.yml diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml new file mode 100644 index 000000000..323237bab --- /dev/null +++ b/.JuliaFormatter.toml @@ -0,0 +1 @@ +style = "blue" diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 000000000..f6f268c0e --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,27 @@ +name: Format suggestions + +on: + pull_request: + +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@latest + with: + version: 1 + - run: | + julia -e 'using Pkg; Pkg.add("JuliaFormatter")' + julia -e 'using JuliaFormatter; format("."; verbose=true)' + - uses: reviewdog/action-suggester@v1 + with: + tool_name: JuliaFormatter + fail_on_error: true + filter_mode: added