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

@ -45,6 +45,12 @@
entry: check-json
language: python
types: [json]
- id: check-permitted-path-characters
name: check for permitted path characters
description: checks pathnames for allowed characters
entry: check-permitted-path-characters
language: python
args: ['--']
- id: check-shebang-scripts-are-executable
name: check that scripts with shebangs are executable
description: ensures that (non-binary) files with a shebang are executable.