Skip to content

Commit d6ade8f

Browse files
committed
Shared: allow comment starting with # after inline expectation comment
1 parent f591987 commit d6ade8f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

shared/util/codeql/util/test/InlineExpectationsTest.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,10 @@ module Make<InlineExpectationsTestSig Impl> {
513513
/**
514514
* RegEx pattern to match a comment containing one or more expected results. The comment must have
515515
* `$` as its first non-whitespace character. Any subsequent character
516-
* is treated as part of the expected results, except that the comment may contain a `//` sequence
517-
* to treat the remainder of the line as a regular (non-interpreted) comment.
516+
* is treated as part of the expected results, except that the comment may contain a `//` or `#`
517+
* sequence to treat the remainder of the line as a regular (non-interpreted) comment.
518518
*/
519-
private string expectationCommentPattern() { result = "\\s*\\$ ((?:[^/]|/[^/])*)(?://.*)?" }
519+
private string expectationCommentPattern() { result = "\\s*\\$ ((?:[^/]|/[^/])*)(?:(//|#).*)?" }
520520

521521
/**
522522
* The possible columns in an expectation comment. The `TDefaultColumn` branch represents the first

0 commit comments

Comments
 (0)