From 9c2d43dd39c049d22c1bd810b66c4f80892b2b39 Mon Sep 17 00:00:00 2001 From: tibvdm Date: Thu, 4 Apr 2024 01:02:15 +0200 Subject: [PATCH] add linting action --- .github/workflows/lint.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..11ca471 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +on: [ push, pull_request ] + +name: Lint + +jobs: + lint: + name: Clippy + rustfmt + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install minimal nightly toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + components: rustfmt, clippy + override: true + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - name: Run cargo clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings + + \ No newline at end of file