diff options
Diffstat (limited to 'compiler/linter.nim')
-rw-r--r-- | compiler/linter.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/linter.nim b/compiler/linter.nim index 7059689cf..5fb646051 100644 --- a/compiler/linter.nim +++ b/compiler/linter.nim @@ -9,9 +9,10 @@ ## This module implements the style checker. -import strutils +import std/strutils +from std/sugar import dup -import options, ast, msgs, idents, lineinfos, wordrecg +import options, ast, msgs, idents, lineinfos, wordrecg, astmsgs const Letters* = {'a'..'z', 'A'..'Z', '0'..'9', '\x80'..'\xFF', '_'} @@ -129,7 +130,7 @@ proc styleCheckUse*(conf: ConfigRef; info: TLineInfo; s: PSym) = if badName.len > 0: # special rules for historical reasons let forceHint = badName == "nnkArgList" and newName == "nnkArglist" or badName == "nnkArglist" and newName == "nnkArgList" - lintReport(conf, info, newName, badName, forceHint = forceHint) + lintReport(conf, info, newName, badName, forceHint = forceHint, extraMsg = "".dup(addDeclaredLoc(conf, s))) proc checkPragmaUse*(conf: ConfigRef; info: TLineInfo; w: TSpecialWord; pragmaName: string) = let wanted = $w |