Pylint is another open source static analyzer originally created by Logilab. Pylint is more complex than Pyflakes; it allows more customization and code checks. However, it is slower than Pyflakes. For more information, check out the manual at http://www.logilab.org/card/pylint_manual.
In this recipe, we again download the NumPy code from the Git repository—this step has been omitted for brevity.
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
We will again analyze from the top directory of the NumPy codebase. Notice that we get more output. In fact, Pylint prints so much text that most of it had to be omitted here:
$ pylint *.py No config file found, using default configuration ************* Module pavement C: 60: Line too long (81/80) C:139...