Analyzing code with Pylint
Pylint is another open source static analyzer originally created by Logilab. Pylint is more complex than Pyflakes; it allows more customization. However, it is slower than Pyflakes. For more information check out http://www.logilab.org/card/pylint_manual.
In this recipe, we will again download the NumPy code from the Git repository—this step is omitted for brevity.
Getting ready
You can install Pylint from the source distribution. However, there are many dependencies, so you are better off installing with either easy_install
, or pip
. The installation commands are as follows:
easy_install pylint sudo pip install pylint
How to do it...
We will again analyze from the top directory of the NumPy codebase. Please notice that we are getting much more output. In fact, Pylint prints so much text that most of it had to be cut out here:
pylint *.py $ pylint *.py No config file found, using default configuration ************* Module pavement C: 60: Line too long (81/80) C:139...