Skip to content

Commit 1bdc798

Browse files
authored
Merge pull request #3866 from prashantrewar/apply-latest-lint-rules
🌱Evaludate and Apply Latest Lint Rules and Features
2 parents 8847d19 + 5194900 commit 1bdc798

File tree

179 files changed

+58
-356
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+58
-356
lines changed

.golangci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ linters-settings:
2626
- name: context-as-argument
2727
- name: context-keys-type
2828
- name: dot-imports
29+
arguments:
30+
# dot import should be ONLY allowed for ginkgo testing packages
31+
allowedPackages:
32+
- "github.com/onsi/ginkgo/v2"
33+
- "github.com/onsi/gomega"
2934
- name: error-return
3035
- name: error-strings
3136
- name: error-naming

docs/book/src/component-config-tutorial/testdata/project/test/e2e/e2e_suite_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ import (
2020
"fmt"
2121
"testing"
2222

23-
// nolint:revive
2423
. "github.com/onsi/ginkgo/v2"
25-
// nolint:revive
2624
. "github.com/onsi/gomega"
2725
)
2826

docs/book/src/component-config-tutorial/testdata/project/test/e2e/e2e_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ import (
2121
"os/exec"
2222
"time"
2323

24-
// nolint:revive
2524
. "github.com/onsi/ginkgo/v2"
26-
// nolint:revive
2725
. "github.com/onsi/gomega"
2826

2927
"tutorial.kubebuilder.io/project/test/utils"

docs/book/src/component-config-tutorial/testdata/project/test/utils/utils.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"os/exec"
2323
"strings"
2424

25-
// nolint:revive
2625
. "github.com/onsi/ginkgo/v2" //nolint:golint,revive
2726
)
2827

docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_webhook_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ limitations under the License.
1717
package v1
1818

1919
import (
20-
// nolint:revive
2120
. "github.com/onsi/ginkgo/v2"
2221
)
2322

docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ import (
2626
"testing"
2727
"time"
2828

29-
// nolint:revive
3029
. "github.com/onsi/ginkgo/v2"
31-
// nolint:revive
3230
. "github.com/onsi/gomega"
33-
admissionv1 "k8s.io/api/admission/v1"
3431

32+
admissionv1 "k8s.io/api/admission/v1"
3533
//+kubebuilder:scaffold:imports
3634
apimachineryruntime "k8s.io/apimachinery/pkg/runtime"
3735
"k8s.io/client-go/rest"

docs/book/src/cronjob-tutorial/testdata/project/internal/controller/cronjob_controller_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ import (
2929
"reflect"
3030
"time"
3131

32-
// nolint:revive
33-
. "github.com/onsi/ginkgo/v2"
34-
// nolint:revive
35-
. "github.com/onsi/gomega"
32+
. "github.com/onsi/ginkgo/v2"
33+
. "github.com/onsi/gomega"
3634
batchv1 "k8s.io/api/batch/v1"
3735
v1 "k8s.io/api/core/v1"
3836
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

docs/book/src/cronjob-tutorial/testdata/project/internal/controller/suite_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ import (
3434

3535
ctrl "sigs.k8s.io/controller-runtime"
3636

37-
// nolint:revive
3837
. "github.com/onsi/ginkgo/v2"
39-
// nolint:revive
4038
. "github.com/onsi/gomega"
4139

4240
"k8s.io/client-go/kubernetes/scheme"

docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_suite_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ import (
2020
"fmt"
2121
"testing"
2222

23-
// nolint:revive
2423
. "github.com/onsi/ginkgo/v2"
25-
// nolint:revive
2624
. "github.com/onsi/gomega"
2725
)
2826

docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ import (
2121
"os/exec"
2222
"time"
2323

24-
// nolint:revive
2524
. "github.com/onsi/ginkgo/v2"
26-
// nolint:revive
2725
. "github.com/onsi/gomega"
2826

2927
"tutorial.kubebuilder.io/project/test/utils"

0 commit comments

Comments
 (0)