Skip to content
GitHub Actions / golangci failed Oct 25, 2024 in 1s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (56)

pipeline/ruleset.go|136 col 1| cyclomatic complexity 31 of func (*Rules).Match is high (> 30) (gocyclo)
database/build.go|366 col 44| G115: integer overflow conversion int -> int32 (gosec)
database/build.go|367 col 44| G115: integer overflow conversion int -> int32 (gosec)
database/hook.go|202 col 42| G115: integer overflow conversion int -> int32 (gosec)
item.go|19 col 9| SA1019: library.Build is deprecated: use Build from github.com/go-vela/server/api/types instead. (staticcheck)
item.go|20 col 9| SA1019: library.Repo is deprecated: use Repo from github.com/go-vela/server/api/types instead. (staticcheck)
item.go|21 col 9| SA1019: library.User is deprecated: use User from github.com/go-vela/server/api/types instead. (staticcheck)
item.go|27 col 16| SA1019: library.Build is deprecated: use Build from github.com/go-vela/server/api/types instead. (staticcheck)
webhook.go|33 col 15| SA1019: library.Hook is deprecated: use Hook from github.com/go-vela/server/api/types instead. (staticcheck)
webhook.go|34 col 15| SA1019: library.Repo is deprecated: use Repo from github.com/go-vela/server/api/types instead. (staticcheck)
webhook.go|35 col 15| SA1019: library.Build is deprecated: use Build from github.com/go-vela/server/api/types instead. (staticcheck)
webhook.go|37 col 15| SA1019: library.Deployment is deprecated: use Deployment from github.com/go-vela/server/api/types instead. (staticcheck)
item_test.go|18 col 11| SA1019: library.Events is deprecated: use Events from github.com/go-vela/server/api/types instead. (staticcheck)
item_test.go|44 col 8| SA1019: library.Repo is deprecated: use Repo from github.com/go-vela/server/api/types instead. (staticcheck)
item_test.go|60 col 8| SA1019: library.User is deprecated: use User from github.com/go-vela/server/api/types instead. (staticcheck)
item_test.go|108 col 10| SA1019: library.User is deprecated: use User from github.com/go-vela/server/api/types instead. (staticcheck)
item.go|6 col 2| SA1019: "github.com/go-vela/types/library" is deprecated: all library types for Vela have been moved to github.com/go-vela/server/api/types . (staticcheck)
webhook.go|8 col 2| SA1019: "github.com/go-vela/types/constants" is deprecated: all constants for Vela have been moved to github.com/go-vela/server/constants. (staticcheck)
webhook.go|9 col 2| SA1019: "github.com/go-vela/types/library" is deprecated: all library types for Vela have been moved to github.com/go-vela/server/api/types . (staticcheck)
item_test.go|9 col 2| SA1019: "github.com/go-vela/types/library" is deprecated: all library types for Vela have been moved to github.com/go-vela/server/api/types . (staticcheck)
webhook_test.go|8 col 2| SA1019: "github.com/go-vela/types/constants" is deprecated: all constants for Vela have been moved to github.com/go-vela/server/constants. (staticcheck)
database/build.go|51 col 16| SA1019: raw.StringSliceMap is deprecated: use StringSliceMap from github.com/go-vela/server/compiler/types/raw instead. (staticcheck)
database/build_executable.go|136 col 40| SA1019: library.BuildExecutable is deprecated: use BuildExecutable from github.com/go-vela/server/api/types instead. (staticcheck)
database/build_executable.go|137 col 25| SA1019: library.BuildExecutable is deprecated: use BuildExecutable from github.com/go-vela/server/api/types instead. (staticcheck)
database/build_executable.go|159 col 36| SA1019: library.BuildExecutable is deprecated: use BuildExecutable from github.com/go-vela/server/api/types instead. (staticcheck)
database/build_queue.go|23 col 35| SA1019: library.BuildQueue is deprecated: use QueueBuild from github.com/go-vela/server/api/types instead. (staticcheck)
database/build_queue.go|24 col 20| SA1019: library.BuildQueue is deprecated: use QueueBuild from github.com/go-vela/server/api/types instead. (staticcheck)
database/build_queue.go|36 col 31| SA1019: library.BuildQueue is deprecated: use QueueBuild from github.com/go-vela/server/api/types instead. (staticcheck)
database/deployment.go|40 col 14| SA1019: raw.StringSliceMap is deprecated: use StringSliceMap from github.com/go-vela/server/compiler/types/raw instead. (staticcheck)
database/deployment.go|118 col 20| SA1019: library.Deployment is deprecated: use Deployment from github.com/go-vela/server/api/types instead. (staticcheck)
database/deployment.go|180 col 31| SA1019: library.Deployment is deprecated: use Deployment from github.com/go-vela/server/api/types instead. (staticcheck)
database/hook.go|136 col 29| SA1019: library.Hook is deprecated: use Hook from github.com/go-vela/server/api/types instead. (staticcheck)
database/hook.go|137 col 14| SA1019: library.Hook is deprecated: use Hook from github.com/go-vela/server/api/types instead. (staticcheck)
database/log.go|113 col 28| SA1019: library.Log is deprecated: use Log from github.com/go-vela/server/api/types instead. (staticcheck)
database/log.go|114 col 13| SA1019: library.Log is deprecated: use Log from github.com/go-vela/server/api/types instead. (staticcheck)
database/log.go|149 col 24| SA1019: library.Log is deprecated: use Log from github.com/go-vela/server/api/types instead. (staticcheck)
database/pipeline.go|145 col 33| SA1019: library.Pipeline is deprecated: use Pipeline from github.com/go-vela/server/api/types instead. (staticcheck)
database/pipeline.go|146 col 18| SA1019: library.Pipeline is deprecated: use Pipeline from github.com/go-vela/server/api/types instead. (staticcheck)
database/pipeline.go|210 col 29| SA1019: library.Pipeline is deprecated: use Pipeline from github.com/go-vela/server/api/types instead. (staticcheck)
database/schedule.go|46 col 29| SA1019: library.Schedule is deprecated: use Schedule from github.com/go-vela/server/api/types instead. (staticcheck)
database/schedule.go|100 col 33| SA1019: library.Schedule is deprecated: use Schedule from github.com/go-vela/server/api/types instead. (staticcheck)
database/schedule.go|101 col 10| SA1019: library.Schedule is deprecated: use Schedule from github.com/go-vela/server/api/types instead. (staticcheck)
database/secret.go|187 col 31| SA1019: library.Secret is deprecated: use Secret from github.com/go-vela/server/api/types instead. (staticcheck)
database/secret.go|188 col 16| SA1019: library.Secret is deprecated: use Secret from github.com/go-vela/server/api/types instead. (staticcheck)
database/secret.go|269 col 27| SA1019: library.Secret is deprecated: use Secret from github.com/go-vela/server/api/types instead. (staticcheck)
database/service.go|146 col 32| SA1019: library.Service is deprecated: use Service from github.com/go-vela/server/api/types instead. (staticcheck)
database/service.go|147 col 17| SA1019: library.Service is deprecated: use Service from github.com/go-vela/server/api/types instead. (staticcheck)
database/service.go|212 col 28| SA1019: library.Service is deprecated: use Service from github.com/go-vela/server/api/types instead. (staticcheck)
database/step.go|158 col 29| SA1019: library.Step is deprecated: use Step from github.com/go-vela/server/api/types instead. (staticcheck)
database/step.go|159 col 14| SA1019: library.Step is deprecated: use Step from github.com/go-vela/server/api/types instead. (staticcheck)
database/step.go|228 col 25| SA1019: library.Step is deprecated: use Step from github.com/go-vela/server/api/types instead. (staticcheck)
database/worker.go|107 col 31| SA1019: library.Worker is deprecated: use Worker from github.com/go-vela/server/api/types instead. (staticcheck)
database/worker.go|108 col 16| SA1019: library.Worker is deprecated: use Worker from github.com/go-vela/server/api/types instead. (staticcheck)
database/worker.go|169 col 27| SA1019: library.Worker is deprecated: use Worker from github.com/go-vela/server/api/types instead. (staticcheck)
yaml/stage.go|95 col 5| return statements should not be cuddled if block has more than two lines (wsl)
yaml/stage.go|101 col 2| return statements should not be cuddled if block has more than two lines (wsl)

Filtered Findings (0)

Annotations

Check failure on line 136 in pipeline/ruleset.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pipeline/ruleset.go#L136

cyclomatic complexity 31 of func `(*Rules).Match` is high (> 30) (gocyclo)
Raw output
pipeline/ruleset.go:136:1: cyclomatic complexity 31 of func `(*Rules).Match` is high (> 30) (gocyclo)
func (r *Rules) Match(from *RuleData, matcher, op string) (bool, error) {
^

Check failure on line 366 in database/build.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/build.go#L366

G115: integer overflow conversion int -> int32 (gosec)
Raw output
database/build.go:366:44: G115: integer overflow conversion int -> int32 (gosec)
		Number:        sql.NullInt32{Int32: int32(b.GetNumber()), Valid: true},
		                                         ^

Check failure on line 367 in database/build.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/build.go#L367

G115: integer overflow conversion int -> int32 (gosec)
Raw output
database/build.go:367:44: G115: integer overflow conversion int -> int32 (gosec)
		Parent:        sql.NullInt32{Int32: int32(b.GetParent()), Valid: true},
		                                         ^

Check failure on line 202 in database/hook.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/hook.go#L202

G115: integer overflow conversion int -> int32 (gosec)
Raw output
database/hook.go:202:42: G115: integer overflow conversion int -> int32 (gosec)
		Number:      sql.NullInt32{Int32: int32(h.GetNumber()), Valid: true},
		                                       ^

Check failure on line 19 in item.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] item.go#L19

SA1019: library.Build is deprecated: use Build from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
item.go:19:9: SA1019: library.Build is deprecated: use Build from github.com/go-vela/server/api/types instead. (staticcheck)
	Build *library.Build `json:"build"`
	       ^

Check failure on line 20 in item.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] item.go#L20

SA1019: library.Repo is deprecated: use Repo from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
item.go:20:9: SA1019: library.Repo is deprecated: use Repo from github.com/go-vela/server/api/types instead. (staticcheck)
	Repo  *library.Repo  `json:"repo"`
	       ^

Check failure on line 21 in item.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] item.go#L21

SA1019: library.User is deprecated: use User from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
item.go:21:9: SA1019: library.User is deprecated: use User from github.com/go-vela/server/api/types instead. (staticcheck)
	User  *library.User  `json:"user"`
	       ^

Check failure on line 27 in item.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] item.go#L27

SA1019: library.Build is deprecated: use Build from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
item.go:27:16: SA1019: library.Build is deprecated: use Build from github.com/go-vela/server/api/types instead. (staticcheck)
func ToItem(b *library.Build, r *library.Repo, u *library.User) *Item {
               ^

Check failure on line 33 in webhook.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] webhook.go#L33

SA1019: library.Hook is deprecated: use Hook from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
webhook.go:33:15: SA1019: library.Hook is deprecated: use Hook from github.com/go-vela/server/api/types instead. (staticcheck)
	Hook        *library.Hook
	             ^

Check failure on line 34 in webhook.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] webhook.go#L34

SA1019: library.Repo is deprecated: use Repo from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
webhook.go:34:15: SA1019: library.Repo is deprecated: use Repo from github.com/go-vela/server/api/types instead. (staticcheck)
	Repo        *library.Repo
	             ^

Check failure on line 35 in webhook.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] webhook.go#L35

SA1019: library.Build is deprecated: use Build from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
webhook.go:35:15: SA1019: library.Build is deprecated: use Build from github.com/go-vela/server/api/types instead. (staticcheck)
	Build       *library.Build
	             ^

Check failure on line 37 in webhook.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] webhook.go#L37

SA1019: library.Deployment is deprecated: use Deployment from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
webhook.go:37:15: SA1019: library.Deployment is deprecated: use Deployment from github.com/go-vela/server/api/types instead. (staticcheck)
	Deployment  *library.Deployment
	             ^

Check failure on line 18 in item_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] item_test.go#L18

SA1019: library.Events is deprecated: use Events from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
item_test.go:18:11: SA1019: library.Events is deprecated: use Events from github.com/go-vela/server/api/types instead. (staticcheck)
	e := new(library.Events)
	         ^

Check failure on line 44 in item_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] item_test.go#L44

SA1019: library.Repo is deprecated: use Repo from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
item_test.go:44:8: SA1019: library.Repo is deprecated: use Repo from github.com/go-vela/server/api/types instead. (staticcheck)
	r := &library.Repo{
	      ^

Check failure on line 60 in item_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] item_test.go#L60

SA1019: library.User is deprecated: use User from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
item_test.go:60:8: SA1019: library.User is deprecated: use User from github.com/go-vela/server/api/types instead. (staticcheck)
	u := &library.User{
	      ^

Check failure on line 108 in item_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] item_test.go#L108

SA1019: library.User is deprecated: use User from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
item_test.go:108:10: SA1019: library.User is deprecated: use User from github.com/go-vela/server/api/types instead. (staticcheck)
		User: &library.User{
		       ^

Check failure on line 6 in item.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] item.go#L6

SA1019: "github.com/go-vela/types/library" is deprecated: all library types for Vela have been moved to github.com/go-vela/server/api/types . (staticcheck)
Raw output
item.go:6:2: SA1019: "github.com/go-vela/types/library" is deprecated: all library types for Vela have been moved to github.com/go-vela/server/api/types . (staticcheck)
	"github.com/go-vela/types/library"
	^

Check failure on line 8 in webhook.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] webhook.go#L8

SA1019: "github.com/go-vela/types/constants" is deprecated: all constants for Vela have been moved to github.com/go-vela/server/constants. (staticcheck)
Raw output
webhook.go:8:2: SA1019: "github.com/go-vela/types/constants" is deprecated: all constants for Vela have been moved to github.com/go-vela/server/constants. (staticcheck)
	"github.com/go-vela/types/constants"
	^

Check failure on line 9 in webhook.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] webhook.go#L9

SA1019: "github.com/go-vela/types/library" is deprecated: all library types for Vela have been moved to github.com/go-vela/server/api/types . (staticcheck)
Raw output
webhook.go:9:2: SA1019: "github.com/go-vela/types/library" is deprecated: all library types for Vela have been moved to github.com/go-vela/server/api/types . (staticcheck)
	"github.com/go-vela/types/library"
	^

Check failure on line 9 in item_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] item_test.go#L9

SA1019: "github.com/go-vela/types/library" is deprecated: all library types for Vela have been moved to github.com/go-vela/server/api/types . (staticcheck)
Raw output
item_test.go:9:2: SA1019: "github.com/go-vela/types/library" is deprecated: all library types for Vela have been moved to github.com/go-vela/server/api/types . (staticcheck)
	"github.com/go-vela/types/library"
	^

Check failure on line 8 in webhook_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] webhook_test.go#L8

SA1019: "github.com/go-vela/types/constants" is deprecated: all constants for Vela have been moved to github.com/go-vela/server/constants. (staticcheck)
Raw output
webhook_test.go:8:2: SA1019: "github.com/go-vela/types/constants" is deprecated: all constants for Vela have been moved to github.com/go-vela/server/constants. (staticcheck)
	"github.com/go-vela/types/constants"
	^

Check failure on line 51 in database/build.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/build.go#L51

SA1019: raw.StringSliceMap is deprecated: use StringSliceMap from github.com/go-vela/server/compiler/types/raw instead. (staticcheck)
Raw output
database/build.go:51:16: SA1019: raw.StringSliceMap is deprecated: use StringSliceMap from github.com/go-vela/server/compiler/types/raw instead. (staticcheck)
	DeployPayload raw.StringSliceMap `sql:"deploy_payload" gorm:"type:varchar(2000)"`
	              ^

Check failure on line 136 in database/build_executable.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/build_executable.go#L136

SA1019: library.BuildExecutable is deprecated: use BuildExecutable from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
database/build_executable.go:136:40: SA1019: library.BuildExecutable is deprecated: use BuildExecutable from github.com/go-vela/server/api/types instead. (staticcheck)
func (b *BuildExecutable) ToLibrary() *library.BuildExecutable {
                                       ^

Check failure on line 137 in database/build_executable.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/build_executable.go#L137

SA1019: library.BuildExecutable is deprecated: use BuildExecutable from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
database/build_executable.go:137:25: SA1019: library.BuildExecutable is deprecated: use BuildExecutable from github.com/go-vela/server/api/types instead. (staticcheck)
	buildExecutable := new(library.BuildExecutable)
	                       ^

Check failure on line 159 in database/build_executable.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/build_executable.go#L159

SA1019: library.BuildExecutable is deprecated: use BuildExecutable from github.com/go-vela/server/api/types instead. (staticcheck)
Raw output
database/build_executable.go:159:36: SA1019: library.BuildExecutable is deprecated: use BuildExecutable from github.com/go-vela/server/api/types instead. (staticcheck)
func BuildExecutableFromLibrary(c *library.BuildExecutable) *BuildExecutable {
                                   ^