Skip to content

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

@endavis

Description

@endavis

Documentation Type

Configuration guidance

Description

Add comments in .pre-commit-config.yaml showing where to add project-specific exclusions for check-added-large-files and detect-private-key hooks. Currently there's no guidance, so downstream projects don't know the right place to add exclusions without breaking hook config.

Example:

- repo: https://github.com/pre-commit/pre-commit-hooks
  hooks:
    - id: check-added-large-files
      # Add project-specific exclusions for large data/generated directories:
      # exclude: ^(vendor/|fixtures/|data/)
    - id: detect-private-key
      # Exclude directories with non-secret key-like patterns:
      # exclude: ^(example-config/|test-fixtures/)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationneeds-triageNeeds review and prioritization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions