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

Flake8/PEP-8 checks for PRs #3

Closed
icemac opened this issue Mar 14, 2019 · 4 comments
Closed

Flake8/PEP-8 checks for PRs #3

icemac opened this issue Mar 14, 2019 · 4 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@icemac
Copy link
Member

icemac commented Mar 14, 2019

See https://pep8speaks.com which provides a GitHub app to automatically check PRs for Flake8 violations.

Pros:

  • Improved visibility of Flake8 violations in the PR (better than running a Flake8 job via TravisCI which only makes TravisCI red without telling that only Flake8 is violated)

Cons:

  • Each repository needs a special config yaml file.
@icemac icemac added enhancement New feature or request question Further information is requested labels Mar 14, 2019
@dataflake
Copy link
Member

IMHO a much better idea than a completely failing a Travis CI job. Travis CI should only fail if there are real issues.

@mgedmin
Copy link
Member

mgedmin commented Mar 18, 2019

pep8speaks looks very interesting! It will look even more appealing if they implement support for GitHub Checks API instead of spamming PRs with comments like coveralls used to do.

Each repository needs a special config yaml file.

https://github.com/OrkoHunter/pep8speaks/#configuration says "A config file is not required for the integration to work."

OTOH I don't know if the defaults are fine for ZF repos (e.g. apparently it uses pycodestyle instead of flake8 by default).

I wonder if we could submit an upstream PR to default to flake8 when it finds a flake8 section in setup.cfg?

@jugmac00
Copy link
Member

For my own and my companies projects I use pre-commit, ie the commit fails when there are flake8 issues. So there is no big chance that only CI detects flake8 violations. But certainly, CI also does flake8 checks - via tox. And to complete the loop, one could trigger pre-commit from tox.

=> no external GitHub app dependencies
=> no more "please flake8" commits

@icemac
Copy link
Member Author

icemac commented May 15, 2020

We are adding tox environments to lint the code using https://github.com/zopefoundation/meta/blob/master/config/config-package.py.
So this issue will be solved over time as more packages are switched to the new template.

@icemac icemac closed this as completed May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants