備忘録として。
コードメトリクス解析ツール
Radon
下記指標を計測可能。
- 循環的複雑度(Cyclomatic complexity)
- 保守容易性指数(Maintainability Index )
循環的複雑度(Cyclomatic complexity)の計測例。
radon cc -s -e "*/tests/*" --min F src/
保守容易性指数(Maintainability Index )の計測例。
radon mi -s -e "*/tests/*" --min C src/
静的解析ツール
Bandit
SAST/Static Application Security Testing(静的セキュリティ検査)ツール。
bandit -r src -s B101,B105,B106 -x **tests/** -n 3 -ll