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

feat: add types, fix errors, add conditional status report #1071

Closed
wants to merge 6 commits into from

Merge branch 'main' into ec-updates

c279ef8
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Closed

feat: add types, fix errors, add conditional status report #1071

Merge branch 'main' into ec-updates
c279ef8
Select commit
Loading
Failed to load commit list.
GitHub Actions / golangci failed Mar 6, 2024 in 1s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (51)

compiler/native/compile_test.go|3338 col 6| missing type in composite literal (typecheck)
compiler/native/compile_test.go|3344 col 6| missing type in composite literal (typecheck)
compiler/native/compile_test.go|3350 col 6| missing type in composite literal (typecheck)
database/integration_test.go|174 col 16| db.CreateRepo undefined (type Interface has no field or method CreateRepo) (typecheck)
database/integration_test.go|196 col 16| db.CreateBuild undefined (type Interface has no field or method CreateBuild) (typecheck)
database/integration_test.go|204 col 19| db.CountBuilds undefined (type Interface has no field or method CountBuilds) (typecheck)
database/integration_test.go|214 col 18| db.CountBuildsForDeployment undefined (type Interface has no field or method CountBuildsForDeployment) (typecheck)
database/integration_test.go|224 col 18| db.CountBuildsForOrg undefined (type Interface has no field or method CountBuildsForOrg) (typecheck)
database/integration_test.go|234 col 18| db.CountBuildsForRepo undefined (type Interface has no field or method CountBuildsForRepo) (typecheck)
database/integration_test.go|244 col 18| db.CountBuildsForStatus undefined (type Interface has no field or method CountBuildsForStatus) (typecheck)
database/integration_test.go|254 col 18| db.ListBuilds undefined (type Interface has no field or method ListBuilds) (typecheck)
database/integration_test.go|264 col 24| db.ListBuildsForOrg undefined (type Interface has no field or method ListBuildsForOrg) (typecheck)
database/integration_test.go|277 col 24| db.ListBuildsForRepo undefined (type Interface has no field or method ListBuildsForRepo) (typecheck)
database/integration_test.go|290 col 17| db.ListPendingAndRunningBuildsForRepo undefined (type Interface has no field or method ListPendingAndRunningBuildsForRepo) (typecheck)
database/integration_test.go|303 col 23| db.ListPendingAndRunningBuilds undefined (type Interface has no field or method ListPendingAndRunningBuilds) (typecheck)
database/integration_test.go|313 col 17| db.LastBuildForRepo undefined (type Interface has no field or method LastBuildForRepo) (typecheck)
database/integration_test.go|325 col 17| db.GetBuildForRepo undefined (type Interface has no field or method GetBuildForRepo) (typecheck)
database/integration_test.go|336 col 18| db.CleanBuilds undefined (type Interface has no field or method CleanBuilds) (typecheck)
database/integration_test.go|348 col 15| db.UpdateBuild undefined (type Interface has no field or method UpdateBuild) (typecheck)
database/integration_test.go|354 col 17| db.GetBuild undefined (type Interface has no field or method GetBuild) (typecheck)
database/integration_test.go|367 col 12| db.DeleteBuild undefined (type Interface has no field or method DeleteBuild) (typecheck)
database/integration_test.go|376 col 12| db.DeleteRepo undefined (type Interface has no field or method DeleteRepo) (typecheck)
database/integration_test.go|410 col 13| db.CreateBuildExecutable undefined (type Interface has no field or method CreateBuildExecutable) (typecheck)
database/integration_test.go|419 col 18| db.PopBuildExecutable undefined (type Interface has no field or method PopBuildExecutable) (typecheck)
database/integration_test.go|431 col 15| db.UpdateBuild undefined (type Interface has no field or method UpdateBuild) (typecheck)
database/integration_test.go|436 col 11| db.CreateBuildExecutable undefined (type Interface has no field or method CreateBuildExecutable) (typecheck)
database/integration_test.go|441 col 19| db.CleanBuildExecutables undefined (type Interface has no field or method CleanBuildExecutables) (typecheck)
database/integration_test.go|450 col 14| db.PopBuildExecutable undefined (type Interface has no field or method PopBuildExecutable) (typecheck)
database/integration_test.go|485 col 16| db.CreateDeployment undefined (type Interface has no field or method CreateDeployment) (typecheck)
database/integration_test.go|493 col 19| db.CountDeployments undefined (type Interface has no field or method CountDeployments) (typecheck)
database/integration_test.go|503 col 18| db.CountDeploymentsForRepo undefined (type Interface has no field or method CountDeploymentsForRepo) (typecheck)
database/integration_test.go|513 col 18| db.ListDeployments undefined (type Interface has no field or method ListDeployments) (typecheck)
database/integration_test.go|523 col 17| db.ListDeploymentsForRepo undefined (type Interface has no field or method ListDeploymentsForRepo) (typecheck)
database/integration_test.go|538 col 18| db.GetDeploymentForRepo undefined (type Interface has no field or method GetDeploymentForRepo) (typecheck)
database/integration_test.go|550 col 15| db.UpdateDeployment undefined (type Interface has no field or method UpdateDeployment) (typecheck)
database/integration_test.go|556 col 18| db.GetDeployment undefined (type Interface has no field or method GetDeployment) (typecheck)
database/integration_test.go|569 col 12| db.DeleteDeployment undefined (type Interface has no field or method DeleteDeployment) (typecheck)
database/integration_test.go|604 col 16| db.CreateHook undefined (type Interface has no field or method CreateHook) (typecheck)
database/integration_test.go|612 col 19| db.CountHooks undefined (type Interface has no field or method CountHooks) (typecheck)
database/integration_test.go|622 col 18| db.CountHooksForRepo undefined (type Interface has no field or method CountHooksForRepo) (typecheck)
database/integration_test.go|632 col 18| db.ListHooks undefined (type Interface has no field or method ListHooks) (typecheck)
database/integration_test.go|642 col 24| db.ListHooksForRepo undefined (type Interface has no field or method ListHooksForRepo) (typecheck)
database/integration_test.go|656 col 17| db.LastHookForRepo undefined (type Interface has no field or method LastHookForRepo) (typecheck)
database/integration_test.go|666 col 16| db.GetHookByWebhookID undefined (type Interface has no field or method GetHookByWebhookID) (typecheck)
database/integration_test.go|678 col 17| db.GetHookForRepo undefined (type Interface has no field or method GetHookForRepo) (typecheck)
database/integration_test.go|691 col 15| db.UpdateHook undefined (type Interface has no field or method UpdateHook) (typecheck)
database/integration_test.go|697 col 17| db.GetHook undefined (type Interface has no field or method GetHook) (typecheck)
database/integration_test.go|710 col 12| db.DeleteHook undefined (type Interface has no field or method DeleteHook) (typecheck)
database/integration_test.go|745 col 13| db.CreateLog undefined (type Interface has no field or method CreateLog) (typecheck)
database/integration_test.go|753 col 19| db.CountLogs undefined (type Interface has no field or method CountLogs) (typecheck)
go.mod|5 col 1| local replacement are not allowed: github.com/go-vela/types (gomoddirectives)

Filtered Findings (0)

Annotations

Check failure on line 3338 in compiler/native/compile_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] compiler/native/compile_test.go#L3338

missing type in composite literal (typecheck)
Raw output
compiler/native/compile_test.go:3338:6: missing type in composite literal (typecheck)
					{
					^

Check failure on line 3344 in compiler/native/compile_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] compiler/native/compile_test.go#L3344

missing type in composite literal (typecheck)
Raw output
compiler/native/compile_test.go:3344:6: missing type in composite literal (typecheck)
					{
					^

Check failure on line 3350 in compiler/native/compile_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] compiler/native/compile_test.go#L3350

missing type in composite literal (typecheck)
Raw output
compiler/native/compile_test.go:3350:6: missing type in composite literal (typecheck)
					{
					^

Check failure on line 174 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L174

db.CreateRepo undefined (type Interface has no field or method CreateRepo) (typecheck)
Raw output
database/integration_test.go:174:16: db.CreateRepo undefined (type Interface has no field or method CreateRepo) (typecheck)
		_, err := db.CreateRepo(context.TODO(), repo)
		             ^

Check failure on line 196 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L196

db.CreateBuild undefined (type Interface has no field or method CreateBuild) (typecheck)
Raw output
database/integration_test.go:196:16: db.CreateBuild undefined (type Interface has no field or method CreateBuild) (typecheck)
		_, err := db.CreateBuild(context.TODO(), build)
		             ^

Check failure on line 204 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L204

db.CountBuilds undefined (type Interface has no field or method CountBuilds) (typecheck)
Raw output
database/integration_test.go:204:19: db.CountBuilds undefined (type Interface has no field or method CountBuilds) (typecheck)
	count, err := db.CountBuilds(context.TODO())
	                 ^

Check failure on line 214 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L214

db.CountBuildsForDeployment undefined (type Interface has no field or method CountBuildsForDeployment) (typecheck)
Raw output
database/integration_test.go:214:18: db.CountBuildsForDeployment undefined (type Interface has no field or method CountBuildsForDeployment) (typecheck)
	count, err = db.CountBuildsForDeployment(context.TODO(), resources.Deployments[0], nil)
	                ^

Check failure on line 224 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L224

db.CountBuildsForOrg undefined (type Interface has no field or method CountBuildsForOrg) (typecheck)
Raw output
database/integration_test.go:224:18: db.CountBuildsForOrg undefined (type Interface has no field or method CountBuildsForOrg) (typecheck)
	count, err = db.CountBuildsForOrg(context.TODO(), resources.Repos[0].GetOrg(), nil)
	                ^

Check failure on line 234 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L234

db.CountBuildsForRepo undefined (type Interface has no field or method CountBuildsForRepo) (typecheck)
Raw output
database/integration_test.go:234:18: db.CountBuildsForRepo undefined (type Interface has no field or method CountBuildsForRepo) (typecheck)
	count, err = db.CountBuildsForRepo(context.TODO(), resources.Repos[0], nil)
	                ^

Check failure on line 244 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L244

db.CountBuildsForStatus undefined (type Interface has no field or method CountBuildsForStatus) (typecheck)
Raw output
database/integration_test.go:244:18: db.CountBuildsForStatus undefined (type Interface has no field or method CountBuildsForStatus) (typecheck)
	count, err = db.CountBuildsForStatus(context.TODO(), "running", nil)
	                ^

Check failure on line 254 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L254

db.ListBuilds undefined (type Interface has no field or method ListBuilds) (typecheck)
Raw output
database/integration_test.go:254:18: db.ListBuilds undefined (type Interface has no field or method ListBuilds) (typecheck)
	list, err := db.ListBuilds(context.TODO())
	                ^

Check failure on line 264 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L264

db.ListBuildsForOrg undefined (type Interface has no field or method ListBuildsForOrg) (typecheck)
Raw output
database/integration_test.go:264:24: db.ListBuildsForOrg undefined (type Interface has no field or method ListBuildsForOrg) (typecheck)
	list, count, err = db.ListBuildsForOrg(context.TODO(), resources.Repos[0].GetOrg(), nil, 1, 10)
	                      ^

Check failure on line 277 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L277

db.ListBuildsForRepo undefined (type Interface has no field or method ListBuildsForRepo) (typecheck)
Raw output
database/integration_test.go:277:24: db.ListBuildsForRepo undefined (type Interface has no field or method ListBuildsForRepo) (typecheck)
	list, count, err = db.ListBuildsForRepo(context.TODO(), resources.Repos[0], nil, time.Now().UTC().Unix(), 0, 1, 10)
	                      ^

Check failure on line 290 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L290

db.ListPendingAndRunningBuildsForRepo undefined (type Interface has no field or method ListPendingAndRunningBuildsForRepo) (typecheck)
Raw output
database/integration_test.go:290:17: db.ListPendingAndRunningBuildsForRepo undefined (type Interface has no field or method ListPendingAndRunningBuildsForRepo) (typecheck)
	list, err = db.ListPendingAndRunningBuildsForRepo(context.TODO(), resources.Repos[0])
	               ^

Check failure on line 303 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L303

db.ListPendingAndRunningBuilds undefined (type Interface has no field or method ListPendingAndRunningBuilds) (typecheck)
Raw output
database/integration_test.go:303:23: db.ListPendingAndRunningBuilds undefined (type Interface has no field or method ListPendingAndRunningBuilds) (typecheck)
	queueList, err := db.ListPendingAndRunningBuilds(context.TODO(), "0")
	                     ^

Check failure on line 313 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L313

db.LastBuildForRepo undefined (type Interface has no field or method LastBuildForRepo) (typecheck)
Raw output
database/integration_test.go:313:17: db.LastBuildForRepo undefined (type Interface has no field or method LastBuildForRepo) (typecheck)
	got, err := db.LastBuildForRepo(context.TODO(), resources.Repos[0], "main")
	               ^

Check failure on line 325 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L325

db.GetBuildForRepo undefined (type Interface has no field or method GetBuildForRepo) (typecheck)
Raw output
database/integration_test.go:325:17: db.GetBuildForRepo undefined (type Interface has no field or method GetBuildForRepo) (typecheck)
		got, err = db.GetBuildForRepo(context.TODO(), repo, build.GetNumber())
		              ^

Check failure on line 336 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L336

db.CleanBuilds undefined (type Interface has no field or method CleanBuilds) (typecheck)
Raw output
database/integration_test.go:336:18: db.CleanBuilds undefined (type Interface has no field or method CleanBuilds) (typecheck)
	count, err = db.CleanBuilds(context.TODO(), "integration testing", 1563474090)
	                ^

Check failure on line 348 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L348

db.UpdateBuild undefined (type Interface has no field or method UpdateBuild) (typecheck)
Raw output
database/integration_test.go:348:15: db.UpdateBuild undefined (type Interface has no field or method UpdateBuild) (typecheck)
		_, err = db.UpdateBuild(context.TODO(), build)
		            ^

Check failure on line 354 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L354

db.GetBuild undefined (type Interface has no field or method GetBuild) (typecheck)
Raw output
database/integration_test.go:354:17: db.GetBuild undefined (type Interface has no field or method GetBuild) (typecheck)
		got, err = db.GetBuild(context.TODO(), build.GetID())
		              ^

Check failure on line 367 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L367

db.DeleteBuild undefined (type Interface has no field or method DeleteBuild) (typecheck)
Raw output
database/integration_test.go:367:12: db.DeleteBuild undefined (type Interface has no field or method DeleteBuild) (typecheck)
		err = db.DeleteBuild(context.TODO(), build)
		         ^

Check failure on line 376 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L376

db.DeleteRepo undefined (type Interface has no field or method DeleteRepo) (typecheck)
Raw output
database/integration_test.go:376:12: db.DeleteRepo undefined (type Interface has no field or method DeleteRepo) (typecheck)
		err = db.DeleteRepo(context.TODO(), repo)
		         ^

Check failure on line 410 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L410

db.CreateBuildExecutable undefined (type Interface has no field or method CreateBuildExecutable) (typecheck)
Raw output
database/integration_test.go:410:13: db.CreateBuildExecutable undefined (type Interface has no field or method CreateBuildExecutable) (typecheck)
		err := db.CreateBuildExecutable(context.TODO(), executable)
		          ^

Check failure on line 419 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L419

db.PopBuildExecutable undefined (type Interface has no field or method PopBuildExecutable) (typecheck)
Raw output
database/integration_test.go:419:18: db.PopBuildExecutable undefined (type Interface has no field or method PopBuildExecutable) (typecheck)
		got, err := db.PopBuildExecutable(context.TODO(), executable.GetBuildID())
		               ^

Check failure on line 431 in database/integration_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] database/integration_test.go#L431

db.UpdateBuild undefined (type Interface has no field or method UpdateBuild) (typecheck)
Raw output
database/integration_test.go:431:15: db.UpdateBuild undefined (type Interface has no field or method UpdateBuild) (typecheck)
	_, err := db.UpdateBuild(context.TODO(), resources.Builds[0])
	             ^