mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-27 09:43:58 +00:00
nim styleChecker: implemented all the missing features (bugfix)
(cherry picked from commit bd689849f2)
This commit is contained in:
30
tests/tools/tlinter.nim
Normal file
30
tests/tools/tlinter.nim
Normal file
@@ -0,0 +1,30 @@
|
||||
discard """
|
||||
cmd: '''nim c --styleCheck:hint $file'''
|
||||
nimout: '''
|
||||
tlinter.nim(21, 14) Hint: 'nosideeffect' should be: 'noSideEffect' [Name]
|
||||
tlinter.nim(21, 28) Hint: 'myown' should be: 'myOwn' [Name]
|
||||
tlinter.nim(21, 35) Hint: 'inLine' should be: 'inline' [Name]
|
||||
tlinter.nim(25, 1) Hint: 'tyPE' should be: 'type' [Name]
|
||||
tlinter.nim(23, 1) Hint: 'foO' should be: 'foo' [Name]
|
||||
tlinter.nim(27, 14) Hint: 'Foo_bar' should be: 'FooBar' [Name]
|
||||
tlinter.nim(29, 6) Hint: 'someVAR' should be: 'someVar' [Name]
|
||||
'''
|
||||
action: "compile"
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{.pragma: myOwn.}
|
||||
|
||||
proc foo() {.nosideeffect, myown, inLine.} = debugEcho "hi"
|
||||
|
||||
foO()
|
||||
|
||||
tyPE FooBar = string
|
||||
|
||||
var someVar: Foo_bar = "a"
|
||||
|
||||
echo someVAR
|
||||
|
||||
Reference in New Issue
Block a user