mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
fix most ql-for-ql warnings in JS
This commit is contained in:
@@ -17,7 +17,7 @@ import javascript
|
||||
* Holds if the method name on the given container is likely to be a mistake.
|
||||
*/
|
||||
predicate isSuspiciousMethodName(string name, ClassOrInterface container) {
|
||||
name = "function"
|
||||
name = "function" and exists(container) // suspicious in any container
|
||||
or
|
||||
// "constructor" is only suspicious outside a class.
|
||||
name = "constructor" and not container instanceof ClassDefinition
|
||||
|
||||
Reference in New Issue
Block a user