Commit graph

495 commits

Author SHA1 Message Date
Ian Cordasco
ea456614b5 Update version and release notes for 2.4.0 2015-03-07 20:42:08 -06:00
Ian Cordasco
6536f2285d Merge branch 'tox_remove_py25' into 'master'
Tox remove py25

Now maybe py25 is important to support and maybe you have a CI process that installs some older version of tox so that you can test Python 2.5, in which case you can close this, though if that's the case then maybe we should make a note of that fact and what version of tox to use, etc.

See merge request !22
2015-03-08 02:24:17 +00:00
Ian Cordasco
a66815ffa6 Merge branch 'christianmlong/issue/8' 2015-03-07 20:22:11 -06:00
Ian Cordasco
a6fc242c5e Slightly simplify our conditionals
Test warnings by default
2015-03-07 20:21:58 -06:00
Ian Cordasco
0e2b873c38 Add compatibility layer for Python 2.6
os.path.relpath on Python 2.6 returns slightly different output than it
does on 2.7. Rather than try to write tests around the behaviour, it
makes sense to have a common relpath function that behaves the same on
every version.
2015-03-06 23:43:36 -06:00
Ian Cordasco
7ab30a747f Merge branch 'local/pr/2'
Conflicts:
	flake8/hooks.py
2015-03-06 23:26:44 -06:00
Ian Cordasco
c084211e9e Merge remote-tracking branch 'origin/gh/2' 2015-03-06 23:04:49 -06:00
Ian Cordasco
84c8dd5e8d Simplify @mpenkov's fix for exclude in git hooks
The simpler fix is to ensure that the filename isn't the full path to
the temporary file before we check to see if it should be excluded or if
it should even match.

This also fixes a bug I found while testing the pull request in which no
files are checked.
2015-03-06 23:01:30 -06:00
Ian Cordasco
500a64f040 Add notes for updates to git hook 2015-03-06 20:55:25 -06:00
Ian Cordasco
54946334db WIP 2015-03-06 19:47:55 -06:00
Christian Long
59ae3dfec7 Add --verbose flag, and tests for it.
The new warnings associated with the --jobs argument should only appear when
the --verbose flag is passed.
2015-03-06 15:34:02 -06:00
Christian Long
c3f5d144bc Add warnings when --jobs is invalid
Some platforms and options are not compatible with the --jobs option. For
example, it is not valid on Windows. Nor is it compatible with the --diff
option. This adds warnings when the --jobs option is supplied but is not
allowed.
2015-03-06 14:45:33 -06:00
Marc Abramowitz
8ef2462e6e tox.ini: Remove py25
because tox doesn't support it yet.

    ERROR:   py25: UnsupportedInterpreter: python2.5 is not supported anymore, sorry
2015-03-05 09:15:50 -08:00
Christian Long
a9f375aa93 Fix tests on Windows
The tests were failing on Windows. On Windows, the jobs argument never gets
converted to an int (engine.get_style_guide line 133) This resulted in
AssertionError '2' != 2. So, do the int conversion in the test. Also, on
Winddows, the call count is always 0, no matter the jobs argument.
2015-02-23 16:52:11 -06:00
Ian Cordasco
bc18d8e2d1 Use the default ReadTheDocs theme 2015-02-22 22:37:13 -06:00
Ian Cordasco
ba344c8ded Refactor some bits of flake8.hooks 2015-02-22 22:29:13 -06:00
Ian Cordasco
eae9a6a3db Merge branch 'use_git_config_in_hook' into 'master'
Use git config in hook

Get parameter's value using `git config` before trying `os.environ`.

See merge request !20
2015-02-23 03:58:52 +00:00
Ian Cordasco
7c132d1c33 Update release notes, dependencies, and version
Closes #32
2015-02-22 12:13:30 -06:00
Ian Cordasco
96817b40b2 Merge branch 'issue/31' into 'master'
Add FileQReport to replace pep8's FileReport when using multiprocessing

See merge request !21
2015-02-22 18:05:41 +00:00
Ian Cordasco
d6a5df1e58 Truly mimic pep8's -q functionality
When the user only passes -q once, print the filenames. If they pass -qq then
don't print anything.

Closes #31
2015-02-22 11:40:57 -06:00
Oleg Broytman
836d66a11f Document configuration file settings 2015-02-16 07:32:17 +03:00
Oleg Broytman
d03b526913 Use git config before os.environ
Get parameter's value using git config before trying os.environ.
2015-02-16 07:32:17 +03:00
Oleg Broytman
4d9a88298b Minor refactoring 2015-02-16 06:09:43 +03:00
Michael Penkov
de9fd7d6a2 Adding unit tests for fix in 218949a 2015-02-07 16:33:35 +09:00
Ian Cordasco
2f577791db Bump version to 2.3.0 and update changelog 2015-01-04 14:49:07 -06:00
Ian Cordasco
b4f9f8e8ae Add release to tox.ini 2015-01-04 14:31:19 -06:00
Ian Cordasco
6b27451e57 Merge branch 'feature/output-file' into 'master'
Add --output-file option

Addresses #15

This is, however, unfortunately affected by #17. That will need to be fixed before this can be merged.

See merge request !15
2014-12-27 15:33:31 +00:00
Ian Cordasco
8adb88cf11 Add --output-file option
Closes #15
2014-12-27 09:07:10 -06:00
Ian Cordasco
c761d22876 Merge branch 'feature/register-optional-checks' into 'master'
Allow for optional checks

See merge request !14
2014-12-27 15:05:11 +00:00
Ian Cordasco
a239fe7b1c Merge branch 'fix-17' into 'master'
flush() for each line

Fixes #17

See merge request !16
2014-12-27 15:00:56 +00:00
INADA Naoki
776b93a72b Fix missing import 2014-12-27 19:25:30 +09:00
INADA Naoki
2eec485a65 flush() for each print() 2014-12-27 18:03:53 +09:00
Ian Cordasco
2d5a6b1670 Prevent unintended behaviour modifying options.ignore
Previously, it was entirely plausible for us to remove something from
options.ignore overzealously. This is more confined logic and much more akin
to what I was intending the behaviour to be.
2014-12-18 15:25:37 -06:00
Ian Cordasco
b301532636 Add ability to turn checks off by default 2014-12-18 15:11:26 -06:00
Ian Cordasco
07677578b4 Merge branch 'feature/continuous-integration' into 'master'
Continuous Integration Updates

- Add `.travis.yml` for GitHub (first set of tests were run [here](https://travis-ci.org/PyCQA/flake8/builds/44403113))

- Update `tox.ini` to add

 - `py25` environment

 - `py{27,34}-flake8` environments

See merge request !12 (https://gitlab.com/pycqa/flake8/merge_requests/12)
2014-12-18 01:29:15 +00:00
Ian Cordasco
18c51d0d25 Add configuration so Travis will run on our mirror 2014-12-17 18:55:24 -06:00
Ian Cordasco
a152f10d4c Ensure flake8 passes itself in tests 2014-12-17 18:51:57 -06:00
Ian Cordasco
48a256b583 Merge branch 'extra_include_eggs' into 'master'
Extra include eggs

Add `.eggs` and `*.egg` to `EXTRA_EXCLUDE`

This is because these are usually downloaded by setuptools and they're usually other people's code so you don't want to check them.

```
[marca@marca-mac2 requests-unixsocket]$ flake8
./.eggs/pbr-0.10.0-py2.7.egg/pbr/packaging.py:740:17: E265 block comment should start with '# '
./pbr-0.10.0-py3.4.egg/pbr/packaging.py:740:17: E265 block comment should start with '# '
```

See merge request !10
2014-12-06 04:19:58 +00:00
Ian Cordasco
73b334a6e4 Merge branch 'master' into 'master'
Exit Flake8Command.run() cleanly if style checks pass

When using distutils/setuptools, it is common to perform several commands in sequence. For example: `python setup.py flake8 bdist_egg`. When `run()` exits by raising a `SystemExit` exception, it causes the entire chain to break - meaning flake8 cannot be used in combination with any other command.

This change simply alters the behavior to exit normally if there were no style violations found. Otherwise, it will exit immediately, as before, with a non-zero exit code.

See merge request !8
2014-12-06 03:49:30 +00:00
Marc Abramowitz
d95cf46f72 Add .eggs and *.egg to EXTRA_EXCLUDE 2014-11-25 10:24:27 -08:00
Ian Cordasco
997d291b9f Merge branch 'testing' into 'master'
Add first pass at integration style tests

See merge request !9
2014-11-14 19:08:05 +00:00
Michael Penkov
218949a3aa Correctly handle exclude patterns in git_hook 2014-11-11 21:15:58 +09:00
Joe Gordon
8b4bbd23bf Add first pass at integration style tests
In order to better prevent regressions (such as related to concurrency),
Add a integration test framework to simulate running flake8 with
arguments.
2014-10-31 20:45:59 -07:00
Josh
236e0f0ea1 Do not exit early if style checks pass 2014-10-28 06:02:24 +00:00
Ian Cordasco
247877b7c5 Prepare release 2.2.5 2014-10-19 21:26:24 -05:00
Ian Cordasco
467233f185 Merge branch 'flush_stdout' into 'master'
Flush stdout

As noted in email, it seems that failing to flush stdout in the sub-processes means that some output might go missing. I've observed this in practice with Syntastic in Vim. Here I flush both stdout and stderr before sending the message back to the main process that will allow it to continue. This makes the problem disappear for me.

It occurs to me that if sub-processes are producing output independently, there is also be a risk that they will badly interleave their output. I haven't looked into this - my primary concern is invocation for a single file at a time.

See merge request !7
2014-10-20 01:31:31 +00:00
Weeble
6e08711622 Flush all subprocess output before exit
Subprocesses write to stdout. They must flush their output before the
main process exits to avoid losing output or confusing the calling
program.
2014-10-19 18:06:19 +01:00
Ian Cordasco
26f909b282 Merge branch 'ignore' into 'master'
make flake8 pass in dirty flake8 root directory

See merge request !6
2014-10-15 22:14:16 +00:00
Joe Gordon
dc5ffac75c Make flake8 pass in root directory
Add exclude list to tox.ini
2014-10-15 15:07:12 -07:00
Ian Cordasco
832ecb63aa Merge branch 'setupdevelop' into 'master'
Add usedevelop to tox.ini

See merge request !5
2014-10-15 21:06:55 +00:00