Skip to content

Commit

Permalink
fix: Streamline linting logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed May 20, 2024
1 parent 4805fc7 commit c2def71
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,16 @@ jobs:
lint-${{ runner.os }}-cargo-${{ matrix.target }}-
${{ runner.os }}-cargo-${{ matrix.target }}-
- name: Cargo sort
run: cargo install cargo-sort

# ----- Actual linting logic ------
# These lines should mirror the `just lint` command.
- name: cargo fmt
run : cargo fmt --all -- --check
run: cargo fmt --all -- --check

- name: cargo sort
run: sort --workspace --check

- name: cargo clippy
run: cargo clippy --tests --workspace -- -D warnings
4 changes: 2 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ nextest:

lint:
just ensure_installed sort
cargo fmt --check
cargo fmt --all -- --check
cargo sort --workspace --check
cargo clippy --all --tests
cargo clippy --tests --workspace -- -D warnings

format:
just ensure_installed sort
Expand Down

0 comments on commit c2def71

Please sign in to comment.