From dc0c7d7ec221af4b3e93dbfc71eac3133054da41 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 2 Jun 2026 14:41:27 +0200 Subject: [PATCH] Fix `commment` typos --- .../lib/utils/test/PathResolutionInlineExpectationsTest.qll | 6 +++--- rust/ql/test/TestUtils.qll | 2 +- rust/ql/test/library-tests/const_access/const_access.ql | 4 ++-- rust/ql/test/library-tests/static_access/static_access.ql | 4 ++-- rust/ql/test/library-tests/variables/variables.ql | 4 ++-- shared/util/codeql/util/test/InlineExpectationsTest.qll | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll b/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll index f4544cafacc..a6ab8cd48ca 100644 --- a/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll +++ b/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll @@ -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() ) ) diff --git a/rust/ql/test/TestUtils.qll b/rust/ql/test/TestUtils.qll index d622af7f4d3..a55c24544b8 100644 --- a/rust/ql/test/TestUtils.qll +++ b/rust/ql/test/TestUtils.qll @@ -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 diff --git a/rust/ql/test/library-tests/const_access/const_access.ql b/rust/ql/test/library-tests/const_access/const_access.ql index f10479fdb81..27d1726f106 100644 --- a/rust/ql/test/library-tests/const_access/const_access.ql +++ b/rust/ql/test/library-tests/const_access/const_access.ql @@ -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() ) } diff --git a/rust/ql/test/library-tests/static_access/static_access.ql b/rust/ql/test/library-tests/static_access/static_access.ql index d755bf5a350..8a21ee5fb9b 100644 --- a/rust/ql/test/library-tests/static_access/static_access.ql +++ b/rust/ql/test/library-tests/static_access/static_access.ql @@ -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() ) } diff --git a/rust/ql/test/library-tests/variables/variables.ql b/rust/ql/test/library-tests/variables/variables.ql index 8380512d99f..934b3c4c420 100644 --- a/rust/ql/test/library-tests/variables/variables.ql +++ b/rust/ql/test/library-tests/variables/variables.ql @@ -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() ) } diff --git a/shared/util/codeql/util/test/InlineExpectationsTest.qll b/shared/util/codeql/util/test/InlineExpectationsTest.qll index e2ea9b87e74..e785adda456 100644 --- a/shared/util/codeql/util/test/InlineExpectationsTest.qll +++ b/shared/util/codeql/util/test/InlineExpectationsTest.qll @@ -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. *