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
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.
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.
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.
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.
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
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.
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
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
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