Skip to content

Commit 3e09dae

Browse files
committed
golangci: disable nolintlint
nolintlint flags //nolint directives whose target lint check did not report an issue at the same line, on the assumption that the directive is now stale. In practice the underlying linters' findings are sensitive to golangci-lint's analysis cache and analyzer scheduling, which can vary across platforms and across PRs even when the relevant source has not changed. The result is occasional spurious lint failures on CI for code that nobody touched. Disable the linter and revert the workaround that the previous commit applied to pkg/driver/external/client/client.go. Signed-off-by: Jan Dubois <jan.dubois@suse.com>
1 parent f21ba23 commit 3e09dae

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ linters:
2222
- modernize
2323
- nakedret
2424
- noctx
25-
- nolintlint
2625
- perfsprint
2726
- revive
2827
- staticcheck

pkg/driver/external/client/client.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,7 @@ func NewDriverClient(socketPath string, logger *logrus.Logger) (*DriverClient, e
3232
grpc.WithTransportCredentials(insecure.NewCredentials()),
3333
}
3434

35-
// grpc.Dial (deprecated in favour of grpc.NewClient) is intentional here
36-
// for compatibility. Suppress both the staticcheck SA1019 deprecation and
37-
// nolintlint's unused-directive check: which staticcheck issues survive
38-
// past golangci-lint's filter pipeline depends on cache state, so the
39-
// SA1019 finding can be either kept or dropped before nolintlint inspects
40-
// it. Silencing nolintlint avoids a flaky lint failure across platforms.
41-
//nolint:staticcheck,nolintlint // grpc.Dial used for compatibility reasons
35+
//nolint:staticcheck // grpc.Dial is used for compatibility reasons
4236
conn, err := grpc.Dial("unix://"+socketPath, opts...)
4337
if err != nil {
4438
logger.Errorf("failed to dial gRPC driver client connection: %v", err)

0 commit comments

Comments
 (0)