Commit graph

179 commits

Author SHA1 Message Date
Ian Cordasco
1d8bbbbf9b
Add a release note to 3.0.0 about --exclude
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
2016-11-10 07:13:44 -06:00
Yen Chi Hsuan
6595d3a08d Add previous_unindented_logical_line attribute
This attribute is introduced in pycodestyle 2.1.0

Closes #246

See: https://github.com/PyCQA/pycodestyle/issues/400
2016-11-08 23:34:56 +08:00
Ian Cordasco
878bab7ed1
Add documentation for E999 2016-10-28 18:35:56 -05:00
Ian Cordasco
a9e15afbf5 Merge branch 'master' into 'master'
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
2016-10-25 21:34:43 +00:00
Ian Cordasco
1cfc12f366
Trim trailing spaces from documentation 2016-10-25 12:01:43 -05:00
Ian Cordasco
91a1ce47d6
Merge branch 'file-tokens' of xzise/flake8 2016-10-25 11:57:24 -05:00
Ville Skyttä
0f181954fd Spelling fixes 2016-08-13 11:13:37 +03:00
Martin Domke
a71941e9fe Fix typo in documentation. 2016-08-12 13:40:58 +02:00
Ian Cordasco
f67f481bee
Add --bug-report flag to help bug reporters
When invoked it will print out JSON that has all of the debugging
information needed by the maintainers to diagnose or reproduce a bug.

Closes #207
2016-08-07 12:31:14 -05:00
Ian Cordasco
b0a99d0b63
Replace list of violation codes
Closes #206
2016-08-06 08:28:52 -05:00
Ian Cordasco
690d157d1b
Add release note about handling SyntaxErrors 2016-08-06 08:03:30 -05:00
Ian Cordasco
a9be6feeae
Set version to 3.0.4 and start release notes 2016-08-05 17:53:53 -05:00
Fabian Neundorf
eae68a41f6 Document how it determines when the plugin is run
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
2016-08-01 14:06:33 +02:00
Ian Cordasco
0b861e31ef
Bump version for v3.0.3
Update release date as well
2016-07-30 06:58:42 -05:00
Ian Cordasco
22650e5086
Reset Application.formatter attribute in init_report
For our Legacy API users, StyleGuide.init_report should reset the
formatter attribute before calling Application.make_formatter().

Closes #200
2016-07-30 06:42:34 -05:00
Ian Cordasco
63f5f15068
Re-allow for relative paths for exclude
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
2016-07-29 19:27:06 -05:00
Ian Cordasco
e93aad6043
Open our output file in append mode always
This avoid overwriting portions of our log output when using Flake8
in verbose mode.

Closes #193
2016-07-29 18:14:14 -05:00
Marc Abramowitz
40f7041a62 Add 3.0.3 release note about GitLab#164 2016-07-29 10:05:48 -07:00
Ian Cordasco
429d8a196e
Diable multiprocessing behaviour on Windows
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.
2016-07-29 07:04:37 -05:00
Ian Cordasco
c670217c24
Allow plugins that are on by default to be ignored
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
2016-07-28 19:28:13 -05:00
Ian Cordasco
c0ddc54f2f
Match noqa for users with explanations
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
2016-07-28 06:48:15 -05:00
Ian Cordasco
3936141209
Update version and release notes for 3.0.2 2016-07-26 19:50:54 -05:00
Ian Cordasco
12dcb10c90
Make the documentation very obvious 2016-07-26 19:49:36 -05:00
Ian Cordasco
0e8d7cb7e2 Merge branch 'entry-point' into 'master'
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
2016-07-27 00:45:31 +00:00
Ian Cordasco
e51fc5458b
Fix handling of logical lines with noqa
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
2016-07-26 19:45:05 -05:00
Ian Cordasco
6eca38f2f2
Fix zero-indexed column numbering
We accidentally changed column numbering from one-indexed to
zero-indexed.
2016-07-26 19:45:05 -05:00
Ian Cordasco
c40b562feb
Move the unreleased note to the right version 2016-07-26 11:29:34 -05:00
Fabian Neundorf
9f10219137 Clarify what the X in the entry points does
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
2016-07-26 17:57:51 +02:00
Ian Cordasco
df2fa18a08
Fix project config file discovery
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
2016-07-26 09:37:32 -05:00
Martin Domke
c782060a06 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).
2016-07-26 15:57:13 +02:00
Ian Cordasco
88d9213962
Add release notes for 3.0.1 2016-07-25 19:43:27 -05:00
Ian Cordasco
232ef0ed31 Merge branch 'file-plugin-docs' into 'master'
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
2016-07-25 18:11:28 +00:00
Ian Cordasco
299e200cb9
Handle multiline strings with '# noqa'
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
2016-07-25 11:00:18 -05:00
Fabian Neundorf
3191c44cfc Update documentation to separate parameter types
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.
2016-07-25 15:45:44 +02:00
Ian Cordasco
ff0bf5f0f9
Update release notes and version string for 3.0 2016-07-24 20:11:48 -05:00
Fabian Neundorf
9cf8603e94 Add support for tokens of a complete file
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.
2016-07-22 00:28:23 +02:00
Fabian Neundorf
965d6f9509 Fix typo in documentation using indect
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.
2016-07-21 13:59:07 +02:00
Ian Cordasco
8a2e7ff908
Trim trailing whitespace in compat docs 2016-07-20 08:17:33 -05:00
Ian Cordasco
370912988f
Document flake8-polyfill in compatibility section
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.
2016-07-20 08:12:45 -05:00
Ian Cordasco
ec678de427
Document Legacy API 2016-07-14 08:13:10 -05:00
Ian Cordasco
469da96001
Add new Flake8 classifier to Trove list 2016-07-09 16:16:07 -05:00
Fabian Neundorf
fabb13c5d1 Use option name provided by the parser
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.
2016-07-09 21:27:19 +02:00
Ian Cordasco
5b8a875965
Add 3.0.0b2 release notes 2016-06-28 20:47:44 -05:00
Ian Cordasco
7fe5b359f7
Add high-level overview of how things fit together
There are now a lot of moving parts in Flake8. It can't help to give new
developers a high-level overview of how they all fit together to make
Flake8. =)
2016-06-26 20:28:24 -05:00
Ian Cordasco
b82e0d5176
Add forgotten release note 2016-06-26 06:44:05 -05:00
Ian Cordasco
5a9b7c27ab
Update compatibility docs 2016-06-26 06:41:47 -05:00
Ian Cordasco
00575214db
Add missing release notes 2016-06-25 12:29:58 -05:00
Ian Cordasco
cee691059f
Merge branch 'origin/proposed/3.0' into master 2016-06-25 12:01:02 -05:00
Ian Cordasco
6eb2e3a701
Add more release notes for 3.0.0b1 2016-06-25 11:55:52 -05:00
Ian Cordasco
7340b3e057
Add release note for 2.6.1 2016-06-25 11:40:41 -05:00