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

Upgrade golangci-lint to v1.64.5 #33654

Merged
merged 6 commits into from
Feb 20, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
enable usetesting.os-temp-dir
wxiaoguang committed Feb 20, 2025
commit 279544c4acaa6eb7d5a00bb344c854cf0da2ce60
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions modules/storage/local_test.go
Original file line number Diff line number Diff line change
@@ -4,8 +4,6 @@
package storage

import (
"os"
"path/filepath"
"testing"

"code.gitea.io/gitea/modules/setting"
@@ -56,6 +54,5 @@ func TestBuildLocalPath(t *testing.T) {
}

func TestLocalStorageIterator(t *testing.T) {
dir := filepath.Join(os.TempDir(), "TestLocalStorageIteratorTestDir")
testStorageIterator(t, setting.LocalStorageType, &setting.Storage{Path: dir})
testStorageIterator(t, setting.LocalStorageType, &setting.Storage{Path: t.TempDir()})
}
2 changes: 1 addition & 1 deletion modules/util/legacy_test.go
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ import (
func TestCopyFile(t *testing.T) {
testContent := []byte("hello")

tmpDir := os.TempDir()
tmpDir := t.TempDir()
now := time.Now()
srcFile := fmt.Sprintf("%s/copy-test-%d-src.txt", tmpDir, now.UnixMicro())
dstFile := fmt.Sprintf("%s/copy-test-%d-dst.txt", tmpDir, now.UnixMicro())
Loading