Lint: Disable some linters for single functions

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-08-21 01:14:21 +02:00
parent b9f683c982
commit c08bacbecf
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D
3 changed files with 3 additions and 0 deletions

View file

@ -18,6 +18,7 @@ func ptrInt64(v int64) *int64 { return &v }
func ptrString(v string) *string { return &v } func ptrString(v string) *string { return &v }
func ptrTime(v time.Time) *time.Time { 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 { func isDiscordMessageEmbedEqual(a, b *discordgo.MessageEmbed) bool {
checks := [][2]interface{}{ checks := [][2]interface{}{
// Base-Struct // Base-Struct

View file

@ -49,6 +49,7 @@ func (m *modReactionRole) Initialize(id string, crontab *cron.Cron, discord *dis
return nil return nil
} }
//nolint:funlen,gocyclo // Single task, seeing no sense in splitting
func (m modReactionRole) Setup() error { func (m modReactionRole) Setup() error {
var err error var err error

View file

@ -63,6 +63,7 @@ func (m *modStreamSchedule) Initialize(id string, crontab *cron.Cron, discord *d
func (m modStreamSchedule) Setup() error { return nil } func (m modStreamSchedule) Setup() error { return nil }
//nolint:funlen // Seeing no sense to split for 5 lines
func (m modStreamSchedule) cronUpdateSchedule() { func (m modStreamSchedule) cronUpdateSchedule() {
twitch := newTwitchAdapter( twitch := newTwitchAdapter(
// @attr twitch_client_id required string "" Twitch client ID the token was issued for // @attr twitch_client_id required string "" Twitch client ID the token was issued for