python static analysis tools

24
STATIC ANAYLSIS A TOUR OF PYTHON TOOLS Created by Jason A Myers / @jasonamyers

Upload: jason-myers

Post on 13-Apr-2017

495 views

Category:

Technology


0 download

TRANSCRIPT

STATIC ANAYLSISA TOUR OF PYTHON TOOLS

Created by Jason A Myers / @jasonamyers

STATIC ANALYSIS

PEP8

PYFLAKESNames which are used but not defined or used beforethey are definedNames which are redefined without having been used

PYROMAChecks setup.py files for errors and issues

PEP257Checks that docstrings match PEP257 standards

VULTUREChecks for unused code

PYLINTLooks at your project as a whole and reports back very

detailed information on Code Standards, ineffecient code,errored implementation code, and duplicate code

COMPLEXITYImperfect science

MCCABE/CYCLOMATIC COMPLEXITYFocuses on decisions made in software

HALSTEAD COMPLEXITYFocuses on Volume, Difficulty, and Effort

MAINTAINABILITY INDEXFocuses on ease to support and change

MCCABE

RADON

DODGY

BANDIT

FLAKE8Flake8 is a wrapper around these tools: PyFlakes, pep8, and

McCabe.

PROSPECTORRUN ALL THE THINGS!

Combines: PyLint, PEP8, pyflakes, McCabe, dodgy, andPEP257

Optionally: Pyroma and Vulture

PRE-COMMITRuns before if lets you create a commit on your machine

QUESTIONS?