support --hint:all:off --hint:x (ditto with --warnings + friends) (#17852)

* select all hints via `--hint:all:on|off`, etc
* simplify code with setutils
* address comment
This commit is contained in:
Timothee Cour 2021-06-20 10:52:22 -07:00 • committed by GitHub
commit 7d5e6b0169
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 44 deletions

View file

@ -48,14 +48,15 @@ Advanced options:
--spellSuggest|:num show at most `num >= 0` spelling suggestions on typos.
if `num` is not specified (or `auto`), return
an implementation defined set of suggestions.
-w:on|off|list, --warnings:on|off|list
turn all warnings on|off or list all available
--warning:X:on|off turn specific warning X on|off.
`warning:X` means `warning:X:on`, as with similar flags.
--hints:on|off|list turn all hints on|off or list all available
--hint:X:on|off turn specific hint X on|off.
--warningAsError:X:on|off turn specific warning X into an error on|off
--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".
--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.
--warning:X:on|off ditto
--warningAsError:X:on|off ditto
--styleCheck:off|hint|error
produce hints or errors for Nim identifiers that
do not adhere to Nim's official style guide