mirror of
https://github.com/github/codeql.git
synced 2026-04-06 15:44:01 +02:00
The ones that no longer require points-to no longer import `LegacyPointsTo`. The ones that do use the specific `...MetricsWithPointsTo` classes that are applicable.
21 lines
630 B
Plaintext
21 lines
630 B
Plaintext
/**
|
|
* @name Cyclomatic complexity of functions
|
|
* @description The cyclomatic complexity per function (an indication of how many tests are necessary,
|
|
* based on the number of branching statements).
|
|
* @kind treemap
|
|
* @id py/cyclomatic-complexity-per-function
|
|
* @treemap.warnOn highValues
|
|
* @metricType callable
|
|
* @metricAggregate avg max sum
|
|
* @tags testability
|
|
* complexity
|
|
* maintainability
|
|
*/
|
|
|
|
import python
|
|
private import LegacyPointsTo
|
|
|
|
from FunctionMetricsWithPointsTo func, int complexity
|
|
where complexity = func.getCyclomaticComplexity()
|
|
select func, complexity order by complexity desc
|