fix: bound TypeScript semantic analysis to scan corpus #98
Annotations
10 warnings and 1 notice
|
codeguard:
internal/codeguard/core/ai_nlrule_types.go#L1
[performance.go.rebuild-amplifier] Go package "internal/codeguard/core" has 33 transitive dependents; max is 32, so changes here amplify rebuild cascades (sample: cmd/codeguard, cmd/codeguard-dev, internal/cli, internal/codeguard/ai/fix, ...). Fix: Reduce upward coupling around the package, extract volatile code into leaf packages, and separate stable contracts from frequently changing implementation details.
|
|
codeguard:
internal/codeguard/externalreports/sarif.go#L172
[quality.duplicate-code] duplicate normalized token sequence of 60 tokens also found in internal/codeguard/externalreports/native.go:144 (threshold 60). Fix: Extract the shared logic, consolidate the implementation, or raise the threshold intentionally for acceptable duplication.
|
|
codeguard:
internal/codeguard/externalreports/native.go#L144
[quality.duplicate-code] duplicate normalized token sequence of 60 tokens also found in internal/codeguard/externalreports/sarif.go:172 (threshold 60). Fix: Extract the shared logic, consolidate the implementation, or raise the threshold intentionally for acceptable duplication.
|
|
codeguard:
internal/codeguard/runner/risk_scoring.go#L15
[quality.cyclomatic-complexity] function addRiskArtifacts has cyclomatic complexity 11; max is 10. Fix: Reduce branching in the function or refactor logic into smaller units.
|
|
codeguard:
internal/codeguard/externalreports/sarif.go#L129
[quality.cyclomatic-complexity] function importSARIF has cyclomatic complexity 12; max is 10. Fix: Reduce branching in the function or refactor logic into smaller units.
|
|
codeguard:
internal/codeguard/externalreports/native_test.go#L62
[quality.cyclomatic-complexity] function TestImportTrivyNormalizesFindingsAndRedactsSecretPayload has cyclomatic complexity 13; max is 10. Fix: Reduce branching in the function or refactor logic into smaller units.
|
|
codeguard:
internal/codeguard/externalreports/native.go#L132
[quality.max-parameters] function newTrivyFinding has 8 parameters; max is 5. Fix: Group related inputs into a struct or simplify the function signature.
|
|
codeguard:
internal/codeguard/ai/fix/batch.go#L17
[quality.cyclomatic-complexity] function VerifyBatch has cyclomatic complexity 11; max is 10. Fix: Reduce branching in the function or refactor logic into smaller units.
|
|
codeguard:
internal/benchmark/run.go#L49
[quality.ai.narrative-comment] comment narrates the code instead of explaining intent or constraints. Fix: Delete the narration or rewrite the comment so it captures why the code exists, what constraint it protects, or what tradeoff it makes.
|
|
codeguard:
internal/benchmark/run.go#L84
[quality.max-parameters] function runEntry has 7 parameters; max is 5. Fix: Group related inputs into a struct or simplify the function signature.
|
|
CodeGuard
version 0.1.0
|