mirror of
https://github.com/github/codeql.git
synced 2026-02-17 15:33:45 +01:00
24 lines
558 B
Plaintext
24 lines
558 B
Plaintext
/**
|
|
* @name Unused method
|
|
* @description Finds private methods that seem to never be used, or solely used from other dead methods
|
|
* @kind problem
|
|
* @problem.severity warning
|
|
* @precision low
|
|
* @id cs/unused-method
|
|
* @tags efficiency
|
|
* maintainability
|
|
* useless-code
|
|
* external/cwe/cwe-561
|
|
*/
|
|
|
|
import csharp
|
|
import DeadCode
|
|
|
|
from Method m
|
|
where
|
|
not extractionIsStandalone() and
|
|
m.fromSource() and
|
|
isDeadMethod(m) and
|
|
not m.getDeclaringType().isPartial()
|
|
select m, "Unused method (or method called from dead method only)."
|