Skip to content

[repo-assist] docs: annotate unreachable guards with c8 ignore for coverage consistency - #570

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/improve-doc-c8-ignore-guards-20260824-8bfae2de9b1da8da
Draft

[repo-assist] docs: annotate unreachable guards with c8 ignore for coverage consistency#570
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/improve-doc-c8-ignore-guards-20260824-8bfae2de9b1da8da

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

While investigating Tasks 4/8/9 (Engineering Investments, Performance, Testing) this run, an explore pass found no new engineering, performance, or coverage-gap work (all remaining uncovered lines are already documented /* c8 ignore */ defensive fallbacks, and CI actions/dependencies are already at latest or covered by open Dependabot PRs #501/#455/#546). Per the fallback table, this run substitutes Task 5 (Coding Improvements).

Change

Two defensive guards were unreachable-by-grammar but missing the /* c8 ignore */ annotation that equivalent guards elsewhere in the codebase already carry:

  • jsLikeAnalyzer.ts getOperator(): !operatorNode guard — sibling csharpAnalyzer.getBinaryOperator has the same guard with /* c8 ignore next */.
  • pythonAnalyzer.ts analyzeFunction(): !body guard — sibling pythonAnalyzer.getBooleanOperator has the same style of guard already annotated.

Adding the annotations is purely documentation/consistency and slightly raises measured branch coverage (94.67% to 95.0%; jsLikeAnalyzer.ts branch coverage 99.15% to 100%).

Trade-offs

No behavior change. No new dependency. Minimal, surgical, two-line diff.

Test Status

  • npm run compile: clean
  • npm run lint: clean
  • npm run test:coverage (unit tests + coverage): 227 passing, coverage 98.74/95.0/99.01/98.74 (up from 98.68/94.67/99.01/98.68)
  • npm run test:vscode (full vscode-test suite): blocked by sandbox network (getaddrinfo EAI_AGAIN update.code.visualstudio.com) - same known limitation as every prior repo-assist run in this sandbox, not caused by this change.

🤖 This PR was created by Repo Assist, an automated AI assistant, as part of its regular maintenance run.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@42c2ab5b4e4c9273534c39259b2e0df7f20f07e9

jsLikeAnalyzer.getOperator's !operatorNode guard and
pythonAnalyzer.analyzeFunction's !body guard were unreachable by
grammar (binary_expression/boolean_operator always have an operator
child at index 1; function_definition/lambda always have a body),
but unlike their sibling analyzers (csharpAnalyzer.getBinaryOperator,
pythonAnalyzer.getBooleanOperator) they lacked the /* c8 ignore */
annotation explaining this. Added it for consistency and to raise
branch coverage slightly (94.67% -> 95.0%).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants