Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c46e5c commit 2b5e3aeCopy full SHA for 2b5e3ae
1 file changed
javascript/ql/src/Declarations/SuspiciousMethodNameDeclaration.ql
@@ -34,14 +34,14 @@ where
34
35
// Cases to ignore.
36
not (
37
- // Assume that a "new" method is intentional if the class has an explicit constructor.
38
- name = "new" and
39
- container instanceof ClassDefinition and
40
- exists(ConstructorDeclaration constructor |
+ // Assume that a "new" method is intentional if the class has an explicit constructor.
+ name = "new" and
+ container instanceof ClassDefinition and
+ exists(ConstructorDeclaration constructor |
41
container.getMember("constructor") = constructor and
42
not constructor.isSynthetic()
43
)
44
- or
+ or
45
// Explicitly declared static methods are fine.
46
container instanceof ClassDefinition and
47
member.isStatic()
0 commit comments