[repo-assist] docs: annotate unreachable guards with c8 ignore for coverage consistency - #570
Draft
github-actions[bot] wants to merge 1 commit into
Conversation
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>
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsgetOperator():!operatorNodeguard — siblingcsharpAnalyzer.getBinaryOperatorhas the same guard with/* c8 ignore next */.pythonAnalyzer.tsanalyzeFunction():!bodyguard — siblingpythonAnalyzer.getBooleanOperatorhas 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.tsbranch coverage 99.15% to 100%).Trade-offs
No behavior change. No new dependency. Minimal, surgical, two-line diff.
Test Status
npm run compile: cleannpm run lint: cleannpm 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.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.
Add this agentic workflow to your repo
To install this agentic workflow, run