How can I analyze Python code to identify problematic areas?

前端 未结 8 1896
鱼传尺愫
鱼传尺愫 2020-12-07 06:58

I have a large source repository split across multiple projects. I would like to produce a report about the health of the source code, identifying problem areas that need to

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 07:42

    For cyclomatic complexity you can use radon: https://github.com/rubik/radon

    (Use pip to install it: pip install radon)

    Additionally it also has these features:

    • raw metrics (these include SLOC, comment lines, blank lines, &c.)
    • Halstead metrics (all of them)
    • Maintainability Index (the one used in Visual Studio)

提交回复
热议问题