Skip to content

Commit bc9fa6b

Browse files
committed
Fix bug in inline expectations test implementation
This was stopping trailing comments, as in `// $ Alert // some comment`, from working.
1 parent 14c72de commit bc9fa6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

swift/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module Impl implements InlineExpectationsTestSig {
1515
ExpectationComment() { this = MkExpectationComment(comment) }
1616

1717
/** Returns the contents of the given comment, _without_ the preceding comment marker (`//`). */
18-
string getContents() { result = comment.getText().suffix(2) }
18+
string getContents() { result = comment.getText().suffix(2).trim() }
1919

2020
/** Gets a textual representation of this element. */
2121
string toString() { result = comment.toString() }

0 commit comments

Comments
 (0)