Skip to content

Commit

Permalink
Merge remote-tracking branch 'giteaofficial/main'
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
zjjhot committed Feb 21, 2025
2 parents bc278d7 + a25081f commit 681ec25
Show file tree
Hide file tree
Showing 122 changed files with 1,540 additions and 1,096 deletions.
4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ linters:
- revive
- staticcheck
- stylecheck
- tenv
- testifylint
- typecheck
- unconvert
- unused
- unparam
- usetesting
- wastedassign

run:
Expand Down Expand Up @@ -102,6 +102,8 @@ linters-settings:
desc: do not use the ini package, use gitea's config system instead
- pkg: gitea.com/go-chi/cache
desc: do not use the go-chi cache package, use gitea's cache system
usetesting:
os-temp-dir: true

issues:
max-issues-per-linter: 0
Expand Down
511 changes: 511 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ XGO_VERSION := go-1.24.x
AIR_PACKAGE ?= github.com/air-verse/air@v1
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3.1.2
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.7.0
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.5
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.12
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.6.0
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.31.0
Expand Down Expand Up @@ -255,7 +255,7 @@ fmt-check: fmt
@diff=$$(git diff --color=always $(GO_SOURCES) templates $(WEB_DIRS)); \
if [ -n "$$diff" ]; then \
echo "Please run 'make fmt' and commit the result:"; \
echo "$${diff}"; \
printf "%s" "$${diff}"; \
exit 1; \
fi

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

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

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

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

Expand Down
38 changes: 24 additions & 14 deletions assets/go-licenses.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions cmd/hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package cmd
import (
"bufio"
"bytes"
"context"
"strings"
"testing"

Expand All @@ -15,7 +14,7 @@ import (

func TestPktLine(t *testing.T) {
// test read
ctx := context.Background()
ctx := t.Context()
s := strings.NewReader("0000")
r := bufio.NewReader(s)
result, err := readPktLine(ctx, r, pktLineTypeFlush)
Expand Down
3 changes: 1 addition & 2 deletions cmd/migrate_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package cmd

import (
"context"
"os"
"strings"
"testing"
Expand Down Expand Up @@ -53,7 +52,7 @@ func TestMigratePackages(t *testing.T) {
assert.NotNil(t, v)
assert.NotNil(t, f)

ctx := context.Background()
ctx := t.Context()

p := t.TempDir()

Expand Down
Loading

0 comments on commit 681ec25

Please sign in to comment.