mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Autoformat
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import java
|
||||
|
||||
RefType getARelevantCollectionType() {
|
||||
result.hasQualifiedName(["java.util", "kotlin.collections"], ["Abstract", ""] + ["Mutable", ""] + ["Collection", "List", "Map"])
|
||||
result
|
||||
.hasQualifiedName(["java.util", "kotlin.collections"],
|
||||
["Abstract", ""] + ["Mutable", ""] + ["Collection", "List", "Map"])
|
||||
}
|
||||
|
||||
class RelevantMethod extends Method {
|
||||
|
||||
RelevantMethod() { this.getDeclaringType().getSourceDeclaration() = getARelevantCollectionType() }
|
||||
|
||||
}
|
||||
|
||||
// Check for methods with suspicious twins -- probably another extraction of the same method outline which was given a different trap key.
|
||||
@@ -18,7 +18,7 @@ query predicate methodWithDuplicate(string methodName, string typeName) {
|
||||
not dup.getName() = ["of", "remove", "toArray"] and // These really do have overloads with the same parameter count, so it isn't trivial to tell if they are intentional overloads or inappropriate duplicates.
|
||||
dup.getNumberOfParameters() = m.getNumberOfParameters() and
|
||||
dup.getDeclaringType() = m.getDeclaringType() and
|
||||
dup != m and
|
||||
dup != m and
|
||||
methodName = m.getName() and
|
||||
typeName = m.getDeclaringType().getName()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user