diff --git a/README.md b/README.md index 9bfacb0..b3d20af 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ import _ "github.com/bool64/dev" // Include development helpers to project. Add `Makefile` to your module with includes standard targets. ```Makefile -#GOLANGCI_LINT_VERSION := "v1.63.4" # Optional configuration to pinpoint golangci-lint version. +#GOLANGCI_LINT_VERSION := "v1.64.5" # Optional configuration to pinpoint golangci-lint version. # The head of Makefile determines location of dev-go to include standard targets. GO ?= go diff --git a/makefiles/base.mk b/makefiles/base.mk index f22bfa4..8b4c583 100644 --- a/makefiles/base.mk +++ b/makefiles/base.mk @@ -1,4 +1,4 @@ -#GOLANGCI_LINT_VERSION := "v1.63.4" # Optional configuration to pinpoint golangci-lint version. +#GOLANGCI_LINT_VERSION := "v1.64.5" # Optional configuration to pinpoint golangci-lint version. # The head of Makefile determines location of dev-go to include standard targets. GO ?= go diff --git a/scripts/.golangci-internal.yml b/scripts/.golangci-internal.yml deleted file mode 100644 index 77113e5..0000000 --- a/scripts/.golangci-internal.yml +++ /dev/null @@ -1,15 +0,0 @@ -# See https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml -run: - tests: false - -linters-settings: - unused: - check-exported: true - unparam: - check-exported: true - -linters: - disable-all: true - enable: - - unused - - unparam diff --git a/scripts/.golangci.yml b/scripts/.golangci.yml index 2b9cd73..86f78e7 100644 --- a/scripts/.golangci.yml +++ b/scripts/.golangci.yml @@ -12,14 +12,14 @@ linters-settings: threshold: 100 misspell: locale: US - unused: - check-exported: false unparam: check-exported: true linters: enable-all: true disable: + - intrange + - copyloopvar - lll - gochecknoglobals - wrapcheck @@ -36,7 +36,6 @@ linters: - dupword - depguard - tagalign - - execinquery - mnd - testifylint - recvcheck @@ -50,7 +49,6 @@ issues: - noctx - funlen - dupl - - structcheck - unused - unparam path: "_test.go" diff --git a/scripts/lint.sh b/scripts/lint.sh index b71254d..93c8e2b 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash [ -z "$GO" ] && GO=go -[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.63.4" +[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.64.5" # detecting GOPATH and removing trailing "/" if any GOPATH="$(go env GOPATH)" @@ -25,8 +25,3 @@ fi echo "Checking packages." golangci-lint-"$GOLANGCI_LINT_VERSION" run -c "$golangci_yml" ./... || exit 1 - -if [[ -d "./internal" && -d "./cmd" ]]; then - echo "Checking unused exported symbols in internal packages." - golangci-lint-"$GOLANGCI_LINT_VERSION" run -c "$this_path"/.golangci-internal.yml ./internal/... ./cmd/... || exit 1 -fi diff --git a/templates/github/workflows/golangci-lint.yml b/templates/github/workflows/golangci-lint.yml index ae2c76d..a3b265d 100644 --- a/templates/github/workflows/golangci-lint.yml +++ b/templates/github/workflows/golangci-lint.yml @@ -24,10 +24,10 @@ jobs: go-version: stable - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v6.2.0 + uses: golangci/golangci-lint-action@v6.5.0 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.63.4 + version: v1.64.5 # Optional: working directory, useful for monorepos # working-directory: somedir