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

backend: update Go to v1.23 and linter #1389

Merged
merged 2 commits into from
Aug 19, 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/backend-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
with:
go-version: 'stable'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: v1.57
version: v1.60
working-directory: backend
args: --timeout=10m --config=.golangci.yaml
- name: Install Task
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 3

vars:
GO_VERSION: 1.22.2
GO_VERSION: 1.23.0
BUILD_ROOT: "{{ .ROOT_DIR }}/build"
GO_BUILD_ROOT: '{{.BUILD_ROOT}}/go/{{.GO_VERSION}}'
PATH_PREFIX: PATH={{.BUILD_ROOT}}/bin:{{.GO_BUILD_ROOT}}/bin:{{.BUILD_ROOT}}/bin/go:$PATH GOBIN={{ .BUILD_ROOT }}/bin/go GOROOT=
Expand Down
6 changes: 0 additions & 6 deletions backend/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ linters-settings:
# We do not want every usage of fmt.Errorf to use %w.
errorlint:
errorf: false
# If gofumpt is run outside of a module, it assumes Go 1.0 rather than the
# latest Go. We always want the latest formatting.
#
# https://github.com/mvdan/gofumpt/issues/137
gofumpt:
lang-version: "1.22"
gosec:
excludes:
- G104 # unhandled errors, we exclude for the same reason we do not use errcheck
Expand Down
2 changes: 1 addition & 1 deletion backend/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redpanda-data/console/backend

go 1.22.2
go 1.23.0

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240717164558-a6c49f84cc0f.2
Expand Down
75 changes: 1 addition & 74 deletions backend/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion backend/pkg/console/config_extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func loadConfigExtensions() (map[string]ConfigEntryExtension, error) {
}

// Index all config entries by config name
//nolint: gocritic // Opting for better code readability at the cost of few additional kb in memory usage
//nolint:gocritic // Opting for better code readability at the cost of few additional kb in memory usage
allConfigs := append(rpConfigs, apacheKafkaConfigs...)
configsByName := make(map[string]ConfigEntryExtension)
for _, config := range allConfigs {
Expand Down
6 changes: 3 additions & 3 deletions taskfiles/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tasks:
install-golangci-lint:
desc: install golangci linter
vars:
GO_LINT_VERSION: 1.57.2
GO_LINT_VERSION: 1.60.1
cmds:
- mkdir -p {{ .BUILD_ROOT}}/bin
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "{{ .BUILD_ROOT }}"/bin/go v{{ .GO_LINT_VERSION }}
Expand All @@ -39,7 +39,7 @@ tasks:

install-gofumpt:
vars:
GOFUMPT_VERSION: 0.6.0
GOFUMPT_VERSION: 0.7.0
desc: install gofumpt go formater
deps:
- install-go
Expand All @@ -52,7 +52,7 @@ tasks:

install-gci:
vars:
GCI_VERSION: 0.13.0
GCI_VERSION: 0.13.4
desc: install gci
deps:
- install-go
Expand Down
Loading