From 822ad52752b4b0c6713a8dd2a262ee6369b03ebc Mon Sep 17 00:00:00 2001 From: Burkhard Mittelbach Date: Sun, 4 Dec 2022 15:14:22 +0100 Subject: [PATCH 1/2] Add CI hook to check code formating using "cargo fmt --check" --- .github/workflows/ci.yml | 8 ++++++++ README.md | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dadca12..ff9de26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,3 +28,11 @@ jobs: # - uses: actions/checkout@v2 # - name: cargo clippy # run: cargo clippy -- -D warnings + # uncoment to enable format checking + # fmt: + # runs-on: ubuntu-latest + # name: Format + # steps: + # - uses: actions/checkout@v3 + # - name: cargo fmt + # run: cargo fmt --check diff --git a/README.md b/README.md index a4a7ce4..348fd3d 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,10 @@ cargo clippy Once installed, you can use the [download command](#download-input-for-a-day). +### Enable Format code in CI + +Uncomment the `format` job in the `ci.yml` workflow to enable fmt checks in CI. + ### Enable clippy lints in CI Uncomment the `clippy` job in the `ci.yml` workflow to enable clippy checks in CI. From 60dd8d5f67666f034717bd4a7458a82955777c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sp=C3=B6ttel?= <1682504+fspoettel@users.noreply.github.com> Date: Sun, 4 Dec 2022 18:28:14 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 348fd3d..cf1b392 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ cargo clippy Once installed, you can use the [download command](#download-input-for-a-day). -### Enable Format code in CI +### Check code formatting in CI Uncomment the `format` job in the `ci.yml` workflow to enable fmt checks in CI.