1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-10 04:27:22 +00:00

Enable addtional linters (#34085)

enable mirror, usestdlibbars and perfsprint 
part of: https://github.com/go-gitea/gitea/issues/34083

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
TheFox0x7
2025-04-01 12:14:01 +02:00
committed by GitHub
parent 56e42be36d
commit ee3c82f874
294 changed files with 848 additions and 805 deletions

View File

@ -4,7 +4,6 @@
package integration
import (
"fmt"
"net/url"
"os"
"path/filepath"
@ -41,55 +40,55 @@ func TestDetermineLocalEndpoint(t *testing.T) {
{
cloneurl: root,
lfsurl: "",
expected: str2url(fmt.Sprintf("file://%s", root)),
expected: str2url("file://" + root),
},
// case 1
{
cloneurl: root,
lfsurl: lfsroot,
expected: str2url(fmt.Sprintf("file://%s", lfsroot)),
expected: str2url("file://" + lfsroot),
},
// case 2
{
cloneurl: "https://git.com/repo.git",
lfsurl: lfsroot,
expected: str2url(fmt.Sprintf("file://%s", lfsroot)),
expected: str2url("file://" + lfsroot),
},
// case 3
{
cloneurl: rootdotgit,
lfsurl: "",
expected: str2url(fmt.Sprintf("file://%s", filepath.Join(rootdotgit, ".git"))),
expected: str2url("file://" + filepath.Join(rootdotgit, ".git")),
},
// case 4
{
cloneurl: "",
lfsurl: rootdotgit,
expected: str2url(fmt.Sprintf("file://%s", filepath.Join(rootdotgit, ".git"))),
expected: str2url("file://" + filepath.Join(rootdotgit, ".git")),
},
// case 5
{
cloneurl: rootdotgit,
lfsurl: rootdotgit,
expected: str2url(fmt.Sprintf("file://%s", filepath.Join(rootdotgit, ".git"))),
expected: str2url("file://" + filepath.Join(rootdotgit, ".git")),
},
// case 6
{
cloneurl: fmt.Sprintf("file://%s", root),
cloneurl: "file://" + root,
lfsurl: "",
expected: str2url(fmt.Sprintf("file://%s", root)),
expected: str2url("file://" + root),
},
// case 7
{
cloneurl: fmt.Sprintf("file://%s", root),
lfsurl: fmt.Sprintf("file://%s", lfsroot),
expected: str2url(fmt.Sprintf("file://%s", lfsroot)),
cloneurl: "file://" + root,
lfsurl: "file://" + lfsroot,
expected: str2url("file://" + lfsroot),
},
// case 8
{
cloneurl: root,
lfsurl: fmt.Sprintf("file://%s", lfsroot),
expected: str2url(fmt.Sprintf("file://%s", lfsroot)),
lfsurl: "file://" + lfsroot,
expected: str2url("file://" + lfsroot),
},
// case 9
{