Previously we added support so users can do:
$ flake8 bin/executable
But this broke the fact that git hooks shouldn't check things like
reStructuredText doc files. This commit restores that functionality but
will cause bin/executable to be ignored in the git hook. This seems fair
since folks can amend their filename patterns to include it explicitly.
Closes#268
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
Create sub-sections for different release series
When looking at the documentation, the release notes section on the
sidebar was incredibly long, due to the number of releases available.
To make this more usable, I've split the release notes index into
sections for each release series (e.g., 3.x, 2.x, etc.). This allows
documentation users to open the release notes sidebar section, and then
select which series they want. That will expand and let them pick the
version.
See merge request !145
When looking at the documentation, the release notes section on the
sidebar was incredibly long, due to the number of releases available.
To make this more usable, I've split the release notes index into
sections for each release series (e.g., 3.x, 2.x, etc.). This allows
documentation users to open the release notes sidebar section, and then
select which series they want. That will expand and let them pick the
version.
This section of the docs could be read as pointing out the project as a
bad example. It was not intended this way, but I would like to avoid
anyone interpreting it this way. As a result, we'll continue to use
their configuration section as an example but not name names.
Closes#228
If we handle an exception, or early exit, or really anything, we should
exit non-zero (and we used to). This was a minor oversight.
Closes#209Closes#248
When we rewrote Flake8 for 3.0, we unintentionally stopped forcibly
excluding some patterns regardless of what the user specified. This note
is added after the fact to make it easier for users to determine the
cause of any backwards incompatibility they might notice.
Closes#250
Add --tee option to split report output stream.
The `--tee` option allows the linter report to be written to stdout, even
though it is being redirected to a file with the` --output-file` option.
This is useful if I want to store the report in a separate file for later
analysis but also be able to print the output on screen (e.g when running
in a CI environment).
See merge request !90
If a plugin's target (constructor or function) doesn't satisfy specific
parameters, it'll never be called. This documents what the parameters must
contain to be run at all.
Related to: #159
Previously, all testing was done from the directory in which the
configuration file lived, so this bug went unnoticed. However, if you
run Flake8 against its own source from a directory above, you would
notice that the patterns in the exclude config value in tox.ini were
ignored. This is because we (like any reasonable person) are using
relative paths. The path is relative, however, to the directory in
which the configuration file was located. So we keep track of which
directory that is and use that to normalize the paths in the config
file.
Yes, there is an unrelated change to our tox.ini in this commit as
well. ;-)
Closes#194
Due to https://bugs.python.org/issue27649, we cannot continue to
expect multiprocessing to work as we expect and document it on Windows.
As such, we are going to revert back to our previous behaviour of
disabling it across all versions of Python on Windows to provide the
default expected behaviour of Flake8 on that Operating System.
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
Clarify what the X in the entry points does
*Description of changes*
Previously the `X` wasn't further explained in the documentation on how to
register a plugin. This plugs the hole at least for checking plugins.
*Related to:* #183
See merge request !93
When attempting to centralize all inline NoQA handling in the StyleGuide
we inadvertently broke plugins relying on it in combination with checker
state. For example, the check for E402 relies both on NoQA and the state
to determine if it has seen a non-import line. Placing NoQA on the sole
line that is not an import is more elegant than placing it on each of
the following import lines.
Closes#186
Previously the `X` wasn't further explained in the documentation on how to
register a plugin. This plugs the hole at least for checking plugins.
See also: #183
Flake8 3.0 was stopping once it found the current directory but the
historical behaviour (that we didn't intend to break) searched past
that (towards root) until it found one of the project/local config
file names that could be read.
Closes#181