Conversation
Ensure to execute `pip install pre-commit && pre-commit install` in this repo once!
ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
|
@zandivx to avoid "forgetting" to install the hook, would it make sense to include the installation in the build process of KAMEL? Also, please add the pre-commit hook to the CI so even when it's forgotten, the CI enforces it, for instance something like |
340f639 to
da2ee97
Compare
I would advise against both ideas. Those hooks should catch common mistakes pre commit, before the changes go to review or any CI is run. Typing |
User description
Summary
This PR introduces a
.pre-commit-config.yamlfile forpre-commit. All developers need to executepip install pre-commit && pre-commit installin the root dir of this repo once to install the hooks. Please decide if all of them are wanted/needed (these are opinionated "defaults") or if something is missing. AI summary which hooks are included in this PR:Hooks
File hygiene (pre-commit-hooks v6.0.0):
Tabs (Lucas-C hooks v1.5.6):
Python formatting:
Security:
PR Type
Enhancement, Configuration changes
Description
Introduce pre-commit hooks configuration for automated code quality checks
Configure black formatter with 100-character line length limit
Include file hygiene, Python formatting, and security validation hooks
Requires one-time setup via
pip install pre-commit && pre-commit installDiagram Walkthrough
File Walkthrough
.pre-commit-config.yaml
Pre-commit hooks configuration setup.pre-commit-config.yaml
detection, symlink checking, and TOML/YAML syntax validation
sorting and code formatting
pyproject.toml
Black formatter line length configurationpyproject.toml