Expand dead_code_handling to cover redundant conditions found by coverage tools#2278
Merged
hiroshinishio merged 1 commit intomainfrom Feb 19, 2026
Merged
Expand dead_code_handling to cover redundant conditions found by coverage tools#2278hiroshinishio merged 1 commit intomainfrom
hiroshinishio merged 1 commit intomainfrom
Conversation
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
<dead_code_handling>section incoding_standards.xmlto cover redundant conditions revealed by coverage tools (not just linters)elseblock where the variable is guaranteed truthyContext
foxden-admin-portal PR #483 failed because GitAuto tried to test unreachable branches caused by redundant conditions inside an
elseblock. The existingdead_code_handlingrule only covered linter-flagged dead code. Now it also covers coverage-reported unreachable branches.Social Media Post (GitAuto)
Coverage flagged two uncovered branches. Our agent burned 50 iterations trying to test them, then OOM'd. They were unreachable - redundant null checks inside an else block where the variable was already guaranteed to exist. V8 counts those checks as branches even when they can never be false. New rule: fix the dead code, don't chase the test.
Social Media Post (Wes)
Agent burned 50 iterations trying to cover two lines, then OOM'd. Traced it - dead code. A redundant null check inside an else block where the variable is guaranteed truthy. V8 sees it as a branch that can never be false. Remove the check, 100% coverage. The answer was refactoring, not testing.