Add CI hook to check code formatting using cargo fmt --check (#18)

This commit is contained in:
Burkhard Mittelbach 2022-12-04 18:28:49 +01:00 committed by GitHub
parent b8b688f9d8
commit 6379e82105
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -28,3 +28,11 @@ jobs:
# - uses: actions/checkout@v2 # - uses: actions/checkout@v2
# - name: cargo clippy # - name: cargo clippy
# run: cargo clippy -- -D warnings # 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

View file

@ -148,6 +148,10 @@ cargo clippy
Once installed, you can use the [download command](#download-input-for-a-day). Once installed, you can use the [download command](#download-input-for-a-day).
### Check code formatting in CI
Uncomment the `format` job in the `ci.yml` workflow to enable fmt checks in CI.
### Enable clippy lints in CI ### Enable clippy lints in CI
Uncomment the `clippy` job in the `ci.yml` workflow to enable clippy checks in CI. Uncomment the `clippy` job in the `ci.yml` workflow to enable clippy checks in CI.