refactor(detekt): extract magic-number constants, wrap long lines, drop legit suppressions
Mechanical detekt cleanup across apps/core/infrastructure (behavior-preserving): - MagicNumber 62->10: named constants + removed 'legit' MagicNumber suppressions (Tier level from ordinal, ReplayInferenceProvider CHARS_PER_TOKEN, ConfigLoader DEFAULT_* consts, capability scores, HTTP ranges, column widths, etc.) - MaxLineLength cut to ~0 in production modules (line wraps, no logic change) - Dropped one dead parameter (ConfigLoader.parseArray lineNum) Structural findings (ReturnCount/LongMethod/Complexity/LargeClass) left for a deliberate decomposition pass. Full build + detekt gate green.
This commit is contained in:
+3
-1
@@ -41,7 +41,9 @@ object PlanLinter {
|
||||
|
||||
fun lint(graph: WorkflowGraph, seeds: Set<String> = seedArtifacts): PlanLintResult =
|
||||
PlanLintResult(
|
||||
hardFailures = unproducedNeeds(graph, seeds) + trapStates(graph) + unreferencedPromptArtifacts(graph, seeds),
|
||||
hardFailures = unproducedNeeds(graph, seeds) +
|
||||
trapStates(graph) +
|
||||
unreferencedPromptArtifacts(graph, seeds),
|
||||
softFindings = stageCount(graph) + fanOut(graph) + emptyBriefs(graph) + duplicateBriefs(graph),
|
||||
)
|
||||
|
||||
|
||||
+4
-1
@@ -147,7 +147,10 @@ class PlanLinterTest {
|
||||
start = "implement",
|
||||
)
|
||||
val result = PlanLinter.lint(g)
|
||||
assertTrue(result.hardFailures.none { it.code == "trap_state" }, "loop with exit must not trap: ${result.hardFailures}")
|
||||
assertTrue(
|
||||
result.hardFailures.none { it.code == "trap_state" },
|
||||
"loop with exit must not trap: ${result.hardFailures}",
|
||||
)
|
||||
assertTrue(result.passed, "hard=${result.hardFailures}")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user