Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions core/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand All @@ -95,7 +95,7 @@ func configureChatApplication(bot *models.Bot) {

bot.TelegramToken = token

// nolint:goconst // refactor
//nolint:goconst // refactor
case "google_chat":
gchat.Configure(bot)

Expand Down
2 changes: 1 addition & 1 deletion core/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion handlers/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion remote/slack/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down