mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
normalize slashes even earlier on windows for filenames
This commit is contained in:
parent
79359ed4e2
commit
5fb721f7a7
4 changed files with 30 additions and 15 deletions
|
|
@ -11,10 +11,13 @@ from pre_commit.store import Store
|
|||
|
||||
|
||||
def check_all_hooks_match_files(config_file: str) -> int:
|
||||
classifier = Classifier(git.get_all_files())
|
||||
config = load_config(config_file)
|
||||
classifier = Classifier.from_config(
|
||||
git.get_all_files(), config['files'], config['exclude'],
|
||||
)
|
||||
retv = 0
|
||||
|
||||
for hook in all_hooks(load_config(config_file), Store()):
|
||||
for hook in all_hooks(config, Store()):
|
||||
if hook.always_run or hook.language == 'fail':
|
||||
continue
|
||||
elif not classifier.filenames_for_hook(hook):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue