Merge pull request #1044 from ericfrederich/more_illegal_windows_filenames

support more illegal Windows filenames
This commit is contained in:
Anthony Sottile 2024-04-20 12:47:34 -04:00 committed by GitHub
commit 8c24e2c2e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -44,7 +44,7 @@
name: check illegal windows names
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[1-9]|LPT[1-9])(\.|/|$)|:)'
- id: check-json
name: check json
description: checks json files for parseable syntax.

View File

@ -28,6 +28,8 @@ def hook_re():
pytest.param('aux', id='without ext'),
pytest.param('AuX.tXt', id='capitals'),
pytest.param('com7.dat', id='com with digit'),
pytest.param(':', id='bare colon'),
pytest.param('file:Zone.Identifier', id='mid colon'),
),
)
def test_check_illegal_windows_names_matches(hook_re, s):