Skip to content

Commit d6be96b

Browse files
committed
NLB-6293 Upgraded golangci-lint to v1.64.5 and fixed configuration
1 parent e4c017b commit d6be96b

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.golangci.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ linters:
2626
- misspell
2727
- nakedret
2828
- prealloc
29-
- exportloopref
3029
- stylecheck
3130
- unconvert
3231
- unparam
@@ -38,20 +37,17 @@ linters:
3837
run:
3938
# 10 minute timeout for analysis
4039
timeout: 10m
41-
skip-dirs-use-default: true
42-
skip-dirs:
43-
- .go/pkg/mod
44-
- pkg/spec/api # Generated code
45-
- vendor
46-
- vendor-fork
4740
# Specific linter settings
4841
linters-settings:
4942
gocyclo:
5043
# Minimal code complexity to report
5144
min-complexity: 16
5245
govet:
53-
# Report shadowed variables
54-
check-shadowing: true
46+
disable-all: true
47+
enable:
48+
# Report shadowed variables
49+
- shadow
50+
5551
misspell:
5652
# Correct spellings using locale preferences for US
5753
locale: US
@@ -63,8 +59,8 @@ linters-settings:
6359
# If this list is empty, all structs are tested.
6460
# Default: []
6561
include:
66-
- 'gitlab.com/f5/nginx/nginxazurelb/azure-resource-provider/pkg/token.TokenID'
67-
- 'gitlab.com/f5/nginx/nginxazurelb/azure-resource-provider/internal/dpo/agent/certificates.CertGetRequest'
62+
- "gitlab.com/f5/nginx/nginxazurelb/azure-resource-provider/pkg/token.TokenID"
63+
- "gitlab.com/f5/nginx/nginxazurelb/azure-resource-provider/internal/dpo/agent/certificates.CertGetRequest"
6864

6965
issues:
7066
# Exclude configuration

cmd/nginx-loadbalancer-kubernetes/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,13 @@ func buildKubernetesClient() (*kubernetes.Clientset, error) {
133133
return client, nil
134134
}
135135

136+
// TODO: NLB-6294 change to use new typed workqueues
137+
//
138+
//nolint:staticcheck //ignore deprecation warnings
136139
func buildWorkQueue(settings configuration.WorkQueueSettings) workqueue.RateLimitingInterface {
137140
slog.Debug("Watcher::buildSynchronizerWorkQueue")
138141

142+
//nolint:staticcheck //ignore deprecation warnings
139143
rateLimiter := workqueue.NewItemExponentialFailureRateLimiter(settings.RateLimiterBase, settings.RateLimiterMax)
140144
return workqueue.NewNamedRateLimitingQueue(rateLimiter, settings.Name)
141145
}

internal/synchronization/synchronizer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ type ServiceKey struct {
5050
// a Border Client as specified in the Service annotation for the Upstream.
5151
// See application/border_client.go and application/application_constants.go for details.
5252
type Synchronizer struct {
53+
// TODO: NLB-6294 change to use new typed workqueues
54+
//nolint:staticcheck //ignore deprecation warnings
5355
eventQueue workqueue.RateLimitingInterface
5456
settings configuration.Settings
5557
translator Translator
@@ -60,6 +62,7 @@ type Synchronizer struct {
6062
// NewSynchronizer creates a new Synchronizer.
6163
func NewSynchronizer(
6264
settings configuration.Settings,
65+
//nolint:staticcheck //ignore deprecation warnings
6366
eventQueue workqueue.RateLimitingInterface,
6467
translator Translator,
6568
serviceLister corelisters.ServiceLister,

0 commit comments

Comments
 (0)