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
5 changes: 4 additions & 1 deletion api/v3/wms_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ func (wms *WMS) ValidateUpdate(wmsOld *WMS) ([]string, error) {
return ValidateUpdate(wms, wmsOld, ValidateWMS)
}

// TODO fix linting (cyclop)
// TODO fix linting (cyclop,funlen)
//
//nolint:cyclop,funlen
func ValidateWMS(wms *WMS, warnings *[]string, allErrs *field.ErrorList) {
if strings.Contains(wms.GetName(), "wms") {
sharedValidation.AddWarning(
Expand Down Expand Up @@ -203,6 +205,7 @@ func ValidateWMS(wms *WMS, warnings *[]string, allErrs *field.ErrorList) {
}

// TODO fix linting (nestif)
//nolint:nestif
if layer.Visible {
hasVisibleLayer = true

Expand Down
4 changes: 3 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ func init() {
// +kubebuilder:scaffold:scheme
}

// TODO fix linting (cyclop)
// TODO fix linting (cyclop,funlen)
//
//nolint:cyclop,funlen
func main() {
var metricsAddr string
var certDir string
Expand Down
2 changes: 2 additions & 0 deletions config/crd/update_openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ func main() {
}

// TODO fix linting (funlen)
//
//nolint:funlen
func updateWMSV3Layers(crdDir string) {
path := filepath.Join(crdDir, "pdok.nl_wms.yaml")

Expand Down
3 changes: 3 additions & 0 deletions internal/controller/capabilitiesgenerator/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ func mapServiceProvider(provider *smoothoperatorv1.ServiceProvider) (serviceProv
}

// TODO fix linting (nestif)
//nolint:nestif
if provider.ServiceContact != nil {
serviceProvider.ServiceContact = &wfs200.ServiceContact{
IndividualName: provider.ServiceContact.IndividualName,
Expand Down Expand Up @@ -363,6 +364,8 @@ func getDcpType(url string, fillPost bool) *wms130.DCPType {
}

// TODO fix linting (funlen)
//
//nolint:funlen
func getLayers(wms *pdoknlv3.WMS, canonicalURL string) []wms130.Layer {
result := make([]wms130.Layer, 0)
referenceLayer := wms.Spec.Service.Layer
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/mapfilegenerator/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ func MapWMSToMapfileGeneratorInput(wms *pdoknlv3.WMS, _ *smoothoperatorv1.OwnerI
}

// TODO fix linting (cyclop)
//
//nolint:cyclop
func getWMSLayer(serviceLayer pdoknlv3.Layer, serviceExtent string, wms *pdoknlv3.WMS) WMSLayer {
layerExtent := serviceExtent
if len(serviceLayer.BoundingBoxes) > 0 {
Expand Down
6 changes: 5 additions & 1 deletion internal/controller/mapserver/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const (
)

// TODO fix linting (funlen)
//
//nolint:funlen
func GetVolumesForDeployment[O pdoknlv3.WMSWFS](obj O, configMapNames types.HashedConfigMapNames) []v1.Volume {
baseVolume := v1.Volume{Name: "base"}
if use, size := mapperutils.UseEphemeralVolume(obj); use {
Expand Down Expand Up @@ -227,8 +229,10 @@ func GetEnvVarsForDeployment[O pdoknlv3.WMSWFS](obj O, blobsSecretName string) [
}
}

// TODO fix linting (cyclop)
// TODO fix linting (cyclop,funlen)
// Resources for mapserver container
//
//nolint:cyclop,funlen
func GetResourcesForDeployment[O pdoknlv3.WMSWFS](obj O) v1.ResourceRequirements {
resources := v1.ResourceRequirements{
Limits: v1.ResourceList{},
Expand Down
7 changes: 6 additions & 1 deletion internal/controller/shared_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,9 @@ func getFinalizerName[O pdoknlv3.WMSWFS](obj O) string {
return strings.ToLower(string(obj.Type())) + "." + pdoknlv3.GroupVersion.Group + "/finalizer"
}

// TODO fix linting (cyclop)
// TODO fix linting (cyclop,funlen)
//
//nolint:cyclop,funlen
func createOrUpdateAllForWMSWFS[R Reconciler, O pdoknlv3.WMSWFS](ctx context.Context, r R, obj O, ownerInfo *smoothoperatorv1.OwnerInfo) (operationResults map[string]controllerutil.OperationResult, err error) {
operationResults = make(map[string]controllerutil.OperationResult)
reconcilerClient := getReconcilerClient(r)
Expand Down Expand Up @@ -1084,6 +1086,7 @@ func createOrUpdateAllForWMSWFS[R Reconciler, O pdoknlv3.WMSWFS](ctx context.Con
// end region ConfigMap-BlobDownload

// TODO fix linting (nestif)
//nolint:nestif
if obj.Type() == pdoknlv3.ServiceTypeWMS {
wms, _ := any(obj).(*pdoknlv3.WMS)
wmsReconciler := (*WMSReconciler)(r)
Expand Down Expand Up @@ -1220,6 +1223,8 @@ func createOrUpdateAllForWMSWFS[R Reconciler, O pdoknlv3.WMSWFS](ctx context.Con
}

// TODO fix linting (funlen)
//
//nolint:funlen
func deleteAllForWMSWFS[R Reconciler, O pdoknlv3.WMSWFS](ctx context.Context, r R, obj O, ownerInfo *smoothoperatorv1.OwnerInfo) (err error) {
bareObjects := getSharedBareObjects(obj)
var objects []client.Object
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/wfs_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ type WFSReconciler struct {
// For more details, check Reconcile and its Result here:
// - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile
// TODO fix linting (dupl)
//
//nolint:dupl
func (r *WFSReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error) {
lgr := log.FromContext(ctx)
lgr.Info("Starting reconcile for WFS resource", "name", req.NamespacedName)
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/wms_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ type WMSReconciler struct {
// For more details, check Reconcile and its Result here:
// - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile
// TODO fix linting (dupl)
//
//nolint:dupl
func (r *WMSReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error) {
lgr := log.FromContext(ctx)
lgr.Info("Starting reconcile for WMS resource", "name", req.NamespacedName)
Expand Down
2 changes: 1 addition & 1 deletion internal/webhook/v3/wfs_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

//nolint:dupl
package v3

// TODO fix linting (dupl)
import (
"context"
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion internal/webhook/v3/wms_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

//nolint:dupl
package v3

// TODO fix linting (dupl)
import (
"context"
"fmt"
Expand Down
Loading