You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding files: '' in user's .pre-commit-config.yaml restores the default behaviour and top-level files are passed correctly to entry command.
IMHO, it's better to remove all files: ... altogether from .pre-commit-hooks.yaml.
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 useslanguage: fail
just to print filenames passed by pre-commit):The output for running pre-commit:
Note
fix end of files
hook from https://github.com/pre-commit/pre-commit-hooks prints top-levelMakefile
whileinsert-license
doesn't.The text was updated successfully, but these errors were encountered: