diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-06-20 13:49:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-20 22:49:14 +0200 |
commit | 40ec8184ad51ccdaa6042132dc9b37b6f242c362 (patch) | |
tree | f864395e1355bb4fbe6412ebc6f0eb9b0492eba9 | |
parent | 1b3c0f142dd5abc3b3509feb194f54e6acf046c0 (diff) | |
download | Nim-40ec8184ad51ccdaa6042132dc9b37b6f242c362.tar.gz |
followup #17852, disallow all:on for now (#18311)
-rw-r--r-- | compiler/commands.nim | 2 | ||||
-rw-r--r-- | doc/advopt.txt | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 4c1db8ead..1c3de29ba 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -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) diff --git a/doc/advopt.txt b/doc/advopt.txt index b56649a86..063d018d1 100644 --- a/doc/advopt.txt +++ b/doc/advopt.txt @@ -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. |