Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
working-directory: ${{ matrix.directory }}
version: v2.6.2 # renovate: datasource=github-tags depName=golangci/golangci-lint
version: v2.7.2 # renovate: datasource=github-tags depName=golangci/golangci-lint

njs-lint:
name: NJS Lint
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
- javascript

- repo: https://github.com/golangci/golangci-lint
rev: v2.6.2
rev: v2.7.2
hooks:
- id: golangci-lint-full
name: golangci-lint-root
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ GO_LINKER_FLAGS = $(GO_LINKER_FLAGS_OPTIMIZATIONS) $(GO_LINKER_FlAGS_VARS)

# tools versions
# renovate: datasource=github-tags depName=golangci/golangci-lint
GOLANGCI_LINT_VERSION = v2.6.2
GOLANGCI_LINT_VERSION = v2.7.2
# renovate: datasource=docker depName=kindest/node
KIND_K8S_VERSION = v1.34.0
# renovate: datasource=github-tags depName=norwoodj/helm-docs
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/ngfsort/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package ngfsort provides utilities for sorting Kubernetes resources.
package ngfsort
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sort
package ngfsort

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sort
package ngfsort

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/nginx/agent/grpc/context/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
Package context contains the functions for storing extra information in the gRPC context.
*/
package context
package context //nolint:revive // ignoring conflicting package name
2 changes: 1 addition & 1 deletion internal/controller/nginx/config/http/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package http
package http //nolint:revive // ignoring conflicting package name

import (
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/nginx/config/shared"
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/nginx/config/shared/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package shared
package shared //nolint:revive // ignoring meaningless package name

// Map defines an NGINX map.
type Map struct {
Expand Down
2 changes: 0 additions & 2 deletions internal/controller/sort/doc.go

This file was deleted.

2 changes: 1 addition & 1 deletion internal/controller/state/dataplane/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dataplane
import (
"sort"

ngfsort "github.com/nginx/nginx-gateway-fabric/v2/internal/controller/sort"
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/ngfsort"
)

func sortMatchRules(matchRules []MatchRule) {
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/state/graph/backend_refs.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"

ngfAPIv1alpha2 "github.com/nginx/nginx-gateway-fabric/v2/apis/v1alpha2"
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/sort"
sort "github.com/nginx/nginx-gateway-fabric/v2/internal/controller/ngfsort"
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/conditions"
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/helpers"
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/kinds"
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/state/graph/policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
v1 "sigs.k8s.io/gateway-api/apis/v1"

"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/ngfsort"
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/nginx/config/policies"
ngfsort "github.com/nginx/nginx-gateway-fabric/v2/internal/controller/sort"
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/conditions"
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/validation"
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/kinds"
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/state/graph/route_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
v1alpha "sigs.k8s.io/gateway-api/apis/v1alpha2"

ngfSort "github.com/nginx/nginx-gateway-fabric/v2/internal/controller/sort"
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/ngfsort"
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/conditions"
"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/validation"
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/kinds"
Expand Down Expand Up @@ -438,7 +438,7 @@ func bindRoutesToListeners(

// Sort the slice by timestamp and name so that we process the routes in the priority order
sort.Slice(l4RouteSlice, func(i, j int) bool {
return ngfSort.LessClientObject(l4RouteSlice[i].Source, l4RouteSlice[j].Source)
return ngfsort.LessClientObject(l4RouteSlice[i].Source, l4RouteSlice[j].Source)
})

// portHostnamesMap exists to detect duplicate hostnames on the same port
Expand Down
Loading