Skip to content

Commit 681ec25

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Fix omitempty bug (go-gitea#33663) Upgrade golangci-lint to v1.64.5 (go-gitea#33654) Fix mCaptcha bug (go-gitea#33659) Update Go dependencies (skip blevesearch, meilisearch) (go-gitea#33655) Use test context in tests and new loop system in benchmarks (go-gitea#33648) Add missed changelogs (go-gitea#33649) [skip ci] Updated translations via Crowdin git graph: don't show detached commits (go-gitea#33645)
2 parents bc278d7 + a25081f commit 681ec25

File tree

122 files changed

+1540
-1096
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+1540
-1096
lines changed

.golangci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ linters:
1919
- revive
2020
- staticcheck
2121
- stylecheck
22-
- tenv
2322
- testifylint
2423
- typecheck
2524
- unconvert
2625
- unused
2726
- unparam
27+
- usetesting
2828
- wastedassign
2929

3030
run:
@@ -102,6 +102,8 @@ linters-settings:
102102
desc: do not use the ini package, use gitea's config system instead
103103
- pkg: gitea.com/go-chi/cache
104104
desc: do not use the go-chi cache package, use gitea's cache system
105+
usetesting:
106+
os-temp-dir: true
105107

106108
issues:
107109
max-issues-per-linter: 0

CHANGELOG.md

Lines changed: 511 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ XGO_VERSION := go-1.24.x
2828
AIR_PACKAGE ?= github.com/air-verse/air@v1
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/[email protected]
3030
GOFUMPT_PACKAGE ?= mvdan.cc/[email protected]
31-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4
31+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.5
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3333
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/[email protected]
3434
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected]
@@ -255,7 +255,7 @@ fmt-check: fmt
255255
@diff=$$(git diff --color=always $(GO_SOURCES) templates $(WEB_DIRS)); \
256256
if [ -n "$$diff" ]; then \
257257
echo "Please run 'make fmt' and commit the result:"; \
258-
echo "$${diff}"; \
258+
printf "%s" "$${diff}"; \
259259
exit 1; \
260260
fi
261261

@@ -281,7 +281,7 @@ swagger-check: generate-swagger
281281
@diff=$$(git diff --color=always '$(SWAGGER_SPEC)'); \
282282
if [ -n "$$diff" ]; then \
283283
echo "Please run 'make generate-swagger' and commit the result:"; \
284-
echo "$${diff}"; \
284+
printf "%s" "$${diff}"; \
285285
exit 1; \
286286
fi
287287

@@ -426,7 +426,7 @@ test-check:
426426
@diff=$$(git status -s); \
427427
if [ -n "$$diff" ]; then \
428428
echo "make test-backend has changed files in the source tree:"; \
429-
echo "$${diff}"; \
429+
printf "%s" "$${diff}"; \
430430
echo "You should change the tests to create these files in a temporary directory."; \
431431
echo "Do not simply add these files to .gitignore"; \
432432
exit 1; \
@@ -463,7 +463,7 @@ tidy-check: tidy
463463
@diff=$$(git diff --color=always go.mod go.sum $(GO_LICENSE_FILE)); \
464464
if [ -n "$$diff" ]; then \
465465
echo "Please run 'make tidy' and commit the result:"; \
466-
echo "$${diff}"; \
466+
printf "%s" "$${diff}"; \
467467
exit 1; \
468468
fi
469469

@@ -879,7 +879,7 @@ svg-check: svg
879879
@diff=$$(git diff --color=always --cached $(SVG_DEST_DIR)); \
880880
if [ -n "$$diff" ]; then \
881881
echo "Please run 'make svg' and 'git add $(SVG_DEST_DIR)' and commit the result:"; \
882-
echo "$${diff}"; \
882+
printf "%s" "$${diff}"; \
883883
exit 1; \
884884
fi
885885

@@ -890,7 +890,7 @@ lockfile-check:
890890
if [ -n "$$diff" ]; then \
891891
echo "package-lock.json is inconsistent with package.json"; \
892892
echo "Please run 'npm install --package-lock-only' and commit the result:"; \
893-
echo "$${diff}"; \
893+
printf "%s" "$${diff}"; \
894894
exit 1; \
895895
fi
896896

assets/go-licenses.json

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

cmd/hook_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package cmd
66
import (
77
"bufio"
88
"bytes"
9-
"context"
109
"strings"
1110
"testing"
1211

@@ -15,7 +14,7 @@ import (
1514

1615
func TestPktLine(t *testing.T) {
1716
// test read
18-
ctx := context.Background()
17+
ctx := t.Context()
1918
s := strings.NewReader("0000")
2019
r := bufio.NewReader(s)
2120
result, err := readPktLine(ctx, r, pktLineTypeFlush)

cmd/migrate_storage_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package cmd
55

66
import (
7-
"context"
87
"os"
98
"strings"
109
"testing"
@@ -53,7 +52,7 @@ func TestMigratePackages(t *testing.T) {
5352
assert.NotNil(t, v)
5453
assert.NotNil(t, f)
5554

56-
ctx := context.Background()
55+
ctx := t.Context()
5756

5857
p := t.TempDir()
5958

0 commit comments

Comments
 (0)