Skip to content

fix(coverage): parse case subjects before in - #1342

Merged
Chemaclass merged 1 commit into
mainfrom
fix/1338-case-subject-keyword
Sep 7, 2026
Merged

fix(coverage): parse case subjects before in#1342
Chemaclass merged 1 commit into
mainfrom
fix/1338-case-subject-keyword

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

Background

Follow-up to #1341. In case in in ..., the coverage scanner treated the first in, which is the case subject, as the header delimiter. Inside a compact nested case in a substitution, that unbalanced scanner state and could mark a skipped child command as covered.

Changes

  • Separate the case phase awaiting its subject from the phase awaiting the in delimiter in both Bash and awk scanners.
  • Add Bash/awk parity and coverage-isolation regressions for a subject named in in a compact nested case.
  • Clarify that multiline propagation covers executable lines across the physical span, while parent hits do not cover child substitution commands.

Validation

  • 60 focused tests and 123 assertions passed.
  • ShellCheck and Bash syntax checks passed.
  • make lint and git diff --check passed.

Checklist

  • I updated the CHANGELOG.md to reflect the fix
  • I updated the documentation to reflect the behavior

Refs #1338

An unquoted case subject named `in` was mistaken for the header delimiter. Inside nested substitutions this unbalanced scanner state and could mark skipped commands covered.

Align the coverage docs with executable-line and Bash 3.x behavior.

Refs #1338
@Chemaclass
Chemaclass merged commit a575ef9 into main Sep 7, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the fix/1338-case-subject-keyword branch September 7, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant