yujinakayama / atom-lint

Obsolete: Generic code linting support for Atom
https://atom.io/packages/atom-lint
MIT License
111 stars 33 forks source link

ignore warnings #98

Open Janther opened 9 years ago

Janther commented 9 years ago

As I proposed on https://github.com/yujinakayama/atom-lint/issues/48 users should have more control on the warnings we see. That approach was too complicated since it was too difficult to maintain.

But now (at least on the rubocop linter) I see you are retrieving the error name, for example Metrics/LineLength.

I propose the feature to ignore some warnings based on this name. It doesn't have to be hardcoded it can be added on the fly by the user.

You can step this a little more and have lists of errors and have different colours to display them.

  1. Critical(red) - Can't be understood, must fix
  2. Ugly(orange) - This can be better coded, should fix (default)
  3. Ignored (isn't rendered :) better performance) - I don't mind this styling error.

This way the user can make its own priorities on style and the lists could be managed on the preference panel or on a config file.

yujinakayama commented 9 years ago

Didn't my comment make sense to you?

I don't quite understand the need for filtering linter warnings in atom-lint. You can ignore Metrics/LineLength in RuboCop by putting the following content in /path/to/your/project/.rubocop.yml or ~/.rubocop.yml:

Metrics/LineLength
  Enabled: false
Janther commented 9 years ago

Thanks for the tip on rubocop.

Yes, the comment made sense according to the approach of that. But what i propose now is to categorize the error according to the name the linter provides (when available at least). The logic of displaying or not a warning lies in the user not the code. Of course this would be usable only when the linter provides the error-name.

To answer your question:

Maybe I'm overcomplicating things. Thanks for reading.

lightyrs commented 9 years ago

I couldn't agree more @Janther — this is becoming excruciating to disable individual warnings for each linter.