From 3dd5e114807b49f0339e69bf4de80bec5634c6f0 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Thu, 21 Mar 2024 07:26:26 +0000 Subject: [PATCH] fix: use `ErrorColor` for hints marked as errors (#23430) # Description When using `--hintAsError`, we want some red color to appear in the logs. Same is already done for `warningAsError`. # Cherry-picking to Nim 1.6 Would be nice to cherry-pick this and the `warningAsError` log highlight to 1.6 branch, as it's used in status-desktop. (cherry picked from commit 50c1e93a7481a79634b5d444806c94c1ea12b8ff) --- compiler/msgs.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 4e9b04de66..1282d475a3 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -558,9 +558,10 @@ proc liMessage*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string, ignoreMsg = not conf.hasHint(msg) if not ignoreMsg and msg in conf.warningAsErrors: title = ErrorTitle + color = ErrorColor else: title = HintTitle - color = HintColor + color = HintColor inc(conf.hintCounter) let s = if isRaw: arg else: getMessageStr(msg, arg)