Files
codeql/python/ql/src/Metrics/NumberOfParametersWithoutDefault.ql
Taus e8de8433f4 Python: Update all metrics-dependant queries
The ones that no longer require points-to no longer import
`LegacyPointsTo`. The ones that do use the specific
`...MetricsWithPointsTo` classes that are applicable.
2026-02-19 12:32:27 +00:00

17 lines
470 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
from FunctionMetrics func
select func, func.getNumberOfParametersWithoutDefault() as n order by n desc