Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 844eef1

Browse files
committed
QL for QL: add predicate for other typos not in the shared typo db
1 parent 6058352 commit 844eef1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ql/ql/src/codeql_ql/style/MisspellingQuery.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ private import TypoDatabase
44

55
predicate misspelling(string wrong, string right, string mistake) {
66
mistake = "common misspelling" and
7-
typos(wrong, right)
7+
(typos(wrong, right) or additional_typos(wrong, right))
88
or
99
mistake = "non-US spelling" and
1010
non_us_spelling(wrong, right)
1111
}
1212

13+
predicate additional_typos(string wrong, string right) {
14+
wrong = "tranformer" and right = "transformer"
15+
}
16+
1317
/**
1418
* Holds if `word` is an acceptable spelling that would otherwise be considered
1519
* a mistake by the typo database.

0 commit comments

Comments
 (0)