Skip to content

chore(repo-hygiene): Tier 1 -- pre-commit gitleaks + base hooks#70

Merged
MarcoPolo483 merged 1 commit into
mainfrom
claude/win-p61/2026-05-18-precommit-gitleaks
May 18, 2026
Merged

chore(repo-hygiene): Tier 1 -- pre-commit gitleaks + base hooks#70
MarcoPolo483 merged 1 commit into
mainfrom
claude/win-p61/2026-05-18-precommit-gitleaks

Conversation

@MarcoPolo483

Copy link
Copy Markdown
Contributor

Summary

Adds .pre-commit-config.yaml per portfolio repo-hygiene Tier 1 (eva-foundation memory entry reference_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 scanning
  • ruff + ruff-format -- Python lint + format
  • pre-commit-hooks -- trailing-whitespace, end-of-file-fixer, check-yaml, check-json, check-merge-conflict, check-added-large-files, mixed-line-ending

Tests run in CI, not in pre-commit. Pytest in pre-commit is the anti-pattern this doctrine refinement closes.

Test plan

  • YAML parses (python -c "import yaml; yaml.safe_load(...)")
  • CI green
  • Subsequent commits to this repo install hooks via pre-commit install

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>
Copilot AI review requested due to automatic review settings May 18, 2026 14:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml with 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] and fail_fast: false.
  • Sets large-file limit to 1024 KB and forces LF line endings.

@MarcoPolo483 MarcoPolo483 merged commit 0b11632 into main May 18, 2026
11 checks passed
@MarcoPolo483 MarcoPolo483 deleted the claude/win-p61/2026-05-18-precommit-gitleaks branch May 18, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants