mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
QL for QL: add predicate for other typos not in the shared typo db
This commit is contained in:
@@ -4,12 +4,16 @@ private import TypoDatabase
|
||||
|
||||
predicate misspelling(string wrong, string right, string mistake) {
|
||||
mistake = "common misspelling" and
|
||||
typos(wrong, right)
|
||||
(typos(wrong, right) or additional_typos(wrong, right))
|
||||
or
|
||||
mistake = "non-US spelling" and
|
||||
non_us_spelling(wrong, right)
|
||||
}
|
||||
|
||||
predicate additional_typos(string wrong, string right) {
|
||||
wrong = "tranformer" and right = "transformer"
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `word` is an acceptable spelling that would otherwise be considered
|
||||
* a mistake by the typo database.
|
||||
|
||||
Reference in New Issue
Block a user