Summary
The new lenstringzero analyzer (ADR-37618, flags len(s) == 0 / len(s) != 0 on string values) was added to the live analyzer driver but the documentation and spec-test surface were not updated alongside it. The driver now runs 22 analyzers while every documentation/spec artifact still says 21, so the new linter is invisible to the README, the package doc, and — critically — has no spec-test coverage.
- Driver analyzer count (
cmd/linters/main.go): 22 ✅ (includes lenstringzero)
pkg/linters/doc.go: 21 ❌
pkg/linters/README.md: 21 ❌ (missing from bullet list, table, and import list)
pkg/linters/spec_test.go documentedAnalyzers(): 21 ❌ (does not validate lenstringzero.Analyzer)
- Status: ⚠️ self-consistency gap
Evidence
lenstringzero is imported and registered in the multichecker:
cmd/linters/main.go:29 — "github.com/github/gh-aw/pkg/linters/lenstringzero"
cmd/linters/main.go:64 — lenstringzero.Analyzer,
But it is absent everywhere the linter set is documented/asserted:
Per-artifact breakdown
pkg/linters/doc.go
Line 3 states // The actual analyzers are implemented in subpackages. All 21 active analyzers: followed by a 21-item bullet list that does not include lenstringzero.
pkg/linters/README.md
lenstringzero does not appear anywhere (grep → not found). The three places that enumerate analyzers all stop at 21:
- the
Subpackages bullet list (~line 28, ends at tolowerequalfold / uncheckedtypeassertion)
- the
Public API > Subpackages table (~line 57)
- the import list (~line 122)
pkg/linters/spec_test.go
documentedAnalyzers() (lines 62–86) returns 21 entries and the doc comment (lines 49–61) explicitly says "The README documents 21 analyzer subpackages". Because TestSpec_PublicAPI_SubpackageAnalyzers, TestSpec_UsageExample_AnalyzersUsable, and TestSpec_DesignDecision_UniqueAnalyzerNames all iterate over this list, none of them exercise lenstringzero.Analyzer — its Name/Run wiring and name-uniqueness are currently unverified by the spec suite.
Impact
- The newest linter has zero spec-test coverage: a regression that nil'd
lenstringzero.Analyzer, dropped its Run, or collided its Name with another analyzer would not be caught by spec_test.go.
- Contributors reading
doc.go / README.md cannot discover the linter or its rule, and the documented count ("All 21") is now stale/incorrect.
- Breaks the established one-package-per-linter self-consistency invariant that prior Sergo runs have relied on (every shipped analyzer is documented + spec-tested).
Recommendation
Sync all three artifacts to 22 analyzers, matching the pattern used for the previous additions:
pkg/linters/doc.go — change All 21 active analyzers → All 22 active analyzers and add the bullet:
// - lenstringzero — flags len(s) == 0 / len(s) != 0 on string values that should use s == \"\" / s != \"\"
pkg/linters/README.md — add lenstringzero to the Subpackages bullet list, the Public API table row, and the import list (alphabetical position: after largefunc, before manualmutexunlock).
pkg/linters/spec_test.go — add the import and the {\"lenstringzero\", lenstringzero.Analyzer} entry to documentedAnalyzers(), and update the count/comment from 21 → 22 (lines 49–61).
Validation checklist
Effort: Low (documentation + one test-table entry; no analyzer logic changes).
References
- ADR:
docs/adr/37618-add-lenstringzero-linter.md
- Driver:
cmd/linters/main.go:29, cmd/linters/main.go:64
Generated by 🤖 Sergo - Serena Go Expert · 236 AIC · ⌖ 15.2 AIC · ⊞ 6.5K · ◷
Summary
The new
lenstringzeroanalyzer (ADR-37618, flagslen(s) == 0/len(s) != 0on string values) was added to the live analyzer driver but the documentation and spec-test surface were not updated alongside it. The driver now runs 22 analyzers while every documentation/spec artifact still says 21, so the new linter is invisible to the README, the package doc, and — critically — has no spec-test coverage.cmd/linters/main.go): 22 ✅ (includeslenstringzero)pkg/linters/doc.go: 21 ❌pkg/linters/README.md: 21 ❌ (missing from bullet list, table, and import list)pkg/linters/spec_test.godocumentedAnalyzers(): 21 ❌ (does not validatelenstringzero.Analyzer)Evidence
lenstringzerois imported and registered in the multichecker:cmd/linters/main.go:29—"github.com/github/gh-aw/pkg/linters/lenstringzero"cmd/linters/main.go:64—lenstringzero.Analyzer,But it is absent everywhere the linter set is documented/asserted:
Per-artifact breakdown
pkg/linters/doc.goLine 3 states
// The actual analyzers are implemented in subpackages. All 21 active analyzers:followed by a 21-item bullet list that does not includelenstringzero.pkg/linters/README.mdlenstringzerodoes not appear anywhere (grep→ not found). The three places that enumerate analyzers all stop at 21:Subpackagesbullet list (~line 28, ends attolowerequalfold/uncheckedtypeassertion)Public API > Subpackagestable (~line 57)pkg/linters/spec_test.godocumentedAnalyzers()(lines 62–86) returns 21 entries and the doc comment (lines 49–61) explicitly says "The README documents 21 analyzer subpackages". BecauseTestSpec_PublicAPI_SubpackageAnalyzers,TestSpec_UsageExample_AnalyzersUsable, andTestSpec_DesignDecision_UniqueAnalyzerNamesall iterate over this list, none of them exerciselenstringzero.Analyzer— itsName/Runwiring and name-uniqueness are currently unverified by the spec suite.Impact
lenstringzero.Analyzer, dropped itsRun, or collided itsNamewith another analyzer would not be caught byspec_test.go.doc.go/README.mdcannot discover the linter or its rule, and the documented count ("All 21") is now stale/incorrect.Recommendation
Sync all three artifacts to 22 analyzers, matching the pattern used for the previous additions:
pkg/linters/doc.go— changeAll 21 active analyzers→All 22 active analyzersand add the bullet:// - lenstringzero — flags len(s) == 0 / len(s) != 0 on string values that should use s == \"\" / s != \"\"pkg/linters/README.md— addlenstringzeroto the Subpackages bullet list, the Public API table row, and the import list (alphabetical position: afterlargefunc, beforemanualmutexunlock).pkg/linters/spec_test.go— add the import and the{\"lenstringzero\", lenstringzero.Analyzer}entry todocumentedAnalyzers(), and update the count/comment from 21 → 22 (lines 49–61).Validation checklist
go test ./pkg/linters/...passes withlenstringzeroadded todocumentedAnalyzers()grep -cof analyzer rows in README equals the count incmd/linters/main.godoc.gocount and bullet list both read 22TestSpec_PublicAPI_SubpackageAnalyzers/lenstringzerosubtest runs and passesEffort: Low (documentation + one test-table entry; no analyzer logic changes).
References
docs/adr/37618-add-lenstringzero-linter.mdcmd/linters/main.go:29,cmd/linters/main.go:64