-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
https://github.com/Lucas-C/pre-commit-hooks/blob/master/.pre-commit-hooks.yaml#L33 has line files: '.*/.*'. This overrides defaults and ignores top level files from project (top-level files don't have / in path when pre-commit is run).
Example when insert-license hook omits useful files (example uses language: fail just to print filenames passed by pre-commit):
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.0
hooks:
- id: insert-license
types: [makefile]
language: fail
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: end-of-file-fixer
types: [makefile]
language: failThe output for running pre-commit:
$ pre-commit run --all
Insert license in comments...............................................Failed
- hook id: insert-license
- exit code: 1
insert_license
doc/Makefile
src/Makefile
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
end-of-file-fixer
Makefile
doc/Makefile
src/Makefile
Note fix end of files hook from https://github.com/pre-commit/pre-commit-hooks prints top-level Makefile while insert-license doesn't.
Metadata
Metadata
Assignees
Labels
No labels