Skip to content

Commit

Permalink
Add check for illegal Widnows names
Browse files Browse the repository at this point in the history
  • Loading branch information
ericfrederich committed Mar 26, 2024
1 parent 6afc574 commit 994a148
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
language: python
types: [text, executable]
stages: [commit, push, manual]
- id: check-illegal-windows-names
name: check illegal windows names
entry: Illegal windows filenames detected
language: fail
files: '(?i)(^|/)(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(\.|/|$)'
- id: check-json
name: check json
description: checks json files for parseable syntax.
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ Checks for a common error of placing code before the docstring.
#### `check-executables-have-shebangs`
Checks that non-binary executables have a proper shebang.

#### `check-illegal-windows-names`
Check for files that cannot be created on Windows.

#### `check-json`
Attempts to load all json files to verify syntax.

Expand Down

0 comments on commit 994a148

Please sign in to comment.