Add pre-commit hooks for automated code quality checks#140
Closed
cdli-ai wants to merge 1 commit into
Closed
Conversation
- Add .pre-commit-config.yaml with hooks for Black, Ruff, MyPy, Rust fmt, and Clippy - Update CONTRIBUTING.md with pre-commit setup instructions - Configure hooks to run on Python and Rust code only - Include general checks for trailing whitespace, merge conflicts, and YAML/TOML validation Fixes cdliai#122
Member
|
All lint-and-test jobs (Python 3.9-3.12) failed: Looks like the pre-commit hooks might need adjustment before merging. Let me know if you need help debugging! 🔧 |
Author
|
Closing this PR due to regressions introduced. The branch contains changes beyond pre-commit hooks that broke existing functionality:
A clean replacement PR (#141) has been created with ONLY the pre-commit hooks configuration and CONTRIBUTING.md documentation updates. All tests pass on that branch. See: #141 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add pre-commit framework to automate code quality checks before commits. This catches formatting, linting, and type checking issues locally instead of in CI, improving developer experience and reducing failed CI runs.
Changes
**Add **: Configuration for pre-commit hooks including:
**Update **: Add pre-commit setup instructions:
Benefits
Testing
The hooks are configured to run on:
Related Issue
Fixes #122