Skip to content

docs: add pre-commit exclude pattern guidance for large/generated dirs#324

Merged
endavis merged 1 commit intomainfrom
docs/294-precommit-exclude-guidance
Apr 2, 2026
Merged

docs: add pre-commit exclude pattern guidance for large/generated dirs#324
endavis merged 1 commit intomainfrom
docs/294-precommit-exclude-guidance

Conversation

@endavis
Copy link
Copy Markdown
Owner

@endavis endavis commented Apr 2, 2026

Description

Add commented-out exclude: pattern examples to .pre-commit-config.yaml for the check-added-large-files and detect-private-key hooks. This gives contributors ready-made templates they can uncomment and adapt when projects have large data directories or non-secret key-like files that trigger false positives.

Related Issue

Addresses #294

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvement

Changes Made

  • Added commented-out exclude: example after check-added-large-files hook for large data/generated directories
  • Added commented-out exclude: example after detect-private-key hook for directories with non-secret key-like patterns

Testing

  • All existing tests pass
  • Added new tests for new functionality
  • Manually tested the changes

Checklist

  • My code follows the code style of this project (ran doit format)
  • I have run linting checks (doit lint)
  • I have run type checking (doit type_check)
  • I have added tests that prove my fix is effective or that my feature works
  • All new and existing tests pass (doit test)
  • I have updated the documentation accordingly
  • I have updated the CHANGELOG.md
  • My changes generate no new warnings

Additional Notes

Comment-only change to .pre-commit-config.yaml. No functional behavior is altered. No tests are needed since no code is added or modified.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark

Details
Benchmark suite Current: 631218d Previous: dbc9884 Ratio
tests/benchmarks/test_bench_core.py::test_bench_greet_default 8836578.096736405 iter/sec (stddev: 8.890156692270802e-9) 8728938.237929476 iter/sec (stddev: 2.6147850131389897e-8) 0.99
tests/benchmarks/test_bench_core.py::test_bench_greet_with_name 8998538.755694509 iter/sec (stddev: 1.0625865326875989e-8) 8824487.488376206 iter/sec (stddev: 1.0764640102900196e-8) 0.98
tests/benchmarks/test_bench_core.py::test_bench_greet_long_name 5682740.12839345 iter/sec (stddev: 1.2707061353185103e-8) 5218797.625415371 iter/sec (stddev: 2.8228318211772188e-8) 0.92
tests/benchmarks/test_bench_logging.py::test_bench_get_logger 1836906.4896003555 iter/sec (stddev: 1.706351144619163e-7) 1632351.7689504097 iter/sec (stddev: 2.5443274722814504e-7) 0.89
tests/benchmarks/test_bench_logging.py::test_bench_setup_logging 529260.6212701318 iter/sec (stddev: 3.0782813289872925e-7) 493165.5322141699 iter/sec (stddev: 5.251655780708425e-7) 0.93

This comment was automatically generated by workflow using github-action-benchmark.

@endavis endavis added the ready-to-merge PR is reviewed and ready to merge label Apr 2, 2026
@endavis endavis merged commit 67fa7ca into main Apr 2, 2026
20 of 21 checks passed
@endavis endavis deleted the docs/294-precommit-exclude-guidance branch April 2, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge PR is reviewed and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant