Extend check for illegal Windows filenames

This commit is contained in:
Jeffrey Lim 2024-04-25 22:46:10 +02:00 committed by Anthony Sottile
parent 515e8b32ba
commit fd011242fd
2 changed files with 17 additions and 2 deletions

View file

@ -44,9 +44,9 @@
minimum_pre_commit_version: 3.2.0
- id: check-illegal-windows-names
name: check illegal windows names
entry: Illegal windows filenames detected
entry: Illegal Windows filenames detected
language: fail
files: '(?i)((^|/)(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(\.|/|$)|:)'
files: '(?i)((^|/)(CON|PRN|AUX|NUL|COM[\d¹²³]|LPT[\d¹²³])(\.|/|$)|[<>:\"\\|?*\x00-\x1F]|/[^/]*[\.\s]/|[^/]*[\.\s]$)'
- id: check-json
name: check json
description: checks json files for parseable syntax.