From bd689849f28ba98b9b2581605234a2b52fb2e392 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 10 Jul 2019 00:27:23 +0200 Subject: nim styleChecker: implemented all the missing features (bugfix) --- tests/tools/tlinter.nim | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/tools/tlinter.nim (limited to 'tests/tools') diff --git a/tests/tools/tlinter.nim b/tests/tools/tlinter.nim new file mode 100644 index 000000000..6ecdba9ff --- /dev/null +++ b/tests/tools/tlinter.nim @@ -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 + -- cgit 1.4.1-2-gfad0