From d3ede45c9612bb2415d24798fe43d6cba188f142 Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Wed, 4 Mar 2026 19:49:44 +0700 Subject: [PATCH] fix(ci): remove LOC count from maintainability gate largeFileCountOver350Loc is a vanity metric that blocks releases for borderline cases (359-372 LOC files). Keep processExit and synchronousFs gates which track real anti-patterns. LOC still collected/reported but no longer gated. --- CLAUDE.md | 1 + docs/metrics/maintainability-baseline.json | 6 +++--- scripts/maintainability-baseline.js | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 8c5be4d5..072e66bf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -125,6 +125,7 @@ bun run validate # Step 3: Final check (must pass) - Gated metrics (must not increase vs baseline): - `processExitReferenceCount` - `synchronousFsApiReferenceCount` +- Informational metrics (collected but not gated): - `largeFileCountOver350Loc` - Baseline update policy: 1. Prefer reducing the metric and keeping the baseline unchanged. diff --git a/docs/metrics/maintainability-baseline.json b/docs/metrics/maintainability-baseline.json index 2d0dcd87..31a9b4e8 100644 --- a/docs/metrics/maintainability-baseline.json +++ b/docs/metrics/maintainability-baseline.json @@ -1,9 +1,9 @@ { "sourceDirectory": "src", "largeFileThresholdLoc": 350, - "typeScriptFileCount": 389, - "locInSrc": 83534, + "typeScriptFileCount": 390, + "locInSrc": 83786, "processExitReferenceCount": 185, "synchronousFsApiReferenceCount": 894, - "largeFileCountOver350Loc": 59 + "largeFileCountOver350Loc": 61 } diff --git a/scripts/maintainability-baseline.js b/scripts/maintainability-baseline.js index 0216b841..e249ad8f 100644 --- a/scripts/maintainability-baseline.js +++ b/scripts/maintainability-baseline.js @@ -245,7 +245,6 @@ function runCheck(checkPath, currentMetrics) { const gatedKeys = [ 'processExitReferenceCount', 'synchronousFsApiReferenceCount', - 'largeFileCountOver350Loc', ]; const violations = [];