Skip to content

Commit

Permalink
Merge pull request #21 from zvonkok/clippy-fmt
Browse files Browse the repository at this point in the history
Add fmt clippy GHA
  • Loading branch information
Apokleos authored Jun 6, 2024
2 parents cf3bdd2 + b0f1e54 commit 6fc47af
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,27 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose

- name: Run cargo fmt
run: |
cargo fmt --all -- --check
- name: Check for unformatted code
run: |
if ! git diff --exit-code; then
echo "Code is not formatted. Please run 'cargo fmt' to format the code."
exit 1
fi
- name: Install clippy
run: rustup component add clippy

- name: Run cargo clippy
run: |
cargo clippy --all-targets --all-features -- -D warnings

0 comments on commit 6fc47af

Please sign in to comment.