diff --git a/.golangci.yml b/.golangci.yml index 4724b4f..7e2aa0f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,7 @@ --- run: # concurrency: 6 - go: "1.20" + go: "1.23" timeout: 2m issues-exit-code: 1 tests: true @@ -17,7 +17,8 @@ linters-settings: check-type-assertions: false check-blank: false govet: - check-shadowing: true + enable: + - shadow settings: printf: funcs: @@ -25,19 +26,15 @@ linters-settings: - (github.com/sirupsen/logrus.FieldLogger).Warnf - (github.com/sirupsen/logrus.FieldLogger).Errorf - (github.com/sirupsen/logrus.FieldLogger).Fatalf - revive: - min-confidence: 0.8 goimports: local-prefixes: github.com/networkservicemesh gocyclo: min-complexity: 20 - maligned: - suggest-new: true dupl: threshold: 150 funlen: - Lines: 175 - Statements: 100 + lines: 175 + statements: 100 goconst: min-len: 2 min-occurrences: 2 @@ -127,10 +124,8 @@ linters-settings: linters: disable-all: true enable: - # - rowserrcheck - goheader - bodyclose - - deadcode - depguard - dogsled - dupl @@ -147,19 +142,16 @@ linters: - gosimple - govet - ineffassign - # - lll - misspell - nakedret - - exportloopref - staticcheck - - structcheck - stylecheck - typecheck - unconvert - unparam - # - unused - - varcheck - whitespace + - unused + - copyloopvar issues: exclude-use-default: false max-issues-per-linter: 0 diff --git a/auto_shutdown_test.go b/auto_shutdown_test.go index b743853..851516b 100644 --- a/auto_shutdown_test.go +++ b/auto_shutdown_test.go @@ -16,6 +16,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build linux +// +build linux + package main_test import ( diff --git a/go.mod b/go.mod index b4a3f20..dc6eeda 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/networkservicemesh/cmd-nse-icmp-responder -go 1.20 +go 1.23 require ( github.com/antonfisher/nested-logrus-formatter v1.3.1 diff --git a/internal/pkg/imports/gen.go b/internal/pkg/imports/gen.go index 1373eeb..d4a8afc 100644 --- a/internal/pkg/imports/gen.go +++ b/internal/pkg/imports/gen.go @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022 Cisco and/or its affiliates. +// Copyright (c) 2020-2024 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/suite_healthcheck_test.go b/suite_healthcheck_test.go index f27ea04..65ae503 100644 --- a/suite_healthcheck_test.go +++ b/suite_healthcheck_test.go @@ -16,6 +16,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build linux +// +build linux + package main_test import ( diff --git a/suite_setup_test.go b/suite_setup_test.go index fb099dc..d1715f3 100644 --- a/suite_setup_test.go +++ b/suite_setup_test.go @@ -16,6 +16,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build linux +// +build linux + package main_test import ( diff --git a/suite_test.go b/suite_test.go index 821cef1..2d03d77 100644 --- a/suite_test.go +++ b/suite_test.go @@ -16,6 +16,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build linux +// +build linux + package main_test import ( diff --git a/suite_util_test.go b/suite_util_test.go index 9514217..c544640 100644 --- a/suite_util_test.go +++ b/suite_util_test.go @@ -16,6 +16,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build linux +// +build linux + package main_test import (