mirror of
https://github.com/github/codeql.git
synced 2026-06-05 21:47:10 +02:00
Fix commment typos
This commit is contained in:
@@ -14,7 +14,7 @@ private module ResolveTest implements TestSig {
|
||||
i.getLocation().hasLocationInfo(filepath, _, _, line, _)
|
||||
}
|
||||
|
||||
private predicate commmentAt(string text, string filepath, int line) {
|
||||
private predicate commentAt(string text, string filepath, int line) {
|
||||
exists(Comment c |
|
||||
c.getLocation().hasLocationInfo(filepath, line, _, _, _) and
|
||||
c.getCommentText().trim() = text and
|
||||
@@ -28,9 +28,9 @@ private module ResolveTest implements TestSig {
|
||||
if i instanceof SourceFile
|
||||
then value = i.getFile().getBaseName()
|
||||
else (
|
||||
commmentAt(value, filepath, line)
|
||||
commentAt(value, filepath, line)
|
||||
or
|
||||
not commmentAt(_, filepath, line) and
|
||||
not commentAt(_, filepath, line) and
|
||||
value = i.getName()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@ class Builtin extends AstNode {
|
||||
Builtin() { this.getFile().getAbsolutePath().matches("%/builtins/%.rs") }
|
||||
}
|
||||
|
||||
predicate commmentAt(string text, string filepath, int line) {
|
||||
predicate commentAt(string text, string filepath, int line) {
|
||||
exists(Comment c |
|
||||
c.getLocation().hasLocationInfo(filepath, line, _, _, _) and
|
||||
c.getCommentText().trim() = text and
|
||||
|
||||
@@ -20,9 +20,9 @@ module ConstAccessTest implements TestSig {
|
||||
c = ca.getConst() and
|
||||
constAt(c, filepath, line)
|
||||
|
|
||||
commmentAt(value, filepath, line)
|
||||
commentAt(value, filepath, line)
|
||||
or
|
||||
not commmentAt(_, filepath, line) and
|
||||
not commentAt(_, filepath, line) and
|
||||
value = c.getName().getText()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ module StaticAccessTest implements TestSig {
|
||||
s = sa.getStatic() and
|
||||
staticAt(s, filepath, line)
|
||||
|
|
||||
commmentAt(value, filepath, line)
|
||||
commentAt(value, filepath, line)
|
||||
or
|
||||
not commmentAt(_, filepath, line) and
|
||||
not commentAt(_, filepath, line) and
|
||||
value = s.getName().getText()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -40,9 +40,9 @@ module VariableAccessTest implements TestSig {
|
||||
|
||||
private predicate decl(Variable v, string value) {
|
||||
exists(string filepath, int line, boolean inMacro | declAt(v, filepath, line, inMacro) |
|
||||
commmentAt(value, filepath, line) and inMacro = false
|
||||
commentAt(value, filepath, line) and inMacro = false
|
||||
or
|
||||
not (commmentAt(_, filepath, line) and inMacro = false) and
|
||||
not (commentAt(_, filepath, line) and inMacro = false) and
|
||||
value = v.getText()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -597,7 +597,7 @@ private string mainResultSet() { result = ["#select", "problems"] }
|
||||
* foo(); // $ Alert[rust/unreachable-code]
|
||||
* ```
|
||||
*
|
||||
* In the example above, the `$ Alert[rust/unused-value]` commment is only taken
|
||||
* In the example above, the `$ Alert[rust/unused-value]` comment is only taken
|
||||
* into account in the test for the query with ID `rust/unused-value`, and vice
|
||||
* versa for the `$ Alert[rust/unreachable-code]` comment.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user