refactor(review): Name the YAML quoting checks in the list lint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Todd Martin
2026-11-15 12:26:25 -05:00
parent f9ba5bf20a
commit b85050a3b4

View File

@@ -148,7 +148,9 @@ function readList(file: string): Entry[] {
}
const value = itemMatch[1];
const quoted = value.match(/^"(.*)"$/) ?? value.match(/^'(.*)'$/);
if (!quoted && (value.startsWith("*") || /\s#|:\s/.test(value))) {
const startsWithWildcard = value.startsWith("*");
const containsYamlSyntax = /\s#|:\s/.test(value);
if (!quoted && (startsWithWildcard || containsYamlSyntax)) {
errors.push(`${file}:${line} quote '${value}'. YAML reads it differently unquoted.`);
return;
}