Commit graph

1216 commits

Author SHA1 Message Date
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
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
Ian Cordasco
ca4f631fb2
Merge branch 'patch-1' of github.com/alex/flake8 2016-11-09 17:09:32 -06:00
Ian Cordasco
5b1d84f0ec Merge branch 'bug/223' into 'master'
Change how we initialize our git hook application

Look for configuration files in the current directory while checking the
files in the temporary directory.

Closes #223 

Closes #210 

See merge request !136
2016-11-09 18:02:19 +00:00
Ian Cordasco
0c09268247 Merge branch 'bug/226' into 'master'
Exit early if the diff is empty

In case the provided diff is empty, do not run checks against any files,
simply exit.

Closes #226

See merge request !137
2016-11-09 03:49:22 +00:00
Ian Cordasco
9139d11760
Exit early if the diff is empty
In case the provided diff is empty, do not run checks against any files,
simply exit.

Closes #226
2016-11-08 21:38:50 -06:00
Ian Cordasco
7320cce02b
Change how we initialize our git hook application
Look for configuration files in the current directory while checking the
files in the temporary directory.

Closes #210
Closes #223
2016-11-08 21:17:24 -06:00
Ian Cordasco
c2ef3c2ce0 Merge branch 'master' into 'master'
Fixed E305: expected 2 blank lines after class or function definition

See merge request !135
2016-11-09 02:32:25 +00:00
Ian Cordasco
35a35c2a61 Merge branch 'pycodestyle21' into 'master'
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

See merge request !134
2016-11-09 02:31:15 +00:00
Ian Cordasco
9334ca9834 Merge branch 'bug/242' into 'master'
Handle a previously unhandled code scenario

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

See merge request !133
2016-11-09 02:16:43 +00:00
Ian Cordasco
4f04ca549b
Handle a previously unhandled code scenario
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
2016-11-08 20:00:01 -06:00
Ondřej Nový
901869731b Fixed E305: expected 2 blank lines after class or function definition 2016-11-08 20:13:53 +01: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
Alex Gaynor
a56f665110 Permit pycodestyle 2.1.x to be used 2016-11-05 11:24:38 -04:00
Ian Cordasco
9553c8d8cc Merge branch 'doc-E999' into 'master'
Add documentation for E999

See merge request !130
2016-10-28 23:39:39 +00:00
Ian Cordasco
878bab7ed1
Add documentation for E999 2016-10-28 18:35:56 -05:00
Ian Cordasco
b924191b3b Merge branch 'bug/235' into 'master'
Handle empty stdin-display-name values

Apparently, some folks pass an empty string to --stdin-display-name. To
avoid the errors this causes, we need to handle it appropriately.

Closes #235

See merge request !129
2016-10-28 12:19:22 +00:00
Ian Cordasco
352a7250b7
Handle empty stdin-display-name values
Apparently, some folks pass an empty string to --stdin-display-name. To
avoid the errors this causes, we need to handle it appropriately.

Closes #235
2016-10-28 07:09:43 -05:00
Ian Cordasco
185a073c29 Merge branch 'example-project' into 'master'
Add an example plugin project to source tree

Necessary to start investigating issue #239

See merge request !128
2016-10-26 11:39:07 +00:00
Ian Cordasco
68a273144e
Fix bug with --enable-extensions
We went through an iteration where we supported --enable-extensions and
then didn't. This adds back our support for --enable-extensions.

Closes #239
2016-10-25 19:28:52 -05:00
Ian Cordasco
5f3577fca8
Add an example plugin project to source tree 2016-10-25 18:21:50 -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
86819c153b Merge branch 'mr/80' into 'master'
Provide complete list of file's tokens to plugins

Supersedes !80

See merge request !127
2016-10-25 17:14:28 +00:00
Ian Cordasco
8dfe38e9e6
Fix up FileProcessor.file_tokens property
We opted to not copy the file_tokens attribute each time it's accessed
in the merge request discussion but it was never reflected in the code.
Further, the attribute had no documentation or docstring, so we've added
that. Finally, we address a personal style nit that I otherwise wouldn't
have picked at.
2016-10-25 12:02:00 -05: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
Ian Cordasco
a90c94ab22 Merge branch 'mr/120' into 'master'
Use the lazy parameter when finding changed files with git

Closes !120

See merge request !126
2016-10-25 10:31:57 +00:00
Ian Cordasco
941896218d
Change how we apply lazy to the git hook 2016-10-25 05:25:44 -05:00
Ian Cordasco
0285359a14
Merge branch 'patch-1' of skovorodkin/flake8 2016-10-24 06:39:11 -05:00
Ian Cordasco
7fc699e28b Merge branch 'bug/237' into 'master'
Handle SyntaxErrors after new-lines specially

In some cases, when we handle SyntaxErrors we need to ensure that the
column number is correct for a 1-indexed report. In some cases, we also
need to account for the fact that the SyntaxError has happened "after" a
new-line. To extract and alter the row and column numbers, we've moved
the logic to a private static method on the FileChecker object to avoid
an overly complex method.

Closes #237

See merge request !125
2016-10-24 10:31:24 +00:00
Ian Cordasco
d6b7d45020 Merge branch 'setupcfg' into 'master'
Test suite fixes

https://github.com/pytest-dev/pytest/issues/567

See merge request !123
2016-10-23 12:41:33 +00:00
Ian Cordasco
7998734fe6
Handle SyntaxErrors after new-lines specially
In some cases, when we handle SyntaxErrors we need to ensure that the
column number is correct for a 1-indexed report. In some cases, we also
need to account for the fact that the SyntaxError has happened "after" a
new-line. To extract and alter the row and column numbers, we've moved
the logic to a private static method on the FileChecker object to avoid
an overly complex method.

Closes #237
2016-10-23 07:37:08 -05:00
Ville Skyttä
17b88586d3 MANIFEST: Include *.ini in tarball
test_config_file_finder needs tox.ini present to pass.
2016-09-18 20:38:06 +03:00
Ville Skyttä
990e237e1b setup.cfg: Move pytest options to pytest.ini
https://github.com/pytest-dev/pytest/issues/567
2016-09-18 11:23:08 +03:00
Ian Cordasco
17a1b838ca Merge branch 'patch-1' into 'master'
Bumped maximum pyflakes version to allow usage of pyflakes 1.3

Closes #220 

See merge request !122
2016-09-16 01:00:01 +00:00