mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
fix all ql/use-string-compare
This commit is contained in:
@@ -2286,9 +2286,7 @@ class ComprehensionExpr extends @comprehension_expr, Expr {
|
||||
|
||||
/** Holds if this is a legacy postfix comprehension expression. */
|
||||
predicate isPostfix() {
|
||||
exists(Token tk | tk = this.getFirstToken().getNextToken() |
|
||||
not tk.getValue().regexpMatch("if|for")
|
||||
)
|
||||
exists(Token tk | tk = this.getFirstToken().getNextToken() | not tk.getValue() = ["if", "for"])
|
||||
}
|
||||
|
||||
override string getAPrimaryQlClass() { result = "ComprehensionExpr" }
|
||||
|
||||
@@ -19,7 +19,7 @@ private predicate xUnitDetected() {
|
||||
private predicate possiblyAttribute(Expr e, string name) {
|
||||
exists(Identifier id | id = e or id = e.(CallExpr).getCallee() |
|
||||
name = id.getName() and
|
||||
name.regexpMatch("Async|Data|Fact|Fixture|Import|ImportJson|Skip|Trait")
|
||||
name = ["Async", "Data", "Fact", "Fixture", "Import", "ImportJson", "Skip", "Trait"]
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user