properly handle note override logic/verbosity/config/cmdline using modifiedyNotes, cmdlineNotes

This commit is contained in:
Timothee Cour 2020-02-26 12:49:44 -08:00 • committed by Andreas Rumpf
commit 1056f9ecff
5 changed files with 31 additions and 32 deletions

View file

@ -418,10 +418,7 @@ proc rawMessage*(conf: ConfigRef; msg: TMsgKind, args: openArray[string]) =
inc(conf.warnCounter)
of hintMin..hintMax:
sev = Severity.Hint
if msg in conf.cmdLineDisabledNotes: return # eg: `--hints:conf:off` passed on cmdline
# handle `--hints:off` (regardless of cmdline/cfg file)
# handle `--hints:conf:on` on cmdline
if not conf.hasHint(msg) and not (optHints in conf.options and msg in conf.cmdLineNotes): return
if not conf.hasHint(msg): return
title = HintTitle
color = HintColor
if msg != hintUserRaw: kind = HintsToStr[ord(msg) - ord(hintMin)]