coffeelint icon indicating copy to clipboard operation
coffeelint copied to clipboard

Support for Annotations

Open chrisspiegl opened this issue 10 years ago • 2 comments

It would be great if coffeelint would support annotatins in comments like the following and show them as warnings:

  • TODO: describe missing functionality that should be added at a later date
  • FIXME: describe broken code that must be fixed
  • OPTIMIZE: describe code that is inefficient and may become a bottleneck
  • HACK: describe the use of a questionable (or ingenious) coding practice
  • REVIEW: describe code that should be reviewed to confirm implementation

And multi line annotations with two spaces on the next line:

# TODO: Ensure that the value returned by this call falls
#   within a certain range, or throw an exception.
analyze()

chrisspiegl avatar Nov 01 '13 12:11 chrisspiegl

oh, I like that idea. Are you suggesting the text would be the actual warning?

  ✗ src/somefile.coffee
     ⚡ #95: TODO: Ensure that the value returned by this call falls within a certain range, or throw an exception.

If you're interested in building it before I get to it, this sounds like a LineLinter rule. The no_tabs is the simplest example of that type of rule.

It probably wont' be today, but if I do start on this I'll add a comment here.

AsaAyers avatar Nov 01 '13 13:11 AsaAyers

@AsaAyers yes I think the comment should be the error message.

And currently I have no free time on my hands (just started using coffeelint to lint my project and have a lot of cleaning up todo). But just like @AsaAyers I will comment here if I have time and start on this.

chrisspiegl avatar Nov 01 '13 13:11 chrisspiegl