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
|
|
@ -1,9 +1,11 @@
|
|||
discard """
|
||||
cmd: "nim c --styleCheck:error --styleCheck:usages $file"
|
||||
errormsg: "'BAD_STYLE' should be: 'BADSTYLE'"
|
||||
line: 20
|
||||
action: reject
|
||||
nimout: '''tusages.nim(22, 5) Error: 'BAD_STYLE' should be: 'BADSTYLE' [proc declared in tusages.nim(11, 6)]'''
|
||||
cmd: "nim $target --styleCheck:error --styleCheck:usages $file"
|
||||
"""
|
||||
|
||||
# xxx pending bug #17960, use: matrix: "--styleCheck:error --styleCheck:usages"
|
||||
|
||||
import strutils
|
||||
|
||||
proc BADSTYLE(c: char) = discard
|
||||
|
|
@ -20,4 +22,3 @@ proc toSnakeCase(s: string): string =
|
|||
BAD_STYLE(s[i])
|
||||
|
||||
echo toSnakeCase("fooBarBaz Yes")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue