Skip to content

Commit 2d246a4

Browse files
committed
QL for QL: fix checking spelling of 'analyze' in multi-line comments
`.` does not match a newline in `regexpMatch`, so we were missing some comments.
1 parent 0af1976 commit 2d246a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ql/ql/src/codeql_ql/style/docs/NonUSSpellingQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ predicate contains_non_us_spelling(string s, string wrong, string right) {
1818
wrong != "analyse"
1919
or
2020
// analyses (as a noun) is fine
21-
s.regexpMatch(".*analyse[^s].*") and
21+
s.regexpReplaceAll("[\\r\\n]", " ").regexpMatch(".*analyse[^s].*") and
2222
wrong = "analyse"
2323
)
2424
}

0 commit comments

Comments
 (0)