Fix commment typos

This commit is contained in:
Tom Hvitved
2026-06-02 14:41:27 +02:00
parent 1fd31d0ddd
commit dc0c7d7ec2
6 changed files with 11 additions and 11 deletions

View File

@@ -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()
)
)

View File

@@ -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

View File

@@ -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()
)
}

View File

@@ -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()
)
}

View File

@@ -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()
)
}

View File

@@ -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.
*