mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Rename QL elements that refer to local classes
This commit is contained in:
@@ -38,7 +38,7 @@ where
|
||||
// class. We keep anonymous class counts, because anonymous classes are not reported
|
||||
// separately.
|
||||
sum(LocalClassOrInterface localClass |
|
||||
localClass.getLocalClassDeclStmt().getEnclosingCallable() = deadMethod
|
||||
localClass.getLocalTypeDeclStmt().getEnclosingCallable() = deadMethod
|
||||
|
|
||||
localClass.getNumberOfLinesOfCode()
|
||||
)
|
||||
|
||||
@@ -122,8 +122,8 @@ where
|
||||
not abortsControlFlow(s) and
|
||||
// Exclude the double semicolon case `if (cond) s;;`.
|
||||
not t instanceof EmptyStmt and
|
||||
// `LocalClassDeclStmt`s yield false positives since their `Location` doesn't include the `class` keyword.
|
||||
not t instanceof LocalClassDeclStmt
|
||||
// `LocalTypeDeclStmt`s yield false positives since their `Location` doesn't include the `class` keyword.
|
||||
not t instanceof LocalTypeDeclStmt
|
||||
select s,
|
||||
"Indentation suggests that $@ belongs to $@, but this is not the case; consider adding braces or adjusting indentation.",
|
||||
t, "the next statement", c, "the control structure"
|
||||
|
||||
Reference in New Issue
Block a user