1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-30 06:08:35 +00:00

enforce explanation for necessary nolints and fix bugs (#34883)

Follows up https://github.com/go-gitea/gitea/pull/34851

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
TheFox0x7
2025-06-27 15:48:03 +02:00
committed by GitHub
parent 9854df3e87
commit aa9d86745a
48 changed files with 83 additions and 159 deletions

View File

@@ -4,7 +4,7 @@
// This is primarily coped from /tests/integration/integration_test.go
// TODO: Move common functions to shared file
//nolint:forbidigo
//nolint:forbidigo // use of print functions is allowed in tests
package e2e
import (

View File

@@ -1,7 +1,7 @@
// Copyright 2017 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
//nolint:forbidigo
//nolint:forbidigo // use of print functions is allowed in tests
package integration
import (

View File

@@ -1,7 +1,6 @@
// Copyright 2017 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
//nolint:forbidigo
package tests
import (
@@ -55,7 +54,7 @@ func InitTest(requireGitea bool) {
// Notice: when doing "ssh push", Gitea executes sub processes, debugger won't work for the sub processes.
giteaConf = "tests/sqlite.ini"
_ = os.Setenv("GITEA_CONF", giteaConf)
fmt.Printf("Environment variable $GITEA_CONF not set, use default: %s\n", giteaConf)
_, _ = fmt.Fprintf(os.Stderr, "Environment variable $GITEA_CONF not set - defaulting to %s\n", giteaConf)
if !setting.EnableSQLite3 {
testlogger.Fatalf(`sqlite3 requires: -tags sqlite,sqlite_unlock_notify` + "\n")
}