Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flake8 support #51

Open
robvdl opened this issue May 29, 2014 · 4 comments
Open

Add flake8 support #51

robvdl opened this issue May 29, 2014 · 4 comments

Comments

@robvdl
Copy link

robvdl commented May 29, 2014

I would really like to add flake8 support, flake8 produces an output file that contains both pep8 and pyflakes violations, but in one file.

@tomasbjerre
Copy link
Contributor

Do you have a sample report that we can use when creating a parser?

@anze3db
Copy link

anze3db commented Feb 19, 2016

@tomasbjerre flake8 can you the same format as pylint:

[smotko:~/myproject]$ flake8 --format=pylint myproject
myproject/__init__.py:7: [F401] 'db' imported but unused
myproject/__init__.py:7: [F401] 'logger' imported but unused
myproject/__main__.py:8: [E401] multiple imports on one line
myproject/__main__.py:15: [F401] 'ggrc' imported but unused
myproject/__main__.py:19: [E402] module level import not at top of file
myproject/__main__.py:24: [E265] block comment should start with '# '
myproject/__main__.py:25: [E265] block comment should start with '# '
myproject/__main__.py:26: [E265] block comment should start with '# '
myproject/app.py:6: [F401] 'sys' imported but unused

But the issue is that I can't seem to figure out how to use the violations plugin for both pylint and flake8 at the same time. Any ideas?

@asfaltboy
Copy link

@Smotko shouldn't flake8 already include pylint results? If not, I believe it's possible to list multiple report files in the violation field (comma separated):

jenkins-4

Kindly let us know if using --format=pylint and the pylint violation field works for you.

@anze3db
Copy link

anze3db commented Oct 24, 2016

@asfaltboy No, flake8 does not include pylint. flake8 is a wrapper for PyFlakes, pep8 & Ned Batchelder’s McCabe script.

My current workaround is to use the pep8 field which seems to be compatible with flake8's default output.

I didn't know you can specify multiple files, thanks for pointing that out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants