From c1405ac592afd6b8b2d76f10851b2bee6d916e6d Mon Sep 17 00:00:00 2001 From: Lukasz Mierzwa Date: Thu, 15 Aug 2024 10:10:08 +0100 Subject: [PATCH] Fix lint issues --- internal/checks/rule_for_test.go | 8 ++++---- internal/reporter/gitlab.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/checks/rule_for_test.go b/internal/checks/rule_for_test.go index c4722143..8e9bdd1d 100644 --- a/internal/checks/rule_for_test.go +++ b/internal/checks/rule_for_test.go @@ -10,12 +10,12 @@ import ( "github.com/cloudflare/pint/internal/promapi" ) -func forMin(key, min string) string { - return fmt.Sprintf("This alert rule must have a `%s` field with a minimum duration of %s.", key, min) +func forMin(key, m string) string { + return fmt.Sprintf("This alert rule must have a `%s` field with a minimum duration of %s.", key, m) } -func forMax(key, max string) string { - return fmt.Sprintf("This alert rule must have a `%s` field with a maximum duration of %s.", key, max) +func forMax(key, m string) string { + return fmt.Sprintf("This alert rule must have a `%s` field with a maximum duration of %s.", key, m) } func TestRuleForCheck(t *testing.T) { diff --git a/internal/reporter/gitlab.go b/internal/reporter/gitlab.go index ccc11456..52e709d8 100644 --- a/internal/reporter/gitlab.go +++ b/internal/reporter/gitlab.go @@ -466,7 +466,7 @@ func loggifyDiscussion(opt *gitlab.CreateMergeRequestDiscussionOptions) (attrs [ return attrs } -func tooManyCommentsMsg(nr, max int) string { +func tooManyCommentsMsg(nr, m int) string { return fmt.Sprintf(`This pint run would create %d comment(s), which is more than the limit configured for pint (%d). -%d comment(s) were skipped and won't be visibile on this PR.`, nr, max, nr-max) +%d comment(s) were skipped and won't be visibile on this PR.`, nr, m, nr-m) }