Skip to content

Feature/632 multi line coverage tags - #633

Open
ezwiebel wants to merge 2 commits into
itsallcode:mainfrom
CubePilot-France:feature/632_multi_line_coverage_tags
Open

ezwiebel wants to merge 2 commits into
itsallcode:mainfrom
CubePilot-France:feature/632_multi_line_coverage_tags

Conversation

@ezwiebel

@ezwiebel ezwiebel commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

This PR is the implementation proposed for feature request #632.

It allows a user to write coverage tags on multiple lines in source code and Gherkin comments.
Specification, code, tests and usage documentation has been update with the assistance of AI.
The produced artifacts have been human reviewed and very slightly modified.

Attention points for reviewer:

  • The AI agent decided to throw exceptions (ImporterException) when a multiple line tag is not well formed. I'm not sure this is the common doctrine in OFT and you might prefer to silently ignore the lines, as they are comments and could in fact be anything else than a malformed tag
  • The work has been split in two different commits, one for source and one for gherkin comments, so it would be easy to accept one and not the other, at your convenience
  • I was not able to pass a formatter with your configuration, just checked it looked ok

Don't hesitate to come back to me anytime.

Coded with the help of Claude Code (sonnet 5.5 and opus 5.5), following the provided guidelines.

ezwiebel and others added 2 commits October 14, 2026 16:05
A full coverage tag whose line ends with a comma after a covered ID now
continues on the following lines. Leading whitespace and punctuation
comment markers (e.g. "--", "//", "#") are ignored on continuation lines,
so covered IDs can be aligned:

    -- [SRC~ICM45686-CORE~1->CPR~ICM45686-0001~1,
    --                       CPR~ICM45686-0002~1]

The joined tag is imported like a single-line tag located at the opening
line, with source ranges of covered IDs pointing to their actual lines.
An invalid continuation line or a missing closing bracket fails the
import instead of silently dropping coverage.

Only the Tag importer enables multi-line tags; Markdown, RST and Gherkin
comments keep single-line tags.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The Gherkin importer now uses the multi-line coverage-tag parser for its
comment lines, so tests in .feature files can cover several requirements
with an aligned list:

    # [TST~ICM45686-CORE-TEST~1 -> CPR~ICM45686-0001~1,
    #                              CPR~ICM45686-0002~1]

Executable and blank lines are still never scanned for coverage tags.
If such a line interrupts an open multi-line tag, the import fails with
the file and line instead of continuing the tag across Gherkin text.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ezwiebel

Copy link
Copy Markdown
Contributor Author

I don't understand why the link checker fails. The link in trouble does lead to the correct page.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📫 Backlog

Development

Successfully merging this pull request may close these issues.

1 participant