diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-02-24 19:20:52 -0800 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-02-27 13:22:18 +0100 |
commit | ce36fdc8974b843b2fb0404196c2778e8b0b91dd (patch) | |
tree | 2d012b9ac70b16acf4b487a6440c906007cba331 /compiler/msgs.nim | |
parent | 96bffadf6045835ddefbf2903e135d50a93f7016 (diff) | |
download | Nim-ce36fdc8974b843b2fb0404196c2778e8b0b91dd.tar.gz |
correctly honor cmdline --hint:conf:on/off ; correctly show Conf hints in order
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r-- | compiler/msgs.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 6d1ecb2b1..7fa8e8aef 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -418,7 +418,10 @@ proc rawMessage*(conf: ConfigRef; msg: TMsgKind, args: openArray[string]) = inc(conf.warnCounter) of hintMin..hintMax: sev = Severity.Hint - if not conf.hasHint(msg): return + 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 title = HintTitle color = HintColor if msg != hintUserRaw: kind = HintsToStr[ord(msg) - ord(hintMin)] |