Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1
ACTIONLINT_PACKAGE ?= github.com/rhysd/actionlint/cmd/actionlint@v1
GOPLS_PACKAGE ?= golang.org/x/tools/gopls@v0.17.1
GOPLS_PACKAGE ?= golang.org/x/tools/gopls@v0.19.0

DOCKER_IMAGE ?= gitea/gitea
DOCKER_TAG ?= latest
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_22/v294_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func Test_AddUniqueIndexForProjectIssue(t *testing.T) {
for _, index := range tables[0].Indexes {
if index.Type == schemas.UniqueType {
found = true
slices.Equal(index.Cols, []string{"project_id", "issue_id"})
assert.True(t, slices.Equal(index.Cols, []string{"project_id", "issue_id"}))
break
}
}
Expand Down
1 change: 0 additions & 1 deletion modules/public/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,4 @@ func servePublicAsset(w http.ResponseWriter, req *http.Request, fi os.FileInfo,
}
}
http.ServeContent(w, req, fi.Name(), modtime, content)
return
}
4 changes: 3 additions & 1 deletion routers/private/hook_verification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ func TestVerifyCommits(t *testing.T) {
unittest.PrepareTestEnv(t)

gitRepo, err := git.OpenRepository(t.Context(), testReposDir+"repo1_hook_verification")
defer gitRepo.Close()
if err != nil {
defer gitRepo.Close()
}
assert.NoError(t, err)

objectFormat, err := gitRepo.GetObjectFormat()
Expand Down
2 changes: 1 addition & 1 deletion tools/lint-go-gopls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IGNORE_PATTERNS=(
# current absolute path, indicating a error was found. This is necessary
# because the tool does not set non-zero exit code when errors are found.
# ref: https://github.com/golang/go/issues/67078
ERROR_LINES=$("$GO" run "$GOPLS_PACKAGE" check "$@" 2>/dev/null | grep -E "^$PWD" | grep -vFf <(printf '%s\n' "${IGNORE_PATTERNS[@]}"));
ERROR_LINES=$("$GO" run "$GOPLS_PACKAGE" check -severity=warning "$@" 2>/dev/null | grep -E "^$PWD" | grep -vFf <(printf '%s\n' "${IGNORE_PATTERNS[@]}"));
NUM_ERRORS=$(echo -n "$ERROR_LINES" | wc -l)

if [ "$NUM_ERRORS" -eq "0" ]; then
Expand Down
Loading