You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ec736b4
Browse filesBrowse the repository at this point in the historyBrowse files
Add per-file comment markers to the postprocessing InputSig
The `--learn` support that follows needs to render inline-expectation
comments in the syntax of the file being edited, and a single CodeQL
database can mix source languages (e.g. Java plus XML), so the marker
must be chosen per file rather than per database.
Extend `TestPostProcessing::InputSig` with `getStartCommentMarker(relativePath)`
(no result -> that file is left untouched by `--learn`) and a defaulted
`getEndCommentMarker(relativePath)` (`none()` by default: line-comment
languages render no closing marker; block-comment languages can override
it later). Each language's `InlineExpectationsTestQuery.ql` implements
`getStartCommentMarker`, gated to that language's own source extensions so
that other file types (XML/YAML/HTML/ERB/Razor) extracted into the same
database are not rewritten with the wrong syntax.
This commit only wires the marker API through the signature and the
per-language inputs; nothing consumes it yet, so behavior is unchanged.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1adfa307-c48e-43f5-94e3-8286e4a8c083
0 commit comments