diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d9e3d3bac0..36ec9b3178 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: shell: bash strategy: matrix: - go-version: [1.x, 1.21.x] + go-version: [1.x, 1.22.x] platform: [ubuntu-latest] include: # include windows, but only with the latest Go version, since there diff --git a/.golangci.yml b/.golangci.yml index 79d8481fd6..5f602dd263 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -23,6 +23,8 @@ linters-settings: # performance issue: see https://github.com/golangci/golangci-lint/issues/4039 # and https://github.com/securego/gosec/issues/1007 - G602 + # int(os.Stdin.Fd()) + - G115 issues: exclude-use-default: false exclude-rules: @@ -43,9 +45,9 @@ issues: text: 'G505: Blocklisted import crypto/sha1: weak cryptographic primitive' # This is adapted from golangci-lint's default exclusions. It disables linting for error checks on - # os.RemoveAll and any function ending in "Close". + # os.RemoveAll, fmt.Fprint*, fmt.Scanf, and any function ending in "Close". - linters: [ errcheck ] - text: Error return value of .(.*Close|os\.Remove(All)?). is not checked + text: Error return value of .(.*Close|fmt\.Fprint.*|fmt\.Scanf|os\.Remove(All)?). is not checked # We don't care about file inclusion via variable in examples or internal tools. - linters: [ gosec ] diff --git a/script/lint.sh b/script/lint.sh index b76758a47d..ccd0cf1150 100755 --- a/script/lint.sh +++ b/script/lint.sh @@ -5,7 +5,7 @@ set -e -GOLANGCI_LINT_VERSION="1.54.2" +GOLANGCI_LINT_VERSION="1.60.2" CDPATH="" cd -- "$(dirname -- "$0")/.." BIN="$(pwd -P)"/bin