kevinlacotaco / grunt-todos

Grunt task for finding todos/fixmes in code
MIT License
85 stars 9 forks source link

Added a "verbose" option and refactored the logging a bit. #1

Closed m3nt0r closed 11 years ago

m3nt0r commented 11 years ago

The plugin was displaying every single file while it was running and the "no tasks found" wasn't really working (was never displayed because syntax.comments was always > 0 if the file had any comments).

I changed "logComments" to "detectComments" which will now push onto a (relevant)comments stack before the actualy reporting logic is executed.

That allowed me add the required conditions and i could also fix the missing "no tasks found" report at the same time.

My changes will not affect the original behavior. It is only an option to reduce the amount of files reported down to only those that are relevant (ie. contain a TODO/FIXME, etc).

HTH

ps; i would have written tests, but all current ones were failing anyway so i am not sure where to start. I think the entire suite must be fixed. Probably outdated or something.

kevinlacotaco commented 11 years ago

'verbose' is a fantastic idea. I will accept this. I just already have a couple of changes to apply afterward. It is mainly for the test updates. Tests never worked :disappointed:. But are going to work soon :smile:.

Thanks!