followup #17852, disallow all:on for now (#18311)

This commit is contained in:
Timothee Cour
2021-06-20 13:49:14 -07:00
committed by GitHub
parent 1b3c0f142d
commit 40ec8184ad
2 changed files with 4 additions and 1 deletions

View File

@@ -217,6 +217,8 @@ proc processSpecificNote*(arg: string, state: TSpecialWord, pass: TCmdLinePass,
localError(conf, info, errOnOrOffExpectedButXFound % arg)
else:
let isOn = val == "on"
if isOn and id.normalize == "all":
localError(conf, info, "only 'all:off' is supported")
for n in notes:
if n notin conf.cmdlineNotes or pass == passCmd1:
if pass == passCmd1: incl(conf.cmdlineNotes, n)

View File

@@ -51,7 +51,8 @@ Advanced options:
--hints:on|off|list. `on|off` enables or disables hints.
`list` reports which hints are selected.
--hint:X:on|off turn specific hint X on|off. `hint:X` means `hint:X:on`,
as with similar flags. `all` can be used for "all hints".
as with similar flags. `all` is the set of all hints
(only `all:off` is supported).
--hintAsError:X:on|off turn specific hint X into an error on|off
-w:on|off|list, --warnings:on|off|list
same as `--hints` but for warnings.