All Projects → OrkoHunter → Pep8speaks

OrkoHunter / Pep8speaks

Licence: mit
A GitHub app to automatically review Python code style over Pull Requests

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pep8speaks

static-code-analysis-plugin
A plugin to simplify Static Code Analysis on Gradle. Not restricted to, but specially useful, in Android projects, by making sure all analysis can access the SDK classes.
Stars: ✭ 36 (-93.41%)
Mutual labels:  static-code-analysis, linter, static-analysis, code-quality
tryceratops
A linter to prevent exception handling antipatterns in Python (limited only for those who like dinosaurs).
Stars: ✭ 381 (-30.22%)
Mutual labels:  styleguide, static-code-analysis, linter, static-analysis
codeclimate-eslint
Code Climate Engine for ESLint
Stars: ✭ 86 (-84.25%)
Mutual labels:  static-code-analysis, linter, static-analysis, code-quality
sonar-css-plugin
SonarQube CSS / SCSS / Less Analyzer
Stars: ✭ 46 (-91.58%)
Mutual labels:  styleguide, linter, static-analysis, code-quality
Pylint
It's not just a linter that annoys you!
Stars: ✭ 3,733 (+583.7%)
Mutual labels:  static-analysis, linter, static-code-analysis, code-quality
Sonar Jproperties Plugin
SonarQube Java Properties Analyzer
Stars: ✭ 5 (-99.08%)
Mutual labels:  static-analysis, linter, styleguide, code-quality
sonar-gherkin-plugin
SonarQube Cucumber Gherkin Analyzer
Stars: ✭ 33 (-93.96%)
Mutual labels:  styleguide, linter, static-analysis, code-quality
Cflint
Static code analysis for CFML (a linter)
Stars: ✭ 156 (-71.43%)
Mutual labels:  static-analysis, linter, static-code-analysis, code-quality
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+731.68%)
Mutual labels:  static-analysis, linter, static-code-analysis, code-quality
Flake8
The official GitHub mirror of https://gitlab.com/pycqa/flake8
Stars: ✭ 1,112 (+103.66%)
Mutual labels:  static-analysis, linter, styleguide, static-code-analysis
Static Analysis
⚙️ A curated list of static analysis (SAST) tools for all programming languages, config files, build tools, and more.
Stars: ✭ 9,310 (+1605.13%)
Mutual labels:  static-analysis, linter, static-code-analysis, code-quality
Pmd
An extensible multilanguage static code analyzer.
Stars: ✭ 3,667 (+571.61%)
Mutual labels:  static-analysis, linter, static-code-analysis, code-quality
lints
Lint all your JavaScript, CSS, HTML, Markdown and Dockerfiles with a single command
Stars: ✭ 14 (-97.44%)
Mutual labels:  static-code-analysis, linter, static-analysis
elm-review
Analyzes Elm projects, to help find mistakes before your users find them.
Stars: ✭ 195 (-64.29%)
Mutual labels:  static-code-analysis, linter, code-quality
codeclimate-phpcodesniffer
Code Climate Engine for PHP Code Sniffer
Stars: ✭ 27 (-95.05%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
unimport
A linter, formatter for finding and removing unused import statements.
Stars: ✭ 119 (-78.21%)
Mutual labels:  static-code-analysis, linter, static-analysis
codeclimate-duplication
Code Climate engine for code duplication analysis
Stars: ✭ 96 (-82.42%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (-79.49%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Wotan
Pluggable TypeScript and JavaScript linter
Stars: ✭ 271 (-50.37%)
Mutual labels:  static-analysis, linter, code-quality
Pytype
A static type analyzer for Python code
Stars: ✭ 3,545 (+549.27%)
Mutual labels:  static-analysis, linter, static-code-analysis

PEP 8 Speaks CircleCI GitHub release GitHub contributors Say Thanks! Donate on liberapay

A GitHub app to automatically review Python code style over Pull Requests

Table of Contents

Installation

Example

Main features

  • The bot makes a single comment on the Pull Request and keeps updating it on new commits. No hustle on emails !
  • The bot comments only if Python files are involved. So, install the integration on all of your repositories. The bot would not comment where it should not.
  • By default, the bot does not comment if there are no PEP 8 issues. You can change this in configuration.
  • You can use choose between pycodestyle or flake8 as your linter. The bot can read configurations for both.
  • The bot can read your setup.cfg for [flake8] and [pycodestyle] sections. Check out the Configuration section below.

Configuration

A config file is not required for the integration to work. However it can be configured additionally by adding a .pep8speaks.yml file in the root of the project. Here is an example :

# File : .pep8speaks.yml

scanner:
    diff_only: True  # If False, the entire file touched by the Pull Request is scanned for errors. If True, only the diff is scanned.
    linter: pycodestyle  # Other option is flake8

pycodestyle:  # Same as scanner.linter value. Other option is flake8
    max-line-length: 100  # Default is 79 in PEP 8
    ignore:  # Errors and warnings to ignore
        - W504  # line break after binary operator
        - E402  # module level import not at top of file
        - E731  # do not assign a lambda expression, use a def
        - C406  # Unnecessary list literal - rewrite as a dict literal.
        - E741  # ambiguous variable name

no_blank_comment: True  # If True, no comment is made on PR without any errors.
descending_issues_order: False  # If True, PEP 8 issues in message will be displayed in descending order of line numbers in the file

message:  # Customize the comment made by the bot
    opened:  # Messages when a new PR is submitted
        header: "Hello @{name}! Thanks for opening this PR. "
                # The keyword {name} is converted into the author's username
        footer: "Do see the [Hitchhiker's guide to code style](https://goo.gl/hqbW4r)"
                # The messages can be written as they would over GitHub
    updated:  # Messages when new commits are added to the PR
        header: "Hello @{name}! Thanks for updating this PR. "
        footer: ""  # Why to comment the link to the style guide everytime? :)
    no_errors: "There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 "

Notes:

  • Default settings are in data/default_pep8speaks.yml. Your .pep8speaks.yml will override these values.
  • For every Pull Request, the bot looks for .pep8speaks.yml in the base branch (the existing one). If the file is not found, it then searches the head branch (the incoming changes).
  • Set the value of scanner.linter to either pycodestyle or flake8
    • flake8 is a wrapper around pycodestyle with additional enforcements.
  • For linter configurations (like ignore or max-line-length), PEP8Speaks will look and prioritize configurations in the following order :
    • pycodestyle: or flake8: section of .pep8speaks.yml.
      • This depends upon the scanner.linter value.
    • [pycodestyle] or [flake8] section of setup.cfg file in the root of the project.
      • This is independent of scanner.linter. So, [flake8] section of setup.cfg will also work for pycodestyle.
  • Read more on pycodestyle and flake8 documentation.

Popular Users

Organization Description
Pandas Powerful data manipulation tools for Python
Adobe Open source from Adobe
openSUSE Linux distribution
PyTorch Lightning The lightweight PyTorch wrapper for ML researchers.
NetworkX Python library for graph theory and complex networks
Statsmodels Statistical modeling and econometrics in Python
xarray (PyData) N-D labeled arrays and datasets in Python (Python for Data)
SunPy Python for Solar Physics
Astropy Astronomy in Python
Scikit Learn Contrib scikit-learn compatible projects
Scikit Image Image processing in Python
Spyder IDE The Scientific Python Development Environment
Catalyst PyTorch framework for Deep Learning research and development

See the complete list of organizations and users.

Miscellaneous features

  • Comment @pep8speaks suggest diff in a comment of the PR, and it will comment a gist of diff suggesting fixes for the PR. Example
  • Comment @pep8speaks pep8ify on the PR and it will create a Pull Request with changes suggested by autopep8 against the branch of the author of the PR. autopep8 fixes most of the errors reported by pycodestyle.
  • Add [skip pep8] anywhere in the commit message, PR title or PR description to prohibit pep8speaks from commenting on the Pull Request.

Private repos

This app will only work for publicly hosted repositories. So if you are looking to deploy a fork or use the app for private repositories, here are the instructions.

How to fix PEP 8 issues?

  • Check the errors locally by the command line tool pycodestyle (previously known as pep8).
  • autopep8 is another command line tool to fix the issues.
  • Also, see black

Release announcements

Updates to the app are announced using the GitHub Release feature over here. A lot of major changes are made as the community grows bigger. Click on Watch -> Releases only on top of the page, to get notified about new configurations or feature updates.

Usually, the master branch is deployed as soon as Pull Requests are merged in the repository. However, on every Friday, I make a release and make sure the latest code is deployed. You do not need to do anything to use the latest version. If you use a fork of PEP 8 Speaks, check out the Release space.

Contributing

You can support the project by contributing to its development. If you have any suggestions for new features or improvements, please create an issue. Pull Requests are most welcome ! Read CONTRIBUTING doc to understand how the project works and how you can make changes.

The project requires to be hosted on a server and due to which, it needs financial support as well.

Please read the case for funding PEP 8 Speaks.

Donate paypal

If you use this project and you like it, please let me know. Thanks!

❤️

This project does not endorse all of the rules of the original PEP 8 and thus believes in customizing pycodestyle.

.

Gold Sponsors

Become a Gold Sponsor and get your logo and name with a link to your site on our README and our website.



Python Software Foundation



Weblate

Silver Sponsors

Become a Silver Sponsor and get your logo and name with a link to your site on our README and our website.



CCExtractor



Sudhanshu Mishra

Updates

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].