diff --git a/.golangci.yml b/.golangci.yml index 56a199f..d807400 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,34 +1,38 @@ -run: - timeout: 10m +version: "2" linters: + default: none enable: - depguard - - gofmt - - goimports - revive - govet - importas - ineffassign - misspell - - typecheck - errname - makezero - whitespace - disable-all: true - -linters-settings: - depguard: + settings: + depguard: + rules: + main: + deny: + - pkg: io/ioutil + desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil + importas: + no-unaliased: true + exclusions: + generated: lax rules: - main: - deny: - - pkg: io/ioutil - desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil - importas: - no-unaliased: true + - linters: + - revive + text: stutters + +formatters: + enable: + - gofmt + - goimports issues: - exclude-rules: - - linters: - - revive - text: "stutters" + max-issues-per-linter: 0 + max-same-issues: 0 diff --git a/Dockerfile b/Dockerfile index b075df2..d3fdb0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG GO_VERSION="1.23" ARG XX_VERSION="1.6.1" -ARG GOLANGCI_LINT_VERSION="v1.62" +ARG GOLANGCI_LINT_VERSION="v2.1.5" ARG ADDLICENSE_VERSION="v1.1.1" ARG LICENSE_ARGS="-c cli-docs-tool -l apache" diff --git a/annotation/annotation.go b/annotation/annotation.go index 021846a..ebc1ed2 100644 --- a/annotation/annotation.go +++ b/annotation/annotation.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package annotation handles annotations for CLI commands. package annotation const ( diff --git a/clidocstool.go b/clidocstool.go index 5b25de0..cee6dbe 100644 --- a/clidocstool.go +++ b/clidocstool.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package clidocstool provides tools for generating CLI documentation. package clidocstool import (