Commit graph

1188 commits

Author SHA1 Message Date
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
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
Alex Gaynor
4bd4d4ce9c Bumped maximum pyflakes version to allow usage of pyflakes 1.3 2016-09-02 12:54:21 +00:00
Ian Cordasco
c17043ff3f Merge branch 'bug/214' into 'master'
Avoid TypeErrors when handling a SyntaxError



See merge request !121
2016-08-28 00:58:19 +00:00
Ian Cordasco
585628875d
Ensure column_number is always an integer
When a SyntaxError is raised, column_number may be None. Unfortunately,
it's not obvious where that None comes from so we must handle it in
handle_error.

Closes #214
2016-08-27 19:53:14 -05:00
Ian Cordasco
1631ab8ac7
Add failing test for NoneType in handle_error
There are rare cases when StyleGuide#handle_error might receive None
as the column_number. This adds the failing test to ensure we don't
regress the correct behaviour.

Related-to #214
2016-08-27 19:44:24 -05:00
Sergey
2eec5060e9 Consider lazy parameter in git.find_modified_files function
Refer to 867727f304/old/flake8/hooks.py (L34)
2016-08-14 22:19:03 +00:00
Ian Cordasco
a09c9acaaf Merge branch 'spelling' into 'master'
Spelling fixes



See merge request !119
2016-08-13 11:31:31 +00: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
608114a7a7 Merge branch 'master' into 'master'
Point documentation to http: instead of https:

The certificate at that URL is for `readthedocs.io`, so if you want to use https, it's best to use `flake8.readthedocs.io` and not `flake8.pycqa.org`.  As it is currently, you get a certificate error.

Note also that the `Code of Conduct` and `Getting Started Contributing` links are using `http` and pointing to the insecure domain, so if you do want https, you should change those as well.

See merge request !118
2016-08-11 16:52:30 +00:00
Daniel Quinn
4d9d325d3c Point documentation to http: instead of https:
The certificate at that URL is for `readthedocs.io`, so if you want to use https, it's best to use `flake8.readthedocs.io` and not `flake8.pycqa.org`.  As it is currently, you get a certificate error.

Note also that the `Code of Conduct` and `Getting Started Contributing` links are using `http` and pointing to the insecure domain, so if you do want https, you should change those as well.
2016-08-11 16:11:26 +00:00
Ian Cordasco
e8cb26895e Merge branch 'feature/207' into 'master'
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

See merge request !117
2016-08-11 00:19:58 +00:00
Ian Cordasco
2b77f2d9a0
Bump version to 3.1.0.dev0 2016-08-10 19:14:53 -05:00
Ian Cordasco
aa294d2b38
Set version to 3.0.4 2016-08-07 13:51:58 -05: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
f768ed6fd0 Merge branch 'add-code-coverage' into 'master'
Add coverage reporting and uploading



See merge request !116
2016-08-06 20:34:40 +00:00
Ian Cordasco
b995d56e19
Add coverage reporting and uploading
Upload our coverage data to codecov.io and aggregate it on test runs.
2016-08-06 15:21:50 -05:00
Ian Cordasco
d5a6cfcff9 Merge branch 're-add-error-codes' into 'master'
Replace list of violation codes

*Description of changes*

Replace the list of violation codes in the documentation.

*Related to:*  #206

See merge request !115
2016-08-06 13:58:50 +00: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
a8029ba2d5 Merge branch 'bug/205' into 'master'
Handle SyntaxErrors when tokenizing a file

*Description of changes*

This handles the SyntaxErrors raised by tokenize.generate_tokens.

*Related to:*  #205

See merge request !114
2016-08-06 12:59:52 +00:00
Ian Cordasco
78100de8c6
Handle SyntaxErrors when tokenizing a file
Closes #205
2016-08-06 07:44:20 -05:00
Ian Cordasco
7730a790f4 Merge branch 'release-notes/3.0.4' into 'master'
Set version to 3.0.4 and start release notes

*Description of changes*

Start tracking release notes for 3.0.4

See merge request !113
2016-08-05 22:58:37 +00:00
Ian Cordasco
a9be6feeae
Set version to 3.0.4 and start release notes 2016-08-05 17:53:53 -05:00
Ian Cordasco
ce94cfea69 Merge branch 'bug/179' into 'master'
Serialize Checkers PluginTypeManager to a dict

*Description of changes*

Try to side-step issues with attributes not being set/updated on plugins when used with multiprocessing and Queues.

*Related to:*  #179, #164 

See merge request !98
2016-08-05 19:58:29 +00:00
Ian Cordasco
1c07453ef7
Merge branch 'bug/203' 2016-08-05 06:45:29 -05:00
Ian Cordasco
f434e9adf5
Clean up usage of InvalidSyntax exception 2016-08-05 06:39:08 -05:00
Wouter Bolsterlee
cddf982a0a Do not treat AttributeError as if it were an IOError
...and avoid .strerror altogether since py3 does not have it.
See #203.
2016-08-05 11:16:27 +02:00
Wouter Bolsterlee
45ae0b9eeb Use str(exc) instead of exc.message
...since on py3 tokenize.TokenError does not have a 'message' attribute.
See #203.
2016-08-05 11:15:04 +02:00