mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
Python: ObjectAPI to ValueAPI: OverlyComplexDelMethod: Adds preliminary modernization
This commit is contained in:
@@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
import python
|
import python
|
||||||
|
|
||||||
from FunctionObject method
|
from FunctionValue method
|
||||||
where
|
where
|
||||||
exists(ClassObject c |
|
exists(ClassValue c |
|
||||||
c.declaredAttribute("__del__") = method and
|
c.declaredAttribute("__del__") = method and
|
||||||
method.getFunction().getMetrics().getCyclomaticComplexity() > 3
|
method.getScope().getMetrics().getCyclomaticComplexity() > 3
|
||||||
)
|
)
|
||||||
select method, "Overly complex '__del__' method."
|
select method, "Overly complex '__del__' method."
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
| protocols.py:74:5:74:22 | Function __del__ | Overly complex '__del__' method. |
|
| protocols.py:74:5:74:22 | Function MegaDel.__del__ | Overly complex '__del__' method. |
|
||||||
|
|||||||
Reference in New Issue
Block a user