tlinter.nim 904 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. discard """
  2. cmd: '''nim c --styleCheck:hint $file'''
  3. nimout: '''
  4. tlinter.nim(21, 14) Hint: 'nosideeffect' should be: 'noSideEffect' [Name]
  5. tlinter.nim(21, 28) Hint: 'myown' should be: 'myOwn' [Name]
  6. tlinter.nim(21, 35) Hint: 'inLine' should be: 'inline' [Name]
  7. tlinter.nim(25, 1) Hint: 'tyPE' should be: 'type' [Name]
  8. tlinter.nim(23, 1) Hint: 'foO' should be: 'foo' [Name]
  9. tlinter.nim(27, 14) Hint: 'Foo_bar' should be: 'FooBar' [Name]
  10. tlinter.nim(29, 6) Hint: 'someVAR' should be: 'someVar' [Name]
  11. tlinter.nim(32, 7) Hint: 'i_fool' should be: 'iFool' [Name]
  12. tlinter.nim(39, 5) Hint: 'meh_field' should be: 'mehField' [Name]
  13. '''
  14. action: "compile"
  15. """
  16. {.pragma: myOwn.}
  17. proc foo() {.nosideeffect, myown, inLine.} = debugEcho "hi"
  18. foO()
  19. tyPE FooBar = string
  20. var someVar: Foo_bar = "a"
  21. echo someVAR
  22. proc main =
  23. var i_fool = 34
  24. echo i_fool
  25. main()
  26. type
  27. Foo = object
  28. meh_field: int