--hintAsError (#16763)
* --hintAsError * add test, changelog * condsyms
This commit is contained in:
parent
2bedb0fe2c
commit
4fc7fcb775
8 changed files with 56 additions and 9 deletions
|
|
@ -413,7 +413,7 @@ proc handleError(conf: ConfigRef; msg: TMsgKind, eh: TErrorHandling, s: string)
|
|||
if conf.cmd == cmdIdeTools: log(s)
|
||||
quit(conf, msg)
|
||||
if msg >= errMin and msg <= errMax or
|
||||
(msg in warnMin..warnMax and msg in conf.warningAsErrors):
|
||||
(msg in warnMin..hintMax and msg in conf.warningAsErrors):
|
||||
inc(conf.errorCounter)
|
||||
conf.exitcode = 1'i8
|
||||
if conf.errorCounter >= conf.errorMax:
|
||||
|
|
@ -522,7 +522,11 @@ proc liMessage*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string,
|
|||
of hintMin..hintMax:
|
||||
sev = Severity.Hint
|
||||
ignoreMsg = not conf.hasHint(msg)
|
||||
title = HintTitle
|
||||
if msg in conf.warningAsErrors:
|
||||
ignoreMsg = false
|
||||
title = ErrorTitle
|
||||
else:
|
||||
title = HintTitle
|
||||
color = HintColor
|
||||
inc(conf.hintCounter)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue