From fb0cc5ffd4ed02792e92ccb01e6dc6d9b1a78cc1 Mon Sep 17 00:00:00 2001 From: "Claire.Nicholas" Date: Tue, 2 Jan 2024 11:05:42 -0600 Subject: [PATCH] fixing final lint errors --- library/actions/delete.go | 3 ++- library/actions/delete_test.go | 8 ++++---- library/events_test.go | 8 ++++---- library/repo.go | 2 ++ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/library/actions/delete.go b/library/actions/delete.go index c0692ab1..fa88046d 100644 --- a/library/actions/delete.go +++ b/library/actions/delete.go @@ -1,5 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 - +// +//nolint:dupl // similar code to push.go package actions import "github.com/go-vela/types/constants" diff --git a/library/actions/delete_test.go b/library/actions/delete_test.go index 73a58ceb..3c7cd539 100644 --- a/library/actions/delete_test.go +++ b/library/actions/delete_test.go @@ -100,9 +100,9 @@ func TestLibrary_Delete_ToMask(t *testing.T) { } func testDelete() *Delete { - delete := new(Delete) - delete.SetBranch(true) - delete.SetTag(true) + deletion := new(Delete) + deletion.SetBranch(true) + deletion.SetTag(true) - return delete + return deletion } diff --git a/library/events_test.go b/library/events_test.go index a96ef986..cf394594 100644 --- a/library/events_test.go +++ b/library/events_test.go @@ -155,15 +155,15 @@ func testEvents() *Events { comment.SetCreated(false) comment.SetEdited(false) - delete := new(actions.Delete) - delete.SetBranch(true) - delete.SetTag(true) + deletion := new(actions.Delete) + deletion.SetBranch(true) + deletion.SetTag(true) e.SetPush(push) e.SetPullRequest(pr) e.SetDeployment(deploy) e.SetComment(comment) - e.SetDelete(delete) + e.SetDelete(deletion) return e } diff --git a/library/repo.go b/library/repo.go index 5a5206a8..cf98e369 100644 --- a/library/repo.go +++ b/library/repo.go @@ -794,6 +794,8 @@ func (r *Repo) SetApproveBuild(v string) { } // EventAllowed determines whether or not an event is allowed based on the repository settings. +// +//nolint:nakedret // not necessary to watch for here func (r *Repo) EventAllowed(event, action string) (allowed bool) { allowed = false