From 6f3ae72fd2928c6a67d3d5e2d55e6590d9f299fa Mon Sep 17 00:00:00 2001 From: Rafal Korepta Date: Wed, 3 Mar 2021 13:11:08 +0100 Subject: [PATCH] operator: operator/linter: Change golint confidence in golangci-lint The minimal confidence set to 0 causes golint to report false possitive message about package godoc. It can be disabled by changing the confidence. Message: "should have a package comment, unless it's in another file for this package (golint)" REF: https://github.com/golangci/golangci-lint/issues/1556#issuecomment-744021989 --- .golangci.yml | 5 ++++- apis/redpanda/v1alpha1/cluster_types.go | 1 - apis/redpanda/v1alpha1/cluster_webhook.go | 1 - pkg/resources/configmap.go | 1 - pkg/resources/service.go | 1 - pkg/resources/statefulset.go | 1 - pkg/resources/statefulset_update.go | 1 - 7 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9702087b6465a..2c029116e3c13 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -17,7 +17,10 @@ linters-settings: - performance - style golint: - min-confidence: 0 + # The package comment is false positive so the min-confidance needs to be + # set to at least 0.3 + # Ref https://github.com/golangci/golangci-lint/issues/1556#issuecomment-744021989 + min-confidence: 0.3 gomnd: settings: mnd: diff --git a/apis/redpanda/v1alpha1/cluster_types.go b/apis/redpanda/v1alpha1/cluster_types.go index a2a8ad7aa6235..2b060ec4765d5 100644 --- a/apis/redpanda/v1alpha1/cluster_types.go +++ b/apis/redpanda/v1alpha1/cluster_types.go @@ -7,7 +7,6 @@ // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0 -// Package v1alpha1 represent Custom Resource definition of the vectorized.io redpanda group package v1alpha1 import ( diff --git a/apis/redpanda/v1alpha1/cluster_webhook.go b/apis/redpanda/v1alpha1/cluster_webhook.go index a9b5939057ed7..04c5693b024ed 100644 --- a/apis/redpanda/v1alpha1/cluster_webhook.go +++ b/apis/redpanda/v1alpha1/cluster_webhook.go @@ -7,7 +7,6 @@ // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0 -// Package v1alpha1 represent Custom Resource definition of the vectorized.io redpanda group package v1alpha1 import ( diff --git a/pkg/resources/configmap.go b/pkg/resources/configmap.go index db4e3aa6dfcf4..d2ea0230b73c5 100644 --- a/pkg/resources/configmap.go +++ b/pkg/resources/configmap.go @@ -7,7 +7,6 @@ // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0 -// Package resources contains reconciliation logic for redpanda.vectorized.io CRD package resources import ( diff --git a/pkg/resources/service.go b/pkg/resources/service.go index 29755127a3ae5..c1450bf6977ab 100644 --- a/pkg/resources/service.go +++ b/pkg/resources/service.go @@ -7,7 +7,6 @@ // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0 -// Package resources contains reconciliation logic for redpanda.vectorized.io CRD package resources import ( diff --git a/pkg/resources/statefulset.go b/pkg/resources/statefulset.go index 737d651270843..a86b75ff7d434 100644 --- a/pkg/resources/statefulset.go +++ b/pkg/resources/statefulset.go @@ -7,7 +7,6 @@ // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0 -// Package resources contains reconciliation logic for redpanda.vectorized.io CRD package resources import ( diff --git a/pkg/resources/statefulset_update.go b/pkg/resources/statefulset_update.go index 43cb2e66ba992..5b2cbd89282e5 100644 --- a/pkg/resources/statefulset_update.go +++ b/pkg/resources/statefulset_update.go @@ -7,7 +7,6 @@ // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0 -// Package resources contains reconciliation logic for redpanda.vectorized.io CRD package resources import (