fixes --warningAsError implementation (#14538)
This commit is contained in:
parent
00ec43305e
commit
0db148163b
1 changed files with 5 additions and 1 deletions
|
|
@ -494,8 +494,12 @@ proc liMessage(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string,
|
||||||
of warnMin..warnMax:
|
of warnMin..warnMax:
|
||||||
sev = Severity.Warning
|
sev = Severity.Warning
|
||||||
ignoreMsg = not conf.hasWarn(msg)
|
ignoreMsg = not conf.hasWarn(msg)
|
||||||
|
if msg in conf.warningAsErrors:
|
||||||
|
ignoreMsg = false
|
||||||
|
title = ErrorTitle
|
||||||
|
else:
|
||||||
|
title = WarningTitle
|
||||||
if not ignoreMsg: writeContext(conf, info)
|
if not ignoreMsg: writeContext(conf, info)
|
||||||
title = if msg in conf.warningAsErrors: ErrorTitle else: WarningTitle
|
|
||||||
color = WarningColor
|
color = WarningColor
|
||||||
inc(conf.warnCounter)
|
inc(conf.warnCounter)
|
||||||
of hintMin..hintMax:
|
of hintMin..hintMax:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue