diff --git a/.github/workflows/auto-casdiff-comment.yaml b/.github/workflows/auto-casdiff-comment.yaml index 59ffc0eb..f5ff06e6 100644 --- a/.github/workflows/auto-casdiff-comment.yaml +++ b/.github/workflows/auto-casdiff-comment.yaml @@ -26,7 +26,7 @@ jobs: - name: Install Go uses: actions/setup-go@v7 with: - go-version: 1.26.x + go-version: 1.27.x check-latest: true cache: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fd6855d3..ec6e680c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,7 +19,7 @@ jobs: - name: Install Go uses: actions/setup-go@v7 with: - go-version: 1.26.x + go-version: 1.27.x check-latest: true cache: true - name: Test diff --git a/.github/workflows/fetch.yaml b/.github/workflows/fetch.yaml index 5ddbd7d5..4e45a21b 100644 --- a/.github/workflows/fetch.yaml +++ b/.github/workflows/fetch.yaml @@ -27,7 +27,7 @@ jobs: - name: Install Go uses: actions/setup-go@v7 with: - go-version: 1.26.x + go-version: 1.27.x check-latest: true cache: true - uses: bufbuild/buf-action@fd21066df7214747548607aaa45548ba2b9bc1ff # v1.4.0 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 11e67f66..a5abe7d9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: - name: Install Go uses: actions/setup-go@v7 with: - go-version: 1.26.x + go-version: 1.27.x check-latest: true cache: true - name: Create Release @@ -70,7 +70,7 @@ jobs: - name: Install Go uses: actions/setup-go@v7 with: - go-version: 1.26.x + go-version: 1.27.x check-latest: true cache: true - name: Auth To GCP diff --git a/.golangci.yaml b/.golangci.yaml index e4d6c0cf..4b6fa9a6 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -2,23 +2,24 @@ version: "2" linters: default: all disable: - - cyclop # covered by gocyclo - - depguard # requires configuration for all non-stdlib deps - - exhaustruct # irrelevant for modules - - funlen # rely on code review to limit function length - - gocognit # dubious "cognitive overhead" quantification - - gomodguard # replaced by gomodguard_v2 - - ireturn # "accept interfaces, return structs" isn't ironclad - - lll # don't want hard limits for line length - - maintidx # covered by gocyclo - - mnd # some unnamed constants are okay - - nlreturn # generous whitespace violates house style - - noinlineerr # inline error handling is idiomatic here - - testpackage # internal tests are fine - - varnamelen # too strict for common from/to and format f variables - - wrapcheck # don't _always_ need to wrap errors - - wsl # generous whitespace violates house style - - wsl_v5 # generous whitespace violates house style + - cyclop # covered by gocyclo + - depguard # requires configuration for all non-stdlib deps + - exhaustruct # irrelevant for modules + - exhaustruct_v5 # irrelevant for modules + - funlen # rely on code review to limit function length + - gocognit # dubious "cognitive overhead" quantification + - gomodguard # replaced by gomodguard_v2 + - ireturn # "accept interfaces, return structs" isn't ironclad + - lll # don't want hard limits for line length + - maintidx # covered by gocyclo + - mnd # some unnamed constants are okay + - nlreturn # generous whitespace violates house style + - noinlineerr # inline error handling is idiomatic here + - testpackage # internal tests are fine + - varnamelen # too strict for common from/to and format f variables + - wrapcheck # don't _always_ need to wrap errors + - wsl # generous whitespace violates house style + - wsl_v5 # generous whitespace violates house style settings: errcheck: check-type-assertions: true diff --git a/Makefile b/Makefile index 7ef096a9..d9438c00 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ MAKEFLAGS += --no-builtin-rules MAKEFLAGS += --no-print-directory BIN := .tmp/bin COPYRIGHT_YEARS := 2021-2025 -GOLANGCI_LINT_VERSION ?= v2.12.2 +GOLANGCI_LINT_VERSION ?= v2.13.2 LICENSE_IGNORE := --ignore /testdata/ --ignore '\.yaml$$' --ignore '\.yml$$' # Set to use a different compiler. For example, `GO=go1.18rc1 make test`. GO ?= go diff --git a/cmd/commentprcasdiff/comment_poster.go b/cmd/commentprcasdiff/comment_poster.go index 3c0a16f4..f5c51fca 100644 --- a/cmd/commentprcasdiff/comment_poster.go +++ b/cmd/commentprcasdiff/comment_poster.go @@ -71,9 +71,9 @@ func listExistingBotComments(ctx context.Context, client *githubutil.Client, prN const githubActionsBotUsername = "github-actions[bot]" result := make(map[commentKey]int64) opts := &github.PullRequestListCommentsOptions{ - Sort: "created", - Direction: "asc", - ListOptions: github.ListOptions{PerPage: 100}, + Sort: "created", + Direction: "asc", + PerPage: 100, } for { comments, resp, err := client.GitHub.PullRequests.ListComments( diff --git a/go.mod b/go.mod index 490a0651..43cf582a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/bufbuild/modules -go 1.26.7 +go 1.27 require ( buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.12-20260825204119-511051f7f437.2