Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checkstyle for Python

Is there an application similar to Java's Checkstyle for Python?

By which I mean, a tool that analyzes Python code and can be run as part of continuous integration (e.g. CruiseControl or Hudson). After analyzing, it should produce an online accessible report which outlines any problems found in the code.

Thank you,

like image 964
oneself Avatar asked Jun 04 '10 21:06

oneself


People also ask

Is checkstyle a coding standard?

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard.

What is the use of checkstyle?

Checkstyle is a static code analysis tool used in software development for checking if Java source code is compliant with specified coding rules. Originally developed by Oliver Burn back in 2001, the project is maintained by a team of developers from around the world.

Does Python have Linter?

There are many Python linters that you can leverage in your day-to-day work. The logical lint tells us about actual code errors and the statistical lint helps the programer spot formatting issues.


1 Answers

There are actually a lot of tools: as other have said

  • pylint : very very strict (imho too much), yet customizable
  • pep-8 : very good
  • pychecker
  • pyflakes: extremely fast, perfect when used in emacs with flymake.

To format your code according to pep8 I can suggest you PythonTidy

like image 93
pygabriel Avatar answered Sep 24 '22 13:09

pygabriel