Commit graph

1249 commits

Author SHA1 Message Date
Ian Cordasco
9b8f038a97
Tidy up last few bits for performance improvement 2016-12-20 18:29:10 -06:00
Anthony Sottile
109f5f8888 Simplify and speed up multiprocessing 2016-11-29 09:00:33 -08:00
Ian Cordasco
348722d77b Merge branch 'pyflakes_missing_codes' into 'master'
Assign missing codes to PyFlakes messages

Some PyFlakes messages weren't covered by unique messages, making them
impossible to select/ignore. This is now fixed.

To ensure we don't regress in the future, a test has been added that fails if
there's any uncovered messages.

See merge request !159
2016-11-29 13:02:15 +00:00
Lukasz Langa
2f1338c342 Assign missing codes to PyFlakes messages
Some PyFlakes messages weren't covered by unique messages, making them
impossible to select/ignore. This is now fixed.

To ensure we don't regress in the future, a test has been added that fails if
there's any uncovered messages.
2016-11-28 10:34:38 -08:00
Ian Cordasco
b8ce1334d0 Merge branch 'bug/268' into 'master'
Only force files to be included when run from CLI

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

See merge request !157
2016-11-23 22:50:13 +00:00
Ian Cordasco
e4582ef4e7
Only force files to be included when run from CLI
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
2016-11-23 16:36:26 -06:00
Ian Cordasco
f8fbc11fad
Merge branch 'master' of github.com/onovy/flake8 2016-11-22 16:26:12 -06:00
Ondřej Nový
8a3869e965 Require mock 2.0.0, because unit tests are failing on older one 2016-11-22 22:43:54 +01:00
Ian Cordasco
a52aedc0a0
Prepare for 3.3.0 development 2016-11-21 17:46:09 -06:00
Ian Cordasco
a981fe34ed
Update release notes and version string for 3.2.1 2016-11-19 19:34:33 -06:00
Ian Cordasco
ae9e832cc1 Merge branch 'bug/259' into 'master'
Handle SyntaxErrors in a slightly smarter way

SyntaxErrors are strange and mystical beasts. On top of the problems we
encountered previously in GitLab#237, it's now apparent that
SyntaxErrors can also occur across multiple lines (in fact, across the
rest of a file). In the event of a "multi-line" SyntaxError, we need to
determine what row to report and what the column number is.

For now, we're going to use the row number of the first line and limit
the column number to be less than the end of the line. It may not be
perfect, but it is slightly better.

Related-to #237  
Closes #259 

cc @arcanemagus

See merge request !151
2016-11-20 01:29:46 +00:00
Ian Cordasco
a7fb806175 Merge branch 'bug/266' into 'master'
Skip filename pattern check for provided files

By default, when discovering files for users, we use the filename
patterns to determine whether or not we should check that file. However,
when a user provides the path to a file, we should instead skip checking
the name against the filename patterns provided.

For example, in Flake8 2.6 this worked:

    $ flake8 bin/script.py
    $ flake8 bin/script

But prior to this commit only

    $ flake8 bin/script.py

works. This commit will skip the filename pattern check if the user
provides the path explicitly which allows

    $ flake8 bin/script

to work again as expected.

Closes #266

See merge request !153
2016-11-19 16:25:32 +00:00
Ian Cordasco
78e8165b06
Skip filename pattern check for provided files
By default, when discovering files for users, we use the filename
patterns to determine whether or not we should check that file. However,
when a user provides the path to a file, we should instead skip checking
the name against the filename patterns provided.

For example, in Flake8 2.6 this worked:

    $ flake8 bin/script.py
    $ flake8 bin/script

But prior to this commit only

    $ flake8 bin/script.py

works. This commit will skip the filename pattern check if the user
provides the path explicitly which allows

    $ flake8 bin/script

to work again as expected.

Closes #266
2016-11-19 08:21:36 -06:00
Ian Cordasco
07c187b8d3
Handle SyntaxErrors in a slightly smarter way
SyntaxErrors are strange and mystical beasts. On top of the problems we
encountered previously in GitLab#237, it's now apparent that
SyntaxErrors can also occur across multiple lines (in fact, across the
rest of a file). In the event of a "multi-line" SyntaxError, we need to
determine what row to report and what the column number is.

For now, we're going to use the row number of the first line and limit
the column number to be less than the end of the line. It may not be
perfect, but it is slightly better.

Related-to #237
Closes #259
2016-11-17 17:17:48 -06:00
Ian Cordasco
3f6cb39219 Merge branch 'typos' into 'master'
Fix some typos in release notes

See merge request !150
2016-11-17 22:04:22 +00:00
Adam Chainz
cd2f72b21b Fix some typos in release notes 2016-11-17 21:09:37 +00:00
Ian Cordasco
c2eff52aff Merge branch 'patch-1' into 'master'
Grammar nit

See merge request !149
2016-11-17 11:43:04 +00:00
tim smith
bf47a504fb Grammar nit 2016-11-16 22:10:10 +00:00
Ian Cordasco
fd1cc38435 Merge branch 'bug/257' into 'master'
Fix subtle reporting bug for default on plugins

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

See merge request !148
2016-11-16 15:43:26 +00:00
Ian Cordasco
c50b747a1a
Fix subtle reporting bug for default on plugins
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
2016-11-15 19:56:18 -06:00
Ian Cordasco
8e4905279c
Prepare for 3.2.1 development 2016-11-15 19:48:47 -06:00
Ian Cordasco
8973c4849e
Fix version string in release notes 2016-11-14 19:37:16 -06:00
Ian Cordasco
e727bbb38b
Release 3.2.0 2016-11-14 16:38:27 -06:00
Ian Cordasco
7e7b1a3f23
Fix documentation issues in 3.1.1 2016-11-14 16:22:23 -06:00
Ian Cordasco
64cbc6559d
Add release notes for 3.1.1
Bump the version string as well
2016-11-14 09:54:58 -06:00
Ian Cordasco
0079a0acd7
Update caps in setup.cfg 2016-11-14 09:49:57 -06:00
Ian Cordasco
662d787285
Revert "Update release machinery to include manpages"
This reverts commit f6f01b469c.
2016-11-14 09:49:03 -06:00
Ian Cordasco
f6f01b469c
Update release machinery to include manpages 2016-11-14 09:48:48 -06:00
Ian Cordasco
7e44b47c9e Merge branch 'refactor-release-notes' into 'master'
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
2016-11-13 21:04:31 +00:00
Ian Cordasco
741d60c2fc Merge branch 'bug/247' into 'master'
Add a man page for Flake8

Document Flake8 for users expecting `man flake8` to work and include the
man page in Flake8's documentation.

Closes #247

See merge request !146
2016-11-13 21:03:56 +00:00
Ian Cordasco
7800351fe1 Merge branch 'bug/223' into 'master'
Correct exclude paths in git hook

When running the git hook, even though the appropriate config file is
found and processed, the exclude patterns and paths were not being
corrected to account for the temporary directory that we copy the files
into.

Related-to #223

See merge request !147
2016-11-13 20:59:10 +00:00
Ian Cordasco
2197c2ea15
Correct exclude paths in git hook
When running the git hook, even though the appropriate config file is
found and processed, the exclude patterns and paths were not being
corrected to account for the temporary directory that we copy the files
into.

Related-to #223
2016-11-13 14:48:18 -06:00
Ian Cordasco
e380665530
Add a man page for Flake8
Document Flake8 for users expecting `man flake8` to work and include the
man page in Flake8's documentation.

Closes #247
2016-11-13 14:40:14 -06:00
Ian Cordasco
879768db8a
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.
2016-11-13 09:31:30 -06:00
Ian Cordasco
3fecbe177d
Prepare to release 3.1.0 on 2016-11-14 2016-11-12 14:54:32 -06:00
Ian Cordasco
43e755e2f4 Merge branch 'bug/249' into 'master'
Add documentation for VCS hooks

Closes #249

See merge request !144
2016-11-12 20:52:15 +00:00
Ian Cordasco
f4a5021660
Add documentation for VCS hooks
Closes #249
2016-11-12 14:21:42 -06:00
Ian Cordasco
419d3a665d Merge branch 'bug/228' into 'master'
Remove reference to OpenStack Swift

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

See merge request !143
2016-11-12 20:05:26 +00:00
Ian Cordasco
7d0e950569
Remove reference to OpenStack Swift
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
2016-11-12 14:00:12 -06:00
Ian Cordasco
6118ceab7f
Add a missing release not reference 2016-11-12 13:57:46 -06:00
Ian Cordasco
d53e6156e2 Merge branch 'bug/248' into 'master'
Exit non-zero if something goes wrong during a run

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 #209  
Closes #248

See merge request !142
2016-11-12 19:50:23 +00:00
Ian Cordasco
c81a403fef
Exit non-zero if something goes wrong during a run
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 #209
Closes #248
2016-11-12 13:43:49 -06:00
Ian Cordasco
eff9f607bb Merge branch 'update-release-notes' into 'master'
Add release notes for the last several bugs

See merge request !141
2016-11-12 17:34:04 +00:00
Ian Cordasco
8f5efdb199
Add release notes for the last several bugs 2016-11-12 11:29:59 -06:00
Ian Cordasco
72eecbddcd Merge branch 'bug/245' into 'master'
Do not print the source when provided with -q

When users specify any number of -q's on the command-line, we should not
show the source even if they have otherwwise configured Flake8 to do so.

Closes #245

See merge request !140
2016-11-12 01:10:36 +00:00
Ian Cordasco
5dfb93c0d0
Do not print the source when provided with -q
When users specify any number of -q's on the command-line, we should not
show the source even if they have otherwwise configured Flake8 to do so.

Closes #245
2016-11-11 19:06:13 -06:00
Ian Cordasco
22233b6b4f Merge branch 'bug/239' into 'master'
Actually remove enabled extensions from ignore list

When we enable a plugin (when it's provided in the --enable-extensions)
plugin, we need to remove it both from the extended default ignore list
and the plain ignore list.

Closes #239 

cc @warsaw

See merge request !138
2016-11-11 16:46:43 +00:00
Ian Cordasco
040ef672a4 Merge branch 'bug/250' into 'master'
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

See merge request !139
2016-11-10 14:48:51 +00:00
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
Ian Cordasco
1dfd6bae77
Actually remove enabled extensions from ignore list
When we enable a plugin (when it's provided in the --enable-extensions)
plugin, we need to remove it both from the extended default ignore list
and the plain ignore list.

Closes #239
2016-11-09 18:47:57 -06:00