Skip to content

Commit 14f38e6

Browse files
redsun82Copilot
andcommitted
Document Actions inline expectations test API
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent bb6b2ce commit 14f38e6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

actions/ql/lib/codeql/actions/test/internal/InlineExpectationsTestImpl.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ private import codeql.Locations as L
22
private import codeql.actions.ast.internal.Yaml
33
private import codeql.util.test.InlineExpectationsTest
44

5+
/** Provides the Actions implementation of inline expectation parsing. */
56
module Impl implements InlineExpectationsTestSig {
7+
/** A class representing YAML comments that may contain inline expectations. */
68
class ExpectationComment extends YamlNode {
79
ExpectationComment() { this.toString().matches("%$ %") }
810

11+
/** Gets the contents of this comment, starting at the inline expectation marker (`$`). */
912
string getContents() { result = this.toString().regexpCapture(".*(\\$ .*)", 1) }
1013
}
1114

0 commit comments

Comments
 (0)