Skip to content

Commit 9895e5f

Browse files
committed
Add nolint for package names that conflict with Go standard library package names
1 parent e83ac8a commit 9895e5f

File tree

9 files changed

+10
-3
lines changed

9 files changed

+10
-3
lines changed

internal/controller/nginx/agent/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func (fs *fileService) GetFileStream(
103103
if size > math.MaxUint32 {
104104
return status.Error(codes.Internal, "file size is too large and cannot be converted to uint32")
105105
}
106-
sizeUint32 = uint32(size) //nolint:gosec // validation check performed on previous line
106+
sizeUint32 = uint32(size)
107107
hash := req.GetFileMeta().GetHash()
108108

109109
fs.logger.V(1).Info("Sending chunked file to agent", "file", req.GetFileMeta().GetName())
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
22
Package context contains the functions for storing extra information in the gRPC context.
33
*/
4+
//nolint:revive
45
package context

internal/controller/nginx/config/http/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//nolint:revive
12
package http
23

34
import (

internal/controller/nginx/config/shared/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//nolint:revive
12
package shared
23

34
// Map defines an NGINX map.

internal/controller/sort/doc.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
// Package sort provides utilities for sorting Kubernetes resources.
2+
3+
// nolint
24
package sort

internal/controller/sort/sort.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// nolint
12
package sort
23

34
import (

internal/controller/sort/sort_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// nolint
12
package sort
23

34
import (

internal/controller/state/graph/gateway_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func TestBuildGateway(t *testing.T) {
218218
return v1.Listener{
219219
Name: v1.SectionName(name),
220220
Hostname: (*v1.Hostname)(helpers.GetPointer(hostname)),
221-
Port: v1.PortNumber(port), //nolint:gosec // port number will not overflow int32
221+
Port: v1.PortNumber(port),
222222
Protocol: protocol,
223223
TLS: tls,
224224
}

internal/controller/status/prepare_requests.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func prepareGatewayRequest(
304304
listenerStatuses = append(listenerStatuses, v1.ListenerStatus{
305305
Name: v1.SectionName(l.Name),
306306
SupportedKinds: l.SupportedKinds,
307-
AttachedRoutes: int32(len(l.Routes)) + int32(len(l.L4Routes)), //nolint:gosec // num routes will not overflow
307+
AttachedRoutes: int32(len(l.Routes)) + int32(len(l.L4Routes)),
308308
Conditions: apiConds,
309309
})
310310
}

0 commit comments

Comments
 (0)