chore(repo-hygiene): Tier 1 -- pre-commit gitleaks + base hooks#70
Merged
Merged
Conversation
Adds .pre-commit-config.yaml per portfolio repo-hygiene Tier 1 (eva-foundation memory entry reference_portfolio_repo_hygiene_tier1_2026-05-17). Pre-commit stays FAST (target under 5 seconds total) per the 2026-05-18 doctrine refinement: gitleaks for secrets, ruff for Python lint+format, pre-commit-hooks for whitespace/EOF/YAML/JSON/merge-conflict/large-files. Tests run in CI, not here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a .pre-commit-config.yaml implementing the portfolio's Tier 1 repo-hygiene baseline: gitleaks secret scanning, ruff lint/format, and standard pre-commit-hooks. Tests are intentionally excluded to keep hooks fast (<5s), with CI handling pytest.
Changes:
- New
.pre-commit-config.yamlwith three repo blocks (pre-commit-hooks v5.0.0, ruff v0.13.1, gitleaks v8.21.2). - Configures
default_install_hook_types: [pre-commit, commit-msg]andfail_fast: false. - Sets large-file limit to 1024 KB and forces LF line endings.
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
Adds
.pre-commit-config.yamlper portfolio repo-hygiene Tier 1 (eva-foundation memory entryreference_portfolio_repo_hygiene_tier1_2026-05-17).Wave 3 of the rollout. Wave 1 (gh API settings) + Wave 2 (CODEOWNERS PR #69) already merged.
Doctrine
Pre-commit stays FAST (target under 5 seconds total) per the 2026-05-18 doctrine refinement:
gitleaks-- secret scanningruff+ruff-format-- Python lint + formatpre-commit-hooks-- trailing-whitespace, end-of-file-fixer, check-yaml, check-json, check-merge-conflict, check-added-large-files, mixed-line-endingTests run in CI, not in pre-commit. Pytest in pre-commit is the anti-pattern this doctrine refinement closes.
Test plan
python -c "import yaml; yaml.safe_load(...)")pre-commit install