Commit graph

1227 commits

Author SHA1 Message Date
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
Ian Cordasco
9a4abfbcb4 Merge branch 'specify-required-parameters' into 'master'
Document how it determines when the plugin is run

*Description of changes*

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

See merge request !110
2016-08-05 00:23:40 +00:00
Ian Cordasco
240609edd4
Set-up default attributes for FlakesChecker 2016-08-03 16:48:39 -05:00
Ian Cordasco
c1d21393bf
Set dogfood testenv to Python 3.5
AppVeyor doesn't allow us to use `python3` to select the version of
Python 3.x that is linked as `python3.exe` so we must be explicit.
2016-08-03 16:48:39 -05:00
Ian Cordasco
a98e0d3648
Add dogfood testenv to AppVeyor list 2016-08-03 16:48:39 -05:00
Ian Cordasco
e14d0e6352
Serialize Checkers PluginTypeManager to a dict
It seems likely that the multiprocessing module on Windows is not
capable of serializing an object with the structure that we have and
preserving the attributes we dynamically set on plugins (like the
FlakesChecker). To avoid issues like this with all plugins (although
we have only found this on Windows with the FlakesChecker), let's try
serializing the Checkers PluginTypeManager to a dictionary so that the
only object that a Queue is really trying to serialize/deserialize is
the FlakesChecker itself.

Related to #179
2016-08-03 16:48:39 -05:00
Ian Cordasco
7e806824df Merge branch 'update-gitlab-ci' into 'master'
Update GitLab CI configuration

*Description of changes*

Update GitLab CI. After reading [GitLab's blog post](https://about.gitlab.com/2016/07/29/the-basics-of-gitlab-ci/) about their CI system, it seems that we can easily start generating build artifacts for PRs and regular pushes.

*Related to:*  N/A

See merge request !111
2016-08-03 12:41:08 +00:00
Ian Cordasco
75994bf2c9
Use python:2.7 for python 2.7 tests 2016-08-03 07:22:34 -05:00
Ian Cordasco
c8df0f88d1
Update GitLab CI configuration
Let's build artifacts after we've completed a test successfully. This
should allow folks to install the version of Flake8 from a PR easily.
2016-08-03 07:05:22 -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