no_illegal_windows_names
Reject path components Windows can’t represent:
- Reserved device names (
CON,PRN,AUX,NUL,COM1–COM9,LPT1–LPT9) — case-insensitive, regardless of extension.con.txtfails;COM10andconfusedcorrectly pass. - Trailing dots (
foo.) or trailing spaces (foo) — Windows silently strips these on checkout. - Reserved chars:
<,>,:,",|,?,*.
Options
Section titled “Options”This rule takes no kind-specific options.
Plus the common paths, level, id, and when fields. This table is generated from the JSON Schema; option types and defaults are authoritative.
Example
Section titled “Example”Files using reserved Windows device names and a trailing dot
Section titled “Files using reserved Windows device names and a trailing dot”The rule fires on this repository:
COM1.mdNULREADME.mdcon.txttrailing_dot.# fineWith this .alint.yml:
version: 1rules: - id: no-win-reserved kind: no_illegal_windows_names paths: "**" level: erroralint check reports:
--- COM1.md -------------------------------------------------------------------- x error no-win-reserved clashes with a Windows reserved device name: "COM1.md"
--- NUL ------------------------------------------------------------------------ x error no-win-reserved clashes with a Windows reserved device name: "NUL"
--- con.txt -------------------------------------------------------------------- x error no-win-reserved clashes with a Windows reserved device name: "con.txt"
--- trailing_dot. -------------------------------------------------------------- x error no-win-reserved Windows strips trailing dots on checkout: "trailing_dot."
Summary (4 violations): x 4 errors 0 passing * 1 failingNames that resemble reserved Windows names but stay legal
Section titled “Names that resemble reserved Windows names but stay legal”This repository is compliant:
COM10.cfgREADME.mdsrc/src/controllers.rssrc/lib.rsWith this .alint.yml:
version: 1rules: - id: no-win-reserved kind: no_illegal_windows_names paths: "**" level: erroralint check reports:
v All 1 rule(s) passed.