Skip to content

Commit

Permalink
fix: run cargo clippy on push and on pixi lint task (prefix-dev#2131)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-arts authored Sep 24, 2024
1 parent f578229 commit 61b1023
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
19 changes: 2 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ exclude: (^.pixi/|.snap)
repos:
- repo: local
hooks:
- id: pixi-install
name: pixi-install
entry: pixi install -e lint
language: system
always_run: true
require_serial: true
pass_filenames: false
# pre-commit-hooks
- id: check-yaml
name: check-yaml
entry: pixi run -e lint check-yaml
Expand Down Expand Up @@ -58,21 +50,14 @@ repos:
- id: fmt
name: fmt
language: system
stages: [push, manual]
stages: [pre-commit, pre-push, manual]
types: [file, rust]
entry: cargo fmt
pass_filenames: false
- id: clippy
name: clippy
language: system
stages: [push, manual]
stages: [pre-push, manual]
types: [file, rust]
entry: cargo clippy --all-targets --workspace -- -D warnings -Dclippy::dbg_macro # Use -D warnings option to ensure the job fails when encountering warnings
pass_filenames: false
- id: test
name: test
language: system
stages: [push, manual]
types: [file, rust]
entry: cargo test
pass_filenames: false
4 changes: 2 additions & 2 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ taplo = ">=0.9.1,<0.10"
typos = ">=1.23.1,<2"

[feature.lint.tasks]
lint = { depends-on = ["pre-commit-run"] }
pre-commit-install = "pre-commit install"
lint = "pre-commit run --all-files --hook-stage=manual"
pre-commit-install = "pre-commit install --install-hooks -t=pre-commit -t=pre-push"
pre-commit-install-minimal = "pre-commit install -t=pre-commit"
pre-commit-run = "pre-commit run --all-files"
toml-format = { cmd = "taplo fmt", env = { RUST_LOG = "warn" } }
Expand Down

0 comments on commit 61b1023

Please sign in to comment.