Add check for permitted characters in pathnames

Add a new checker that checks for allowed characters in pathnames.

Includes arguments for overriding the default allowed list and extending
it.

Default allow list is alphanumeric plus `.-_`.
This commit is contained in:
Noah Pendleton 2022-03-01 18:13:56 -05:00
parent 69b4df5589
commit 9bb6ebc34d
5 changed files with 109 additions and 0 deletions

View file

@ -43,6 +43,7 @@ console_scripts =
check-executables-have-shebangs = pre_commit_hooks.check_executables_have_shebangs:main
check-json = pre_commit_hooks.check_json:main
check-merge-conflict = pre_commit_hooks.check_merge_conflict:main
check-permitted-path-characters = pre_commit_hooks.check_permitted_path_characters:main
check-shebang-scripts-are-executable = pre_commit_hooks.check_shebang_scripts_are_executable:main
check-symlinks = pre_commit_hooks.check_symlinks:main
check-toml = pre_commit_hooks.check_toml:main