Skip to content

Commit 44f1dac

Browse files
authored
Merge pull request #36 from PDOK/wr/linting-1
linting simpel
2 parents 25e2ca6 + bd176fc commit 44f1dac

40 files changed

+83
-47
lines changed

.golangci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ run:
44
timeout: 5m
55

66
# Modules download mode (do not modify go.mod)
7-
modules-download-mode: readonly
7+
module-download-mode: readonly
88

99
# Include test files (see below to exclude certain linters)
1010
tests: true
@@ -18,11 +18,10 @@ issues:
1818
- dupl
1919
- dogsled
2020
- funlen
21+
- gosec
2122

2223
output:
23-
formats:
24-
- format: colored-line-number
25-
path: stdout
24+
formats: colored-line-number
2625
print-issued-lines: true
2726
print-linter-name: true
2827

api/v2beta1/wfs_conversion.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ SOFTWARE.
2525
package v2beta1
2626

2727
import (
28-
smoothoperatorutils "github.com/pdok/smooth-operator/pkg/util"
2928
"log"
3029

30+
smoothoperatorutils "github.com/pdok/smooth-operator/pkg/util"
31+
3132
sharedModel "github.com/pdok/smooth-operator/model"
3233

3334
"sigs.k8s.io/controller-runtime/pkg/conversion"

api/v2beta1/wms_conversion.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ package v2beta1
2626

2727
import (
2828
"errors"
29-
smoothoperatorutils "github.com/pdok/smooth-operator/pkg/util"
3029
"log"
31-
"sigs.k8s.io/controller-runtime/pkg/conversion"
3230
"strconv"
3331
"strings"
3432

33+
smoothoperatorutils "github.com/pdok/smooth-operator/pkg/util"
34+
"sigs.k8s.io/controller-runtime/pkg/conversion"
35+
3536
pdoknlv3 "github.com/pdok/mapserver-operator/api/v3"
3637
sharedModel "github.com/pdok/smooth-operator/model"
3738
)

api/v2beta1/wms_conversion_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package v2beta1
22

33
import (
4+
"testing"
5+
46
pdoknlv3 "github.com/pdok/mapserver-operator/api/v3"
57
"github.com/stretchr/testify/assert"
68
"sigs.k8s.io/yaml"
7-
"testing"
89
)
910

1011
func TestV2ToV3(t *testing.T) {

api/v3/wfs_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ func (wfs *WFS) GeoPackages() []*Gpkg {
245245
return gpkgs
246246
}
247247

248+
//nolint:revive
248249
func (wfs *WFS) GetBaseUrl() string {
249250
return wfs.Spec.Service.URL
250251
}

api/v3/wms_types.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ SOFTWARE.
2525
package v3
2626

2727
import (
28-
shared_model "github.com/pdok/smooth-operator/model"
29-
corev1 "k8s.io/api/core/v1"
30-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3128
"maps"
3229
"slices"
3330
"sort"
31+
32+
shared_model "github.com/pdok/smooth-operator/model"
33+
corev1 "k8s.io/api/core/v1"
34+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3435
)
3536

3637
const (
@@ -582,6 +583,7 @@ func (wms *WMS) GeoPackages() []*Gpkg {
582583
return gpkgs
583584
}
584585

586+
//nolint:revive
585587
func (wms *WMS) GetBaseUrl() string {
586588
return wms.Spec.Service.URL
587589
}

api/v3/wms_types_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package v3
22

33
import (
4+
"reflect"
5+
"testing"
6+
47
"github.com/google/go-cmp/cmp"
58
"github.com/pdok/smooth-operator/model"
69
controller "github.com/pdok/smooth-operator/pkg/util"
7-
"reflect"
8-
"testing"
910
)
1011

1112
func TestLayer_setInheritedBoundingBoxes(t *testing.T) {

api/v3/wms_validation_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package v3
22

33
import (
4-
controller "github.com/pdok/smooth-operator/pkg/util"
54
"reflect"
65
"testing"
6+
7+
controller "github.com/pdok/smooth-operator/pkg/util"
78
)
89

910
func Test_getEqualChildStyleNames(t *testing.T) {

cmd/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,18 @@ import (
2020
"crypto/tls"
2121
"errors"
2222
"flag"
23+
"os"
24+
2325
"github.com/go-logr/zapr"
2426
"github.com/pdok/smooth-operator/pkg/integrations/logging"
2527
"github.com/peterbourgon/ff"
2628
"go.uber.org/zap/zapcore"
27-
"os"
2829
"sigs.k8s.io/controller-runtime/pkg/log/zap"
2930

3031
"github.com/pdok/mapserver-operator/internal/controller/mapfilegenerator"
3132
smoothoperator "github.com/pdok/smooth-operator/api/v1"
3233
traefikiov1alpha1 "github.com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1"
34+
3335
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
3436
// to ensure that exec-entrypoint and run can make use of them.
3537
_ "k8s.io/client-go/plugin/pkg/client/auth"

config/crd/bases/embed.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package bases
22

33
import (
44
_ "embed"
5+
56
"github.com/pdok/smooth-operator/pkg/validation"
67
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
78
"sigs.k8s.io/yaml"

0 commit comments

Comments
 (0)