From 99c1889f9d5d2a4a64d01886d62b874a9d757219 Mon Sep 17 00:00:00 2001 From: philluiz2323 Date: Fri, 24 Jul 2026 15:46:24 +0400 Subject: [PATCH] fix(review): remove structurally-unreachable branch in classifyChangedFile (#8353) isTestFile already delegates to isTestPath internally, so the `|| isTestPath(path)` disjunct on the "test" classification line can never independently change the result -- one branch combination was permanently uncoverable under the 99% branch-counted Codecov gate. Drops the redundant check and its now-unused import; the documented five-way precedence and all existing test cases are unchanged. --- src/review/changed-files-classify.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/review/changed-files-classify.ts b/src/review/changed-files-classify.ts index 94875d5e65..6137efde54 100644 --- a/src/review/changed-files-classify.ts +++ b/src/review/changed-files-classify.ts @@ -1,6 +1,5 @@ import { isConfigFile, isDocsFile, isGeneratedFile, isLockfile, isMinifiedFile, isVendoredFile } from "../signals/path-matchers"; import { isTestFile } from "../signals/local-branch"; -import { isTestPath } from "../signals/test-evidence"; // Deterministic changed-file classifier for the review changed-files summary (#2143, part of #1957). Maps a changed // file PATH to exactly one of five review-oriented buckets so the summary table (and future analytics) group @@ -25,7 +24,7 @@ export type ReviewFileClass = "source" | "test" | "docs" | "config" | "generated */ export function classifyChangedFile(path: string): ReviewFileClass { if (isGeneratedFile(path) || isVendoredFile(path) || isLockfile(path) || isMinifiedFile(path)) return "generated"; - if (isTestFile(path) || isTestPath(path)) return "test"; + if (isTestFile(path)) return "test"; if (isDocsFile(path)) return "docs"; if (isConfigFile(path)) return "config"; return "source";