diff --git a/.golangci.yml b/.golangci.yml index efb8aec9..f2556412 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -140,7 +140,6 @@ linters-settings: # https://github.com/golangci/golangci-lint/blob/master/pkg/golinters/nolintlint nolintlint: - allow-leading-space: true # allow non-"machine-readable" format (ie. with leading space) allow-unused: false # allow nolint directives that don't address a linting issue require-explanation: true # require an explanation for nolint directives require-specific: true # require nolint directives to be specific about which linter is being skipped diff --git a/core/configure.go b/core/configure.go index 6f05a7e8..7c3a65d6 100644 --- a/core/configure.go +++ b/core/configure.go @@ -45,7 +45,7 @@ func configureChatApplication(bot *models.Bot) { if bot.ChatApplication != "" { switch strings.ToLower(bot.ChatApplication) { - // nolint:goconst // refactor + //nolint:goconst // refactor case "discord": // Discord bot token token, err := utils.Substitute(bot.DiscordToken, emptyMap) @@ -74,11 +74,11 @@ func configureChatApplication(bot *models.Bot) { bot.RunChat = false } - // nolint:goconst // refactor + //nolint:goconst // refactor case "slack": configureSlackBot(bot) - // nolint:goconst // refactor + //nolint:goconst // refactor case "telegram": token, err := utils.Substitute(bot.TelegramToken, emptyMap) if err != nil { @@ -95,7 +95,7 @@ func configureChatApplication(bot *models.Bot) { bot.TelegramToken = token - // nolint:goconst // refactor + //nolint:goconst // refactor case "google_chat": gchat.Configure(bot) diff --git a/core/matcher.go b/core/matcher.go index ae0c983a..314983a4 100644 --- a/core/matcher.go +++ b/core/matcher.go @@ -77,7 +77,7 @@ func getProccessedInputAndHitValue(messageInput, ruleRespondValue, ruleHearValue } // handleChatServiceRule handles the processing logic for a rule that came from either the chat application or CLI remote. -// nolint:gocyclo // refactor candidate +//nolint:gocyclo // refactor candidate func handleChatServiceRule(outputMsgs chan<- models.Message, message models.Message, hitRule chan<- models.Rule, rule models.Rule, processedInput string, hit bool, bot *models.Bot) (bool, bool) { match, stopSearch := false, false diff --git a/handlers/script.go b/handlers/script.go index 0625172b..5148864e 100644 --- a/handlers/script.go +++ b/handlers/script.go @@ -48,7 +48,7 @@ func ScriptExec(args models.Action, msg *models.Message) (*models.ScriptResponse bin := utils.ExecArgTokenizer(cmdProcessed) // prep the command to be executed with context - // nolint:gosec // ignore "potential tainted input or cmd arguments" because bot owner controls usage + //nolint:gosec // ignore "potential tainted input or cmd arguments" because bot owner controls usage cmd := exec.CommandContext(ctx, bin[0], bin[1:]...) // run command and capture stdout/stderr diff --git a/remote/slack/helper.go b/remote/slack/helper.go index a273d1fd..8a538e5f 100644 --- a/remote/slack/helper.go +++ b/remote/slack/helper.go @@ -678,7 +678,7 @@ func readFromEventsAPI(api *slack.Client, vToken string, inputMsgs chan<- models // readFromSocketMode reads messages from Slack's Socket Mode // // https://api.slack.com/apis/connections/socket -// nolint:gocyclo,funlen // needs refactor +//nolint:gocyclo,funlen // needs refactor func readFromSocketMode(sm *slack.Client, inputMsgs chan<- models.Message, bot *models.Bot) { // setup the client client := socketmode.New(sm)