diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 9546fca3c2..4a26a65a57 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -56,7 +56,7 @@ steps: lint: depends_on: - vendor - image: golangci/golangci-lint:v2.9.0 + image: golangci/golangci-lint:v2.10.1 commands: - make lint when: *when diff --git a/Makefile b/Makefile index 748ed5074f..b391dc6f18 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # renovate: datasource=github-releases depName=mvdan/gofumpt GOFUMPT_VERSION := v0.9.2 # renovate: datasource=github-releases depName=golangci/golangci-lint -GOLANGCI_LINT_VERSION := v2.9.0 +GOLANGCI_LINT_VERSION := v2.10.1 # renovate: datasource=docker depName=docker.io/techknowlogick/xgo XGO_VERSION := go-1.26.x diff --git a/pipeline/backend/common/script_posix.go b/pipeline/backend/common/script_posix.go index 2216487844..03b772d2a8 100644 --- a/pipeline/backend/common/script_posix.go +++ b/pipeline/backend/common/script_posix.go @@ -35,11 +35,11 @@ func generateScriptPosix(commands []string, workDir string) string { } for _, command := range commands { - buf.WriteString(fmt.Sprintf( + fmt.Fprintf(&buf, traceScript, shellescape.Quote(command), command, - )) + ) } return buf.String() diff --git a/pipeline/backend/common/script_win.go b/pipeline/backend/common/script_win.go index 8fb40044fd..5507e3f113 100644 --- a/pipeline/backend/common/script_win.go +++ b/pipeline/backend/common/script_win.go @@ -34,11 +34,11 @@ func generateScriptWindows(commands []string, workDir string) string { for _, command := range commands { escaped := fmt.Sprintf("%q", command) escaped = strings.ReplaceAll(escaped, "$", `\$`) - buf.WriteString(fmt.Sprintf( + fmt.Fprintf(&buf, traceScriptWin, escaped, command, - )) + ) } return buf.String() diff --git a/server/model/task.go b/server/model/task.go index 76bd1d240c..1be6c27833 100644 --- a/server/model/task.go +++ b/server/model/task.go @@ -17,7 +17,6 @@ package model import ( "fmt" "slices" - "strings" "go.woodpecker-ci.org/woodpecker/v3/pipeline" ) @@ -43,9 +42,7 @@ func (Task) TableName() string { } func (t *Task) String() string { - var sb strings.Builder - sb.WriteString(fmt.Sprintf("%s (%s) - %s", t.ID, t.Dependencies, t.DepStatus)) - return sb.String() + return fmt.Sprintf("%s (%s) - %s", t.ID, t.Dependencies, t.DepStatus) } func (t *Task) ApplyLabelsFromRepo(r *Repo) error { diff --git a/woodpecker-go/woodpecker/types.go b/woodpecker-go/woodpecker/types.go index 393b742421..d9a2a8dd4f 100644 --- a/woodpecker-go/woodpecker/types.go +++ b/woodpecker-go/woodpecker/types.go @@ -88,7 +88,7 @@ type ( RepoPatch struct { Config *string `json:"config_file,omitempty"` // Deprecated: use Trusted (broken - only exists for backwards compatibility) - IsTrusted *bool `json:"-,omitempty"` + IsTrusted *bool `json:"-"` Trusted *TrustedConfigurationPatch `json:"trusted,omitempty"` RequireApproval *ApprovalMode `json:"require_approval,omitempty"` Timeout *int64 `json:"timeout,omitempty"`