Autoformat

This commit is contained in:
Chris Smowton
2022-05-27 13:36:55 +01:00
parent a0d5d414b4
commit 9c62b349ec

View File

@@ -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()
)