Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require go 1.21, test with go 1.23 #79

Merged
merged 3 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.20.x,1.21.x,1.22.x]
go-version: [1.21.x,1.22.x,1.23.x]
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand All @@ -30,5 +30,5 @@ jobs:
- name: Lint
# Often, lint & gofmt guidelines depend on the Go version. To prevent
# conflicting guidance, run only on the most recent supported version.
if: matrix.go-version == '1.22.x'
if: matrix.go-version == '1.23.x'
run: make checkgenerate && make lint
16 changes: 3 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
run:
skip-dirs-use-default: false
linters-settings:
errcheck:
check-type-assertions: true
Expand Down Expand Up @@ -29,34 +27,26 @@ linters:
enable-all: true
disable:
- cyclop # covered by gocyclo
- deadcode # abandoned
- depguard # unnecessary for small libraries
- exhaustivestruct # replaced by exhaustruct
- execinquery # deprecated in golangci v1.58
- 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
- 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
- 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
- protogetter # too many false positives
- scopelint # deprecated by author
- structcheck # abandoned
- testpackage # internal tests are fine
- varcheck # abandoned
- wrapcheck # don't _always_ need to wrap errors
- wsl # generous whitespace violates house style
issues:
exclude-dirs-use-default: false
exclude:
# 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.*"
- "do not define dynamic errors.*"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ $(BIN)/license-header: Makefile

$(BIN)/golangci-lint: Makefile
@mkdir -p $(@D)
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.0

$(BIN)/protoc-gen-go: Makefile
@mkdir -p $(@D)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module connectrpc.com/grpcreflect

go 1.20
go 1.21

require (
connectrpc.com/connect v1.11.0
Expand Down
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.19
go 1.21

use (
.
Expand Down