Skip to content

DCR - Developing - Static Code Analysis

GitHub (Pre-)Release GitHub (Pre-)Release Date

The tools Bandit, Flake8, Mypy and Pylint are used for static code analysis:

  • Bandit - Bandit is a tool designed to find common security issues in Python code.
  • Flake8 - A Python tool that glues together pycodestyle, Pyflakes, McCabe, and third-party plugins to check the style and quality of some Python code.
  • mypy - Optional static typing for Python.
  • Pylint - It's not just a linter that annoys you!

All these tools are included in the call make lint as well as in the call make dev. They can be executed individually with make bandit, make flake8, make mypy and make pylint.

Flake8 includes the following tools:

  • McCabe - McCabe complexity checker for Python.
  • pycodestyle - Simple Python style checker in one Python file.
  • Pyflakes - A simple program which checks Python source files for errors.
  • Radon - Various code metrics for Python code.