From 365d7305ae0ccf263a8a78447f6e201976463330 Mon Sep 17 00:00:00 2001 From: "Philip K. Warren" Date: Tue, 25 Jun 2024 16:11:23 -0500 Subject: [PATCH] Update golangci-lint to 1.59.1 (#129) --- .golangci.yml | 19 ++++++------------- Makefile | 2 +- celext/lib_test.go | 4 ++++ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 3001d2f..ab11364 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,3 @@ -run: - skip-dirs-use-default: false linters-settings: errcheck: check-type-assertions: true @@ -24,36 +22,31 @@ linters-settings: linters: enable-all: true disable: + - copyloopvar # enable once go 1.22 is baseline - cyclop # covered by gocyclo - - deadcode # abandoned - depguard # we can manage dependencies strictly if the need arises in the future - - exhaustivestruct # replaced by exhaustruct + - err113 # internal error causes may be dynamic + - execinquery # deprecated by author - exhaustruct # don't _always_ need to exhaustively create struct - funlen # rely on code review to limit function length - gocognit # dubious "cognitive overhead" quantification - gofumpt # prefer standard gofmt - - goerr113 # internal error causes may be dynamic - goimports # rely on gci instead - - golint # deprecated by Go team - gomnd # some unnamed constants are okay - gomoddirectives # we use go modules replacements intentionally - gomodguard # not compatible with go workspaces - - ifshort # deprecated by author - - interfacer # deprecated by author + - intrange # enable once go 1.22 is baseline - ireturn # "accept interfaces, return structs" isn't ironclad - lll # don't want hard limits for line length - maintidx # covered by gocyclo - - maligned # readability trumps efficient struct packing + - mnd # some unnamed constants are okay - nlreturn # generous whitespace violates house style - nonamedreturns # usage of named returns should be selective - - nosnakecase # deprecated in https://github.com/golangci/golangci-lint/pull/3065 - - scopelint # deprecated by author - - structcheck # abandoned - testpackage # internal tests are fine - - varcheck # abandoned - wrapcheck # don't _always_ need to wrap errors - wsl # over-generous whitespace violates house style issues: + exclude-use-default: true exclude: # we will continue to support the deprecated field until it's removed - "IgnoreEmpty is deprecated" diff --git a/Makefile b/Makefile index ed2ae99..2af0c78 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ LICENSE_IGNORE := -e internal/testdata/ # Set to use a different compiler. For example, `GO=go1.18rc1 make test`. GO ?= go ARGS ?= --strict --strict_message --strict_error -GOLANGCI_LINT_VERSION ?= v1.56.1 +GOLANGCI_LINT_VERSION ?= v1.59.1 # Set to use a different version of protovalidate-conformance. # Should be kept in sync with the version referenced in proto/buf.lock and # 'buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go' in go.mod. diff --git a/celext/lib_test.go b/celext/lib_test.go index 40f3966..63393bd 100644 --- a/celext/lib_test.go +++ b/celext/lib_test.go @@ -53,6 +53,10 @@ func TestCELLib(t *testing.T) { "[].unique()", true, }, + { + "[true].unique()", + true, + }, { "[true, false].unique()", true,