Skip to content

Commit

Permalink
modify pre-commit checks & fix github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Khenziii committed Jan 20, 2024
1 parent 5c0d621 commit a2b873d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .cargo-husky/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/bin/sh

# reminder:
# In order to make your changes made to this file noticeable,
# you'll need to delete the /target directory and run:
# `cargo test` again

set -e

echo '+cargo clippy'
cargo clippy --all-targets --all-features -D warnings
echo '$ cargo clippy'
export RUSTFLAGS="-D warnings"
cargo clippy --all-targets --all-features

echo '+cargo fmt'
echo '$ cargo fmt'
cargo fmt --all -- --check

echo '+cargo test'
echo '$ cargo test'
cargo test
4 changes: 3 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ jobs:
clippy-check:
name: 🧐 Clippy Check
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Run Clippy
run: cargo clippy --all-targets --all-features -D warnings
run: cargo clippy --all-targets --all-features
fmt-check:
name: 👀 fmt Check
runs-on: ubuntu-latest
Expand Down

0 comments on commit a2b873d

Please sign in to comment.