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
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).
Update documentation to separate parameter types
This is the documentation update separated from !80 which should be pretty uncontroversial. I already applied the comment on the documentation here.
See merge request !83
In Flake8 2.x we allowed people to use # noqa at the end of a multiline
string to ignore errors inside the string (e.g., E501). Being blissfully
ignorant of this, I never accounted for it in Flake8 3. This fixes the
oversight and allows multiline statements to have the # noqa at the end.
Closes#177
It updates the documentation to separate which parameters are static and
which are changed on each line. Using the latter parameters on plugins which
are only run once per file isn't very sensible.
The `tokens` property of the `FileProcessor` class only contains tokens of the
current line but not all tokens. So if a plugin which is only executed once
per file, that property is useless. To make the tokens also available to
plugins it is now be able to supply all the tokens of a file.
It also updates the documentation to separate which parameters are static and
which are changed on each line. Using the latter parameters on plugins which
are only run once per file isn't very sensible.
The documentation for the `FileProcessor` class used `indect_char` while the
class itself uses the more sensible name `indent_char`. This updates both the
docstring as well as the documentation.
Yesterday we released the flake8-polyfill package to help with Flake8
compatibility issues. This adds documentation to Flake8 to help people
use that and to guide them towards it.
When calling `add_option` it returns an `Option` object which can return the
primary name of the option via `get_opt_name`. This should be used primarily
in the cross compatible implementation so that the order of parameters does
not matter.