From 501485b9f6ab48dde2d1e5f5a69d5bf2bf21ab55 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Wed, 4 Mar 2026 14:06:59 +0000 Subject: [PATCH] Update library to require space after $ We cannot easily require a space before $ because some languages, like C#, strip whitespace from the beginning of the comment text. --- shared/util/codeql/util/test/InlineExpectationsTest.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/util/codeql/util/test/InlineExpectationsTest.qll b/shared/util/codeql/util/test/InlineExpectationsTest.qll index ccae8c1fc85..0d4bb3d9710 100644 --- a/shared/util/codeql/util/test/InlineExpectationsTest.qll +++ b/shared/util/codeql/util/test/InlineExpectationsTest.qll @@ -521,7 +521,7 @@ module Make { * is treated as part of the expected results, except that the comment may contain a `//` sequence * to treat the remainder of the line as a regular (non-interpreted) comment. */ -private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|/[^/])*)(?://.*)?" } +private string expectationCommentPattern() { result = "\\s*\\$ ((?:[^/]|/[^/])*)(?://.*)?" } /** * The possible columns in an expectation comment. The `TDefaultColumn` branch represents the first