add astmsgs; add declared in msg for usage lint errors (#17961)
* add astmsgs; add `declared in` msg for usage lint errors * fix test * fix tests/tools/tlinter.nim * std prefix
This commit is contained in:
parent
d4850b524f
commit
e224865b3b
9 changed files with 43 additions and 39 deletions
|
|
@ -616,8 +616,8 @@ template internalAssert*(conf: ConfigRef, e: bool) =
|
|||
let arg = info2.toFileLineCol
|
||||
internalErrorImpl(conf, unknownLineInfo, arg, info2)
|
||||
|
||||
template lintReport*(conf: ConfigRef; info: TLineInfo, beau, got: string, forceHint = false) =
|
||||
let m = "'$1' should be: '$2'" % [got, beau]
|
||||
template lintReport*(conf: ConfigRef; info: TLineInfo, beau, got: string, forceHint = false, extraMsg = "") =
|
||||
let m = "'$1' should be: '$2'$3" % [got, beau, extraMsg]
|
||||
let msg = if optStyleError in conf.globalOptions and not forceHint: errGenerated else: hintName
|
||||
liMessage(conf, info, msg, m, doNothing, instLoc())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue