mirror of
https://github.com/bitwarden/clients.git
synced 2026-11-16 07:03:29 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user