From c08bacbecf794d892eff360a3d4724614560d64a Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 21 Aug 2021 01:14:21 +0200 Subject: [PATCH] Lint: Disable some linters for single functions Signed-off-by: Knut Ahlers --- helpers.go | 1 + mod_reactionRole.go | 1 + mod_streamSchedule.go | 1 + 3 files changed, 3 insertions(+) diff --git a/helpers.go b/helpers.go index f719439..a5d1d06 100644 --- a/helpers.go +++ b/helpers.go @@ -18,6 +18,7 @@ func ptrInt64(v int64) *int64 { return &v } func ptrString(v string) *string { return &v } func ptrTime(v time.Time) *time.Time { return &v } +//nolint:gocognit,gocyclo // This function compares two structs and needs the complexity func isDiscordMessageEmbedEqual(a, b *discordgo.MessageEmbed) bool { checks := [][2]interface{}{ // Base-Struct diff --git a/mod_reactionRole.go b/mod_reactionRole.go index 5463edd..924e67d 100644 --- a/mod_reactionRole.go +++ b/mod_reactionRole.go @@ -49,6 +49,7 @@ func (m *modReactionRole) Initialize(id string, crontab *cron.Cron, discord *dis return nil } +//nolint:funlen,gocyclo // Single task, seeing no sense in splitting func (m modReactionRole) Setup() error { var err error diff --git a/mod_streamSchedule.go b/mod_streamSchedule.go index 1db8c2f..7c45463 100644 --- a/mod_streamSchedule.go +++ b/mod_streamSchedule.go @@ -63,6 +63,7 @@ func (m *modStreamSchedule) Initialize(id string, crontab *cron.Cron, discord *d func (m modStreamSchedule) Setup() error { return nil } +//nolint:funlen // Seeing no sense to split for 5 lines func (m modStreamSchedule) cronUpdateSchedule() { twitch := newTwitchAdapter( // @attr twitch_client_id required string "" Twitch client ID the token was issued for