Since Flake8 3.0 we've had the ability for plugins to use
`extend_default_ignore` to register codes they want disabled by default.
This, however, was a permanent disabling unfortunately. Our code didn't
have a way of understanding that this new set of `ignore` codes was
actually the 'default' set for that run. Much like the
extended_select_list, we now attach extended_ignore_list to be able to
confidently determine if the ignore we get in the DecisionEngine is
actually the Default Ignore list and what plugins what us to ignore by
default.
Refs https://github.com/PyCQA/pep8-naming/pull/157
Implement `--extend-select` command line argument following what was
done for `--extend-ignore` in !233. This option can be used to
selectively add individual codes without overriding the default list
entirely.
Addresses the remaining item of issue #1061.
In dealing with the decision logic in the StyleGuide recently I
recognized that the logic really doesn't belong strictly on the
StyleGuide. A separate object makes perfect sense especially from the
perspective of testability. This is a minor refactor intended solely to
facilitate further testing and perhaps making the logic easier to
understand for others.
There was a *very* subtle bug in how we handle blanket select statements
with error codes that are in our DEFAULT_IGNORE. In the specific case,
users were specifying ``--select E`` and E126 was not being properly
reported. This unveiled further logic bugs as we refined this.
Closes#318
When we refactored our decision process to fix#239, we broke a subtle
corner case where extensions that are not off-by-default are to be
reported.
This further refactors that logic and adds specific tests around it to
ensure it works as expected and doesn't regress.
Closes#257
Previously, we didn't handle the case where an error code was implicitly
ignored (by not being in --select) and implicitly selected (by not being
in --ignore). This means we need to update StyleGuide#_decision_for and
StyleGuide#is_user_selected to handle these cases.
Closes#242
Related-to #239
Related-to !132
There are rare cases when StyleGuide#handle_error might receive None
as the column_number. This adds the failing test to ensure we don't
regress the correct behaviour.
Related-to #214
Previously, to ensure that plugins on by default were reported, we
added them to the select list. This means that ignoring them became
impossible. To accomodate our reporting logic and a user's ability
to ignore, we need to keep our select and extended select lists
separated.
This allows us to have a better understanding of who is selecting what,
where, and how and make our decision as to whether or not an error
should be reported more wisely.
Closes#195
This makes the regular expression a bit more complex, and potentially
slower, but it will fix the issue where users had noqa comments with
colons followed by explanations.
Closes#178
This relies on two things:
1. Properly configuring flake8-import-order to use that style
2. Properly configuring flake8-import-order to know that flake8 is our
application name.
This allows us to handle --show-source in our formatters by default.
This also adds the physical line information to the Error class instead
of passing it to is_inline_ignored. This allows us to avoid using
linecache in our formatters.