ci(lint): centralize nolint patterns (#499)#519
Merged
Conversation
Extend .golangci.yml exclude-rules from PR #507's _test.go G304 base to cover the remaining structural patterns. Strip 22 inline waivers across 14 files (35 -> 13 remaining; -63%). Untouched: patterndetectorprocessor (lane J overlap) and 11 point-specific load-bearing keepers (unsafe aliasing, weak-rng for chaos repro, pre-deprecation parity asserts, doc/export refs). Closes #499. Signed-off-by: Tri Lam <tree@lumalabs.ai>
Signed-off-by: Tri Lam <tree@lumalabs.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Centralize the remaining structural
nolintpatterns into.golangci.ymlpath-scoped exclude-rules. Builds on PR #507 (lane A:_test.goG304) by covering the next four structural classes that were each generating multiple inline waivers.Inline
nolint:waivers: 35 → 13 (-63%). Untouched:module/processor/patterndetectorprocessor/(lane J overlap; deferred to next wave) and 11 point-specific load-bearing keepers.Before / after by category
gosec(G304 in_test.go)gosec(G204 / G107 integration tests)internal/integration/.*_test\.go,components/.*/integration_helper_test\.gogosec(G304 hermetic replay loader)module/pkg/replay/runner\.gogosec(G304 jsonschematest helper)module/pkg/testutil/jsonschematest/.*\.gogosec(G306 / G304 / G404 dev tools)tools/genfixtures,tools/coverage-check,tools/failure-injectgoconst(patterns test vocabularies)module/pkg/patterns/.*_test\.gogocyclo(kept inline, load-bearing)gosec(G103 / G304 prod, load-bearing)xid_correlation.gounsafe aliasing;nccl_fr.gooperator-config pathunused(doc / export refs)pyspy.go,steady_state_linux_test.go— referenced from doc.gowrapcheck(stutter rationale)tools/coverage-check/main.goos.Open already includes pathstaticcheck(SA1019 parity assert)xid_correlation_test.go— issue #277 pre-deprecation parityRoot cause
Each inline waiver was treating a class of safe-by-design call sites as a point exception. The class-level fixes (path-scoped exclude-rules) move the rationale into one searchable location so future reviewers grep
.golangci.ymlinstead ofgit log-archaeologying 22 scattered comments.What's NOT in this PR
module/processor/patterndetectorprocessor/config.go(2 gocyclo waivers) andxid_correlation_test.go(1 staticcheck) — lane J (test: synthetic-2026-06-multi-rank-disk-pressure fixture mis-labelled as negative #497) touchespatterndetectorprocessor/; deferred to the next wave to avoid merge conflicts.Test plan
make lintgreen pre-change (baseline: 0 issues).make lintgreen post-change (0 issues).golangci-lint+module/golangci-lint+go vet+go mod verify+ attribute-namespace-check — all green.git diff --statconfirms nopatterndetectorprocessor/files touched.Closes #499.