Skip to content

Commit d93fa76

Browse files
authored
chore(repo): add clippy to enforce warnings before they're pushed (#181)
## Summary Adds a `clippy` pre-commit hook for Rust changes so commits fail if clippy emits any warnings. ## Related Issues N/A ## Changes - Added a local `clippy` hook to `.pre-commit-config.yaml` that runs `rustup run nightly cargo clippy --workspace --all-targets -- -D warnings`. ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] Feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation (updates to docs, specs, tutorials, or comments) - [ ] Refactor (code change that neither fixes a bug nor adds a feature) - [ ] Performance (change that improves performance) - [ ] Test (adding or updating tests) - [x] Build/CI (changes to build process or CI configuration) ## Affected Crates - [ ] `lambda-rs` - [ ] `lambda-rs-platform` - [ ] `lambda-rs-args` - [ ] `lambda-rs-logging` - [x] Other: repo dev tooling (pre-commit) ## Checklist - [ ] Code follows the repository style guidelines (`cargo +nightly fmt --all`) - [ ] Code passes clippy (`cargo clippy --workspace --all-targets -- -D warnings`) - [ ] Tests pass (`cargo test --workspace`) - [ ] New code includes appropriate documentation - [ ] Public API changes are documented - [ ] Breaking changes are noted in this PR description ## Testing **Commands run:** ```bash pre-commit validate-config .pre-commit-config.yaml ``` **Manual verification steps (if applicable):** 1. N/A ## Screenshots/Recordings N/A ## Platform Testing - [x] macOS - [ ] Windows - [ ] Linux ## Additional Notes - The hook uses `rustup run nightly ...`, matching the existing `fmt` hook, so contributors will need the `nightly` toolchain available for pre-commit to run clippy.
2 parents b04f15c + b86ff7e commit d93fa76

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ repos:
2121
language: system
2222
name: Linting for lambda-rs & tools.
2323
types: [rust]
24+
- id: clippy
25+
entry: rustup run nightly cargo clippy --workspace --all-targets -- -D warnings
26+
language: system
27+
name: Clippy for lambda-rs & tools.
28+
pass_filenames: false
29+
types: [rust]

0 commit comments

Comments
 (0)