From 4905f6a35a71212ded70cfd4d3f4a75b5d036c26 Mon Sep 17 00:00:00 2001 From: Graeme A Stewart Date: Fri, 7 Jun 2024 18:16:23 +0200 Subject: [PATCH] Add JuliaFormatter action and configuration --- .JuliaFormatter.toml | 2 ++ .github/workflows/Format.yml | 13 +++++++++++++ 2 files changed, 15 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 0000000..8424630 --- /dev/null +++ b/.JuliaFormatter.toml @@ -0,0 +1,2 @@ +style = "sciml" +yas_style_nesting = true diff --git a/.github/workflows/Format.yml b/.github/workflows/Format.yml new file mode 100644 index 0000000..87b2504 --- /dev/null +++ b/.github/workflows/Format.yml @@ -0,0 +1,13 @@ +name: Format suggestions +on: + pull_request: + # this argument is not required if you don't use the `suggestion-label` input + types: [ opened, reopened, synchronize, labeled, unlabeled ] +jobs: + code-style: + runs-on: ubuntu-latest + steps: + - uses: julia-actions/julia-format@v3 + with: + version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1') + suggestion-label: 'format-suggest' # leave this unset or empty to show suggestions for all PRs