Skip to content

Commit

Permalink
Update makego dependencies and lint config
Browse files Browse the repository at this point in the history
  • Loading branch information
pkwarren committed May 24, 2024
1 parent 2c4ad32 commit a081c5c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
14 changes: 11 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
linters-settings:
errcheck:
check-type-assertions: true
# https://github.com/golangci/golangci-lint/pull/4734.
# Remove when upgrading to next golangci-lint release.
ignore: ""
forbidigo:
forbid:
- '^fmt\.Print'
Expand Down Expand Up @@ -29,20 +32,22 @@ linters:
- cyclop # covered by gocyclo
- deadcode # abandoned
- depguard # newer versions require explicit config to depend on anything outside of the Go stdlib
- execinquery # deprecated by author
- exhaustivestruct # replaced by exhaustruct
- funlen # rely on code review to limit function length
- gocognit # dubious "cognitive overhead" quantification
- gofumpt # prefer standard gofmt
- goimports # rely on gci instead
- golint # deprecated by Go team
- gomnd # some unnamed constants are okay
- gomnd # replaced by mnd
- ifshort # deprecated by author
- inamedparam # convention is not followed
- interfacer # deprecated by author
- 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 # named returns are fine; it's *bare* returns that are bad
- nosnakecase # deprecated in https://github.com/golangci/golangci-lint/pull/3065
Expand All @@ -54,7 +59,10 @@ linters:
- wsl # generous whitespace violates house style
issues:
exclude-dirs-use-default: false
exclude:
exclude-rules:
# Don't ban use of fmt.Errorf to create new errors, but the remaining
# checks from err113 are useful.
- "err113: do not define dynamic errors.*"
- linters:
- err113
- goerr113
text: "do not define dynamic errors"
4 changes: 2 additions & 2 deletions make/go/dep_buf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ $(call _assert_var,CACHE_VERSIONS)
$(call _assert_var,CACHE_BIN)

# Settable
# https://github.com/bufbuild/buf/releases 20240516 checked 20240517
BUF_VERSION ?= v1.32.0
# https://github.com/bufbuild/buf/releases 20240521 checked 20240524
BUF_VERSION ?= v1.32.1
# Settable
#
# If set, this path will be installed every time someone depends on $(BUF)
Expand Down
4 changes: 2 additions & 2 deletions make/go/dep_golangci_lint.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ $(call _assert_var,CACHE_VERSIONS)
$(call _assert_var,CACHE_BIN)

# Settable
# https://github.com/golangci/golangci-lint/releases 20240320 checked 20240320
# https://github.com/golangci/golangci-lint/releases 20240519 checked 20240524
# Contrast golangci-lint configuration with the one in https://github.com/connectrpc/connect-go/blob/main/.golangci.yml when upgrading
GOLANGCI_LINT_VERSION ?= v1.57.1
GOLANGCI_LINT_VERSION ?= v1.58.2

GOLANGCI_LINT := $(CACHE_VERSIONS)/golangci-lint/$(GOLANGCI_LINT_VERSION)
$(GOLANGCI_LINT):
Expand Down
4 changes: 2 additions & 2 deletions make/go/dep_minisign.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ $(call _assert_var,CACHE_VERSIONS)
$(call _assert_var,CACHE_BIN)

# Settable
# https://github.com/aead/minisign 20231031 checked 20231211
MINISIGN_VERSION ?= v0.2.1
# https://github.com/aead/minisign 20240519 checked 20240524
MINISIGN_VERSION ?= v0.3.0

MINISIGN := $(CACHE_VERSIONS)/MINISIGN/$(MINISIGN_VERSION)
$(MINISIGN):
Expand Down
4 changes: 2 additions & 2 deletions make/go/dep_protoc_gen_connect_go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ $(call _assert_var,CACHE_VERSIONS)
$(call _assert_var,CACHE_BIN)

# Settable
# https://github.com/connectrpc/connect-go 20240417 checked 20240418
CONNECT_VERSION ?= v1.16.1
# https://github.com/connectrpc/connect-go 20240513 checked 20240524
CONNECT_VERSION ?= v1.16.2

GO_GET_PKGS := $(GO_GET_PKGS) \
connectrpc.com/connect@$(CONNECT_VERSION)
Expand Down
4 changes: 2 additions & 2 deletions make/go/dep_yq.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ $(call _assert_var,CACHE_VERSIONS)
$(call _assert_var,CACHE_BIN)

# Settable
# https://github.com/mikefarah/yq/releases 20240225 checked 20240320
YQ_VERSION ?= v4.42.1
# https://github.com/mikefarah/yq/releases 20240511 checked 20240524
YQ_VERSION ?= v4.44.1

ifeq ($(UNAME_OS),Darwin)
YQ_OS := darwin
Expand Down

0 comments on commit a081c5c

Please sign in to comment.