-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Figure out a way to test the pre-commit hooks in the actions.
Currently, the content of the hooks are tested with pytest, but I have to test my hook changes locally by updating the .pre-commit-config.yaml file:
- repo: local
hooks:
- id: add-license-headers
name: "Add License Headers"
entry: add-license-headers
language: python
files: '(src|examples|tests)/.*\.(py)|\.(proto)'
require_serial: true
args:
- --start_year=2023
exclude: |
(?x)^(
tests/test_add_license_headers_files/bad_chars.py |
tests/test_add_license_headers_files/index_error.scss
)$
Next steps
- Look at how hooks are tested in the pre-commit repository & do something similar?
- Create dummy repos for each hook that tests all scenarios for add-license-headers and tech-review respectively
RobPasMue
Metadata
Metadata
Assignees
Labels
No labels