summary refs log tree commit diff stats
path: root/tests/tools
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-07-10 00:27:23 +0200
committerAraq <rumpf_a@web.de>2019-07-10 00:29:58 +0200
commitbd689849f28ba98b9b2581605234a2b52fb2e392 (patch)
tree868b293cda5151623b6083044bd7a7a0c187713e /tests/tools
parentc6c9e30379dbf1016f336495b073b233fe1a2563 (diff)
downloadNim-bd689849f28ba98b9b2581605234a2b52fb2e392.tar.gz
nim styleChecker: implemented all the missing features (bugfix)
Diffstat (limited to 'tests/tools')
-rw-r--r--tests/tools/tlinter.nim30
1 files changed, 30 insertions, 0 deletions
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
+