diff --git a/bridge/matrix/matrix.go b/bridge/matrix/matrix.go index 84fb0ca4..bd75a76b 100644 --- a/bridge/matrix/matrix.go +++ b/bridge/matrix/matrix.go @@ -76,6 +76,7 @@ func (m *Matrix) syncCallback(resp *mautrix.RespSync, since string) bool { return true } +// nolint:funlen func (m *Matrix) handleMatrix(onConnect func()) { syncer := m.mc.Syncer.(*mautrix.DefaultSyncer) @@ -282,7 +283,7 @@ func (m *Matrix) handleEvent(source mautrix.EventSource, ev *event.Event) { //Event: rmsg.Event, //ParentID: mxEvent }, - } + } //nolint:gocritic m.eventChan <- event return @@ -300,7 +301,7 @@ func (m *Matrix) handleEvent(source mautrix.EventSource, ev *event.Event) { //Event: rmsg.Event, //ParentID: mxEvent }, - } + } //nolint:gocritic m.eventChan <- event } diff --git a/bridge/matrix/sync.go b/bridge/matrix/sync.go index ad6b897d..d5d6a0a0 100644 --- a/bridge/matrix/sync.go +++ b/bridge/matrix/sync.go @@ -28,7 +28,7 @@ func (s *Syncer) ProcessResponse(resp *mautrix.RespSync, since string) error { append(sync.State.Events, sync.Timeline.Events...), sync.Ephemeral.Events...), sync.AccountData.Events...) { - ev.Content.ParseRaw(ev.Type) + ev.Content.ParseRaw(ev.Type) //nolint:errcheck ev.RoomID = room spew.Dump(ev) diff --git a/mm-go-irckit/server.go b/mm-go-irckit/server.go index a398ee4c..4832eca3 100644 --- a/mm-go-irckit/server.go +++ b/mm-go-irckit/server.go @@ -447,7 +447,7 @@ outerloop: case irc.PASS: u.Pass = msg.Params case irc.JOIN: - s.EncodeMessage(u, irc.ERR_NOTREGISTERED, []string{"*"}, "Please register first") + s.EncodeMessage(u, irc.ERR_NOTREGISTERED, []string{"*"}, "Please register first") //nolint:errcheck // https://ircv3.net/specs/extensions/capability-negotiation.html case irc.CAP: subcommand := msg.Params[0] @@ -475,7 +475,7 @@ outerloop: ok := s.add(u) if !ok { - s.EncodeMessage(u, irc.ERR_NICKNAMEINUSE, []string{u.Nick}, "Nickname is already in use") + s.EncodeMessage(u, irc.ERR_NICKNAMEINUSE, []string{u.Nick}, "Nickname is already in use") //nolint:errcheck continue } s.u = u diff --git a/mm-go-irckit/server_commands.go b/mm-go-irckit/server_commands.go index ff660965..a3bdde2a 100644 --- a/mm-go-irckit/server_commands.go +++ b/mm-go-irckit/server_commands.go @@ -392,7 +392,7 @@ func CmdPrivMsg(s Server, u *User, msg *irc.Message) error { msgID, err2 := u.br.MsgChannel(ch.ID(), msg.Trailing) if err2 != nil { - u.MsgSpoofUser(u, u.br.Protocol(), "msg: "+msg.Trailing+" could not be sent "+err2.Error()) + u.MsgSpoofUser(u, u.br.Protocol(), "msg: "+msg.Trailing+" could not be sent "+err2.Error()) //nolint:goconst return err2 } diff --git a/mm-go-irckit/service.go b/mm-go-irckit/service.go index 7cbf93ae..1f2be371 100644 --- a/mm-go-irckit/service.go +++ b/mm-go-irckit/service.go @@ -84,7 +84,7 @@ func login(u *User, toUser *User, args []string, service string) { u.MsgUser(toUser, "login OK") if u.Credentials.Token != "" { - u.MsgUser(toUser, "token used: "+u.Credentials.Token) + u.MsgUser(toUser, "token used: "+u.Credentials.Token) //nolint:goconst } return @@ -299,7 +299,7 @@ func search(u *User, toUser *User, args []string, service string) { if len(postlist.Posts[postlist.Order[i]].FileIds) > 0 { for _, fname := range u.br.GetFileLinks(postlist.Posts[postlist.Order[i]].FileIds) { - u.MsgUser(toUser, "\x1ddownload file - "+fname+"\x1d") + u.MsgUser(toUser, "\x1ddownload file - "+fname+"\x1d") //nolint:goconst } } diff --git a/mm-go-irckit/userbridge.go b/mm-go-irckit/userbridge.go index 2711223c..59055d58 100644 --- a/mm-go-irckit/userbridge.go +++ b/mm-go-irckit/userbridge.go @@ -1027,7 +1027,7 @@ func (u *User) prefixContext(channelID, messageID, parentID, event string) strin prefixChar = "↪" } - if u.v.GetString(u.br.Protocol()+".threadcontext") == "mattermost" || u.v.GetString(u.br.Protocol()+".threadcontext") == "mattermost+post" { + if u.v.GetString(u.br.Protocol()+".threadcontext") == "mattermost" || u.v.GetString(u.br.Protocol()+".threadcontext") == "mattermost+post" { //nolint:goconst if parentID == "" { return fmt.Sprintf("[@@%s]", messageID) }