Skip to content

Harden pre-commit safety hooks and document local checks#421

Open
jink-ucla wants to merge 1 commit intoalgorithmicsuperintelligence:mainfrom
jink-ucla:chore/precommit-safety-hardening
Open

Harden pre-commit safety hooks and document local checks#421
jink-ucla wants to merge 1 commit intoalgorithmicsuperintelligence:mainfrom
jink-ucla:chore/precommit-safety-hardening

Conversation

@jink-ucla
Copy link

Summary

Strengthens repository safety checks by expanding pre-commit hooks and documenting local usage for contributors.

Changes

  • Update .pre-commit-config.yaml to include pre-commit-hooks:
    • check-yaml
    • detect-private-key
    • check-added-large-files (--maxkb=1000)
    • end-of-file-fixer
    • trailing-whitespace
  • Keep existing formatting hooks (isort, black).
  • Add a Pre-commit Checks section to CONTRIBUTING.md with install/run commands:
    • pip install pre-commit
    • pre-commit install
    • pre-commit run --all-files

Why

This reduces accidental secret leakage and catches common repo hygiene issues before PR review, while keeping contributor setup simple.

Validation

python -c "import yaml; yaml.safe_load(open('.pre-commit-config.yaml','r',encoding='utf-8')); print('pre-commit-yaml-ok')"

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.

1 participant