Skip to content

Commit

Permalink
use golangci-lint v1.61.0
Browse files Browse the repository at this point in the history
Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
  • Loading branch information
ushitora-anqou committed Oct 25, 2024
1 parent 2879e82 commit 5a92d40
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ linters:
enable:
- dupl
- errcheck
- exportloopref
- copyloopvar
- goconst
- gocyclo
- gofmt
Expand Down
2 changes: 0 additions & 2 deletions internal/controller/mantlebackup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,6 @@ func (r *MantleBackupReconciler) prepareForDataSynchronization(
func convertToMap(mantleBackups []mantlev1.MantleBackup) map[string]*mantlev1.MantleBackup {
m := make(map[string]*mantlev1.MantleBackup)
for _, mantleBackup := range mantleBackups {
mantleBackup := mantleBackup
m[mantleBackup.GetName()] = &mantleBackup
}
return m
Expand All @@ -826,7 +825,6 @@ func searchForDiffOriginMantleBackup(
) *mantlev1.MantleBackup {
var diffOrigin *mantlev1.MantleBackup
for _, primaryBackup := range primaryBackups {
primaryBackup := primaryBackup
secondaryBackup, ok := secondaryBackupMap[primaryBackup.Name]
if !ok {
continue
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/singlek8s/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func backupTestSuite() {

func (test *backupTest) setupEnv() {
It("setting up the test environment", func() {
fmt.Fprintf(GinkgoWriter, "%+v\n", *test)
_, _ = fmt.Fprintf(GinkgoWriter, "%+v\n", *test)
})

It("creating common resources", func() {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/singlek8s/multi_rook_ceph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func multiRookCephTestSuite() {

func (test *multiRookCephTest) setupEnv() {
It("setting up the test environment", func() {
fmt.Fprintf(GinkgoWriter, "%+v\n", *test)
_, _ = fmt.Fprintf(GinkgoWriter, "%+v\n", *test)
})

It("creating common resources", func() {
Expand All @@ -59,7 +59,6 @@ func (test *multiRookCephTest) setupEnv() {

func (test *multiRookCephTest) teardownEnv() {
for _, ns := range []string{test.tenantNamespace1, test.tenantNamespace2} {
ns := ns
It("delete resources in the namespace: "+ns, func() {
err := deleteNamespacedResource(ns, "mantlerestore")
Expect(err).NotTo(HaveOccurred())
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/singlek8s/restore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func restoreTestSuite() {

func (test *restoreTest) setupEnv() {
It("describing the test environment", func() {
fmt.Fprintf(GinkgoWriter, "%+v\n", *test)
_, _ = fmt.Fprintf(GinkgoWriter, "%+v\n", *test)
})

It("creating common resources", func() {
Expand Down
2 changes: 1 addition & 1 deletion versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PROTOC_VERSION := 28.3
# https://github.com/rook/rook/releases
ROOK_CHART_VERSION := v1.15.4
# https://github.com/golangci/golangci-lint/releases
GOLANGCI_LINT_VERSION := v1.54.2
GOLANGCI_LINT_VERSION := v1.61.0

# Tools versions which are defined in go.mod
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
Expand Down

0 comments on commit 5a92d40

Please sign in to comment.