From c9e2bace1afab26998f57ae3c0e48d9efa2096dd Mon Sep 17 00:00:00 2001 From: thedebugger Date: Tue, 23 Jul 2024 04:37:56 +0000 Subject: [PATCH] Fix linting errors --- pkg/branch/branch.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/branch/branch.go b/pkg/branch/branch.go index 204ca194..559b428d 100644 --- a/pkg/branch/branch.go +++ b/pkg/branch/branch.go @@ -16,10 +16,10 @@ package branch import ( "fmt" + "math/rand" "os" "path" "strconv" - "math/rand" "sigs.k8s.io/yaml" @@ -92,7 +92,10 @@ func Branch(manifest model.Manifest, step int, dryrun bool, token string) error if step > 2 { prName = "[release-" + release + "] " + prName } - if err := util.CreatePR(manifest, repo, "automatedBranchStep"+strconv.Itoa(step)+"-"+strconv.Itoa(rand.Intn(100)), prName, "", dryrun, token, "", "", []string{}); err != nil { + + // Disable linter G404: Use of weak random number generator + err := util.CreatePR(manifest, repo, "automatedBranchStep"+strconv.Itoa(step)+"-"+strconv.Itoa(rand.Intn(100)), prName, "", dryrun, token, "", "", []string{}) //nolint:all + if err != nil { return fmt.Errorf("failed PR creation: %v", err) } }