Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Add a "select" field in settings to include codes skipped by default #19

Closed
ChaoticMind opened this issue Mar 6, 2015 · 2 comments
Closed

Comments

@ChaoticMind
Copy link
Contributor

The error codes that are skipped by pep8 by default (marked with '*' in the list [here](http://pep8.readthedocs.org/en/latest/intro.html#error-codes -- see note after the table) are also skipped by default in linter-flake8.

They are also skipped in flake8 (and of course in pep8). To include them, one has to run pep8 (or flake8) with the parameters "--select E, W". This is not currently possible in linter-flake8.

A workaround is to add a junk value to the 'ignore error codes' field (e.g. 'ignore_me') because it seems that the error codes are actually included if there is anything at all being explicitely ignored. One can argue this is an upstream bug, but it is actually helpful in providing us with a workaround.

ie, if one runs (even in the original pep8): "pep8 --ignore test_param_plz_ignore", then the aforementioned codes are not ignored anymore.
The ignore-by-default behavior also doesn't happen if some other non-junk code is being explicitely ignored (e.g. W191).

To recap: pep8 (and flake8 and therefore linter-flake8) ignore certain error codes by default. The way to solve it is:

  • pass "--select E, W" (or the specific code). This is not possible with linter-flake8, but should be.

A workaround is:

  • pass "--ignore W191" (or any other valid code). Then the default codes won't be ignored anymore
  • pass "--ignore junk_value". This works if we don't want to ignore anything but still want to include all the codes.
@ChaoticMind
Copy link
Contributor Author

I just saw that this was already implemented in 2abd81b. But the config initialization is broken. I will send a pull request with a fix soon.

@badray
Copy link
Contributor

badray commented Mar 10, 2015

@ChaoticMind passing --select E, W was possible through by editing ~/.atom/config.cson what was (not exactly) mentioned in README.md file. But yes I agree it should be done as you did :), so user can user standard atom settings panel. Merge imminent.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants