Files
codeql/python/ql/src/Metrics/NumberOfParametersWithoutDefault.ql
Taus 24a29f46be Python: Fix all metrics-related compilation failures
In hindsight, having a `.getMetrics()` method that just returns `this`
is somewhat weird. It's possible that it predates the existence of the
inline cast, however.
2025-11-26 21:28:51 +00:00

18 lines
500 B
Plaintext

/**
* @name Number of parameters without defaults
* @description The number of parameters of a function that do not have default values defined.
* @kind treemap
* @id py/number-of-parameters-without-default-per-function
* @treemap.warnOn highValues
* @metricType callable
* @metricAggregate avg max
* @tags testability
* complexity
*/
import python
private import LegacyPointsTo
from FunctionMetrics func
select func, func.getNumberOfParametersWithoutDefault() as n order by n desc