timothycrosley / deprecated.frosted

A simple program which checks Python source files for errors.
MIT License
250 stars 23 forks source link

Suggestion : honor something like #NOQA #46

Closed mriehl closed 10 years ago

mriehl commented 10 years ago

Flake8 has a feature where if you have the inline comment

# NOQA

on a line, then errors/warnings on that line will be ignored silently. I think this is important, because a linter consists of general rules, that sometimes need to be broken. An example is a bare except clause which is usually bad practice but can be needed in rare scenarios where you have no idea what might go wrong but absolutely need to deal with the error and can do so in a generic fashion.

Currently (AFAIK) I need to tell frosted to completely ignore this error, but that's not really what I want. I still think avoiding bare excepts is great.

What do you think?

timothycrosley commented 10 years ago

Hi @mriehl ,

I think this is a great idea. I'll make sure to include it in the next release.

Thanks!

~Tim

thomasw commented 10 years ago

Yay!

timothycrosley commented 10 years ago

Thanks for requesting this! It's implemented in release 1.4.1 - both noqa and frosted:noqa work.

~Tim