Metrics – tools for static analysis

Static code analysis tools can provide a rich summary of information on the static properties of your code, which can provide insights into aspects such as complexity and modifiability/readability of the code.

Python has a lot of third-party tool support, which helps in measuring the static aspects of Python code such as these:

  • Conformance to coding standards such as PEP-8
  • Code complexity metrics such as the McCabe metric
  • Errors in code such as syntax errors, indentation issues, missing imports, variable overwrites, and others
  • Logic issues in code
  • Code smells

The following are some of the most popular tools in the Python ecosystem that can perform such static analysis:

  • Pylint: Pylint is a static checker for Python code, ...

Get Software Architecture with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.