mirror of
https://github.com/github/codeql.git
synced 2026-06-19 03:41:07 +02:00
Fix bug in inline expectations test implementation
This was stopping trailing comments, as in `// $ Alert // some comment`, from working.
This commit is contained in:
@@ -15,7 +15,7 @@ module Impl implements InlineExpectationsTestSig {
|
||||
ExpectationComment() { this = MkExpectationComment(comment) }
|
||||
|
||||
/** Returns the contents of the given comment, _without_ the preceding comment marker (`//`). */
|
||||
string getContents() { result = comment.getText().suffix(2) }
|
||||
string getContents() { result = comment.getText().suffix(2).trim() }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
string toString() { result = comment.toString() }
|
||||
|
||||
Reference in New Issue
Block a user