Skip to content

Commit 05e2c46

Browse files
author
sapcc-bot
committed
Run go-makefile-maker and autoupdate dependencies
go: upgraded github.com/sapcc/go-bits v0.0.0-20251103130554-313749b69c7d => v0.0.0-20251106135743-875cf285580d
1 parent ab35c0f commit 05e2c46

File tree

11 files changed

+45
-32
lines changed

11 files changed

+45
-32
lines changed

.github/workflows/checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/setup-go@v6
3030
with:
3131
check-latest: true
32-
go-version: 1.25.3
32+
go-version: 1.25.4
3333
- name: Run golangci-lint
3434
uses: golangci/golangci-lint-action@v8
3535
with:

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/setup-go@v6
3333
with:
3434
check-latest: true
35-
go-version: 1.25.3
35+
go-version: 1.25.4
3636
- name: Build all binaries
3737
run: make build-all
3838
code_coverage:
@@ -65,7 +65,7 @@ jobs:
6565
uses: actions/setup-go@v6
6666
with:
6767
check-latest: true
68-
go-version: 1.25.3
68+
go-version: 1.25.4
6969
- name: Run tests and generate coverage report
7070
run: make build/cover.out
7171
- name: Archive code coverage results

.github/workflows/codeql.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/setup-go@v6
3333
with:
3434
check-latest: true
35-
go-version: 1.25.3
35+
go-version: 1.25.4
3636
- name: Initialize CodeQL
3737
uses: github/codeql-action/init@v4
3838
with:

.github/workflows/goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions/setup-go@v6
2828
with:
2929
check-latest: true
30-
go-version: 1.25.3
30+
go-version: 1.25.4
3131
- name: Install syft
3232
uses: anchore/sbom-action/download-syft@v0
3333
- name: Generate release info

.golangci.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ linters:
5757
- intrange
5858
- iotamixing
5959
- misspell
60+
- modernize
6061
- nilerr
6162
- nolintlint
6263
- nosprintfhostport
@@ -144,6 +145,9 @@ linters:
144145
enable-all: true
145146
nolintlint:
146147
require-specific: true
148+
perfsprint:
149+
# modernize generates nicer fix code
150+
concat-loop: false
147151
staticcheck:
148152
dot-import-whitelist:
149153
- github.com/majewsky/gg/option
@@ -168,13 +172,13 @@ linters:
168172
exclusions:
169173
generated: lax
170174
presets:
171-
- comments
172175
- common-false-positives
173176
- legacy
174177
- std-error-handling
175178
rules:
176179
- linters:
177180
- bodyclose
181+
- revive
178182
path: _test\.go
179183
# It is idiomatic Go to reuse the name 'err' with ':=' for subsequent errors.
180184
# Ref: https://go.dev/doc/effective_go#redeclaration

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company
22
# SPDX-License-Identifier: Apache-2.0
33

4-
FROM golang:1.25.3-alpine3.22 AS builder
4+
FROM golang:1.25.4-alpine3.22 AS builder
55

66
RUN apk add --no-cache --no-progress ca-certificates gcc git make musl-dev
77

Makefile

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ install-goimports: FORCE
4747
install-golangci-lint: FORCE
4848
@if ! hash golangci-lint 2>/dev/null; then printf "\e[1;36m>> Installing golangci-lint (this may take a while)...\e[0m\n"; go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest; fi
4949

50-
install-modernize: FORCE
51-
@if ! hash modernize 2>/dev/null; then printf "\e[1;36m>> Installing modernize (this may take a while)...\e[0m\n"; go install golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest; fi
52-
5350
install-shellcheck: FORCE
5451
@if ! hash shellcheck 2>/dev/null; then printf "\e[1;36m>> Installing shellcheck...\e[0m\n"; SHELLCHECK_ARCH=$(shell uname -m); if [[ "$$SHELLCHECK_ARCH" == "arm64" ]]; then SHELLCHECK_ARCH=aarch64; fi; SHELLCHECK_OS=$(shell uname -s | tr '[:upper:]' '[:lower:]'); SHELLCHECK_VERSION="stable"; if command -v curl >/dev/null 2>&1; then GET="curl -sLo-"; elif command -v wget >/dev/null 2>&1; then GET="wget -O-"; else echo "Didn't find curl or wget to download shellcheck"; exit 2; fi; $$GET "https://github.com/koalaman/shellcheck/releases/download/$$SHELLCHECK_VERSION/shellcheck-$$SHELLCHECK_VERSION.$$SHELLCHECK_OS.$$SHELLCHECK_ARCH.tar.xz" | tar -Jxf -; BIN=$$(go env GOBIN); if [[ -z $$BIN ]]; then BIN=$$(go env GOPATH)/bin; fi; install -Dm755 shellcheck-$$SHELLCHECK_VERSION/shellcheck -t "$$BIN"; rm -rf shellcheck-$$SHELLCHECK_VERSION; fi
5552

@@ -62,7 +59,7 @@ install-addlicense: FORCE
6259
install-reuse: FORCE
6360
@if ! hash reuse 2>/dev/null; then if ! hash pipx 2>/dev/null; then printf "\e[1;31m>> You are required to manually intervene to install reuse as go-makefile-maker cannot automatically resolve installing reuse on all setups.\e[0m\n"; printf "\e[1;31m>> The preferred way for go-makefile-maker to install python tools after nix-shell is pipx which could not be found. Either install pipx using your package manager or install reuse using your package manager if at least version 6 is available.\e[0m\n"; printf "\e[1;31m>> As your Python was likely installed by your package manager, just doing pip install --user sadly does no longer work as pip issues a warning about breaking your system. Generally running --break-system-packages with --user is safe to do but you should only run this command if you can resolve issues with it yourself: pip3 install --user --break-system-packages reuse\e[0m\n"; else printf "\e[1;36m>> Installing reuse...\e[0m\n"; pipx install reuse; fi; fi
6461

65-
prepare-static-check: FORCE install-golangci-lint install-modernize install-shellcheck install-go-licence-detector install-addlicense install-reuse
62+
prepare-static-check: FORCE install-goimports install-golangci-lint install-shellcheck install-go-licence-detector install-addlicense install-reuse
6663

6764
# To add additional flags or values (before the default ones), specify the variable in the environment, e.g. `GO_BUILDFLAGS='-tags experimental' make`.
6865
# To override the default flags or values, specify the variable on the command line, e.g. `make GO_BUILDFLAGS='-tags experimental'`.
@@ -114,10 +111,6 @@ run-golangci-lint: FORCE install-golangci-lint
114111
@golangci-lint config verify
115112
@golangci-lint run
116113

117-
run-modernize: FORCE install-modernize
118-
@printf "\e[1;36m>> modernize\e[0m\n"
119-
@modernize $(GO_TESTPKGS)
120-
121114
run-shellcheck: FORCE install-shellcheck
122115
@printf "\e[1;36m>> shellcheck\e[0m\n"
123116
@find . \( -path './vendor/*' -prune \) -o -type f \( -name '*.bash' -o -name '*.ksh' -o -name '*.zsh' -o -name '*.sh' -o -name '*.shlib' \) -exec shellcheck {} +
@@ -141,7 +134,7 @@ check-reuse: FORCE install-reuse
141134

142135
check-license-headers: FORCE check-addlicense check-reuse
143136

144-
__static-check: FORCE run-shellcheck run-golangci-lint run-modernize check-dependency-licenses check-license-headers
137+
__static-check: FORCE run-shellcheck run-golangci-lint check-dependency-licenses check-license-headers
145138

146139
static-check: FORCE
147140
@$(MAKE) --keep-going --no-print-directory __static-check
@@ -176,10 +169,6 @@ goimports: FORCE install-goimports
176169
@printf "\e[1;36m>> goimports -w -local https://github.com/sapcc/swift-http-import\e[0m\n"
177170
@goimports -w -local github.com/sapcc/swift-http-import $(patsubst $(shell awk '$$1 == "module" {print $$2}' go.mod)%,.%/*.go,$(shell go list ./...))
178171

179-
modernize: FORCE install-modernize
180-
@printf "\e[1;36m>> modernize -fix ./...\e[0m\n"
181-
@modernize -fix ./...
182-
183172
clean: FORCE
184173
git clean -dxf build
185174

@@ -213,7 +202,6 @@ help: FORCE
213202
@printf "\e[1mPrepare\e[0m\n"
214203
@printf " \e[36minstall-goimports\e[0m Install goimports required by goimports/static-check\n"
215204
@printf " \e[36minstall-golangci-lint\e[0m Install golangci-lint required by run-golangci-lint/static-check\n"
216-
@printf " \e[36minstall-modernize\e[0m Install modernize required by run-modernize/static-check\n"
217205
@printf " \e[36minstall-shellcheck\e[0m Install shellcheck required by run-shellcheck/static-check\n"
218206
@printf " \e[36minstall-go-licence-detector\e[0m Install-go-licence-detector required by check-dependency-licenses/static-check\n"
219207
@printf " \e[36minstall-addlicense\e[0m Install addlicense required by check-license-headers/license-headers/static-check\n"
@@ -228,7 +216,6 @@ help: FORCE
228216
@printf "\e[1mTest\e[0m\n"
229217
@printf " \e[36mcheck\e[0m Run the test suite (unit tests and golangci-lint).\n"
230218
@printf " \e[36mrun-golangci-lint\e[0m Install and run golangci-lint. Installing is used in CI, but you should probably install golangci-lint using your package manager.\n"
231-
@printf " \e[36mrun-modernize\e[0m Install and run modernize. Installing is used in CI, but you should probably install modernize using your package manager.\n"
232219
@printf " \e[36mrun-shellcheck\e[0m Install and run shellcheck. Installing is used in CI, but you should probably install shellcheck using your package manager.\n"
233220
@printf " \e[36mbuild/cover.out\e[0m Run tests and generate coverage report.\n"
234221
@printf " \e[36mbuild/cover.html\e[0m Generate an HTML file with source code annotations from the coverage report.\n"
@@ -243,7 +230,6 @@ help: FORCE
243230
@printf " \e[36mlicense-headers\e[0m Add (or overwrite) license headers on all non-vendored source code files.\n"
244231
@printf " \e[36mcheck-dependency-licenses\e[0m Check all dependency licenses using go-licence-detector.\n"
245232
@printf " \e[36mgoimports\e[0m Run goimports on all non-vendored .go files\n"
246-
@printf " \e[36mmodernize\e[0m Run modernize on all non-vendored .go files\n"
247233
@printf " \e[36mclean\e[0m Run git clean.\n"
248234

249235
.PHONY: FORCE

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/klauspost/compress v1.18.1
1111
github.com/majewsky/schwift/v2 v2.0.0
1212
github.com/sapcc/go-api-declarations v1.17.4
13-
github.com/sapcc/go-bits v0.0.0-20251103130554-313749b69c7d
13+
github.com/sapcc/go-bits v0.0.0-20251106135743-875cf285580d
1414
github.com/ulikunitz/xz v0.5.15
1515
go.uber.org/automaxprocs v1.6.0
1616
golang.org/x/crypto v0.43.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4
3030
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
3131
github.com/sapcc/go-api-declarations v1.17.4 h1:F4smuE9x1NJ/7NAdytJ1wekeXT3QeRaYu3L/HyWKqqo=
3232
github.com/sapcc/go-api-declarations v1.17.4/go.mod h1:MWmLjmvjftgyAugNUfIhsDsHIzXH1pn32cWLZpiluKg=
33-
github.com/sapcc/go-bits v0.0.0-20251103130554-313749b69c7d h1:3xK8glHKm6tUBahl3CLJD8aFHYhq1TnZGVY1jx2FfzQ=
34-
github.com/sapcc/go-bits v0.0.0-20251103130554-313749b69c7d/go.mod h1:DMge7GidLysrU9IfPsWQNbIi6OvesTvj1hDXlTXEI+g=
33+
github.com/sapcc/go-bits v0.0.0-20251106135743-875cf285580d h1:rL+ozCy04cM+VKgWdKXyhuaFvT0ZzTQbzONn1A1QVBU=
34+
github.com/sapcc/go-bits v0.0.0-20251106135743-875cf285580d/go.mod h1:DMge7GidLysrU9IfPsWQNbIi6OvesTvj1hDXlTXEI+g=
3535
github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw=
3636
github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
3737
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=

vendor/github.com/sapcc/go-bits/errext/errorset.go

Lines changed: 28 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)