evalphobia/bobo-experiment

View on GitHub

Showing 7 of 79 total issues

Function main has 58 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func main() {
    bobo.Run(bobo.RunOption{
        Engine: &slack.SlackEngine{},
        Logger: &log.StdLogger{
            IsDebug: bobo.IsDebug(),
Severity: Minor
Found in cmd/main.go - About 1 hr to fix

    Method DynamoDBCommand.run has 6 return statements (exceeds 4 allowed).
    Open

    func (s DynamoDBCommand) run(d command.CommandData) command.Command {
        c := command.Command{}
    
        ddbCli, err := getOrCreateDynamoDBClient()
        if err != nil {
    Severity: Major
    Found in experiment/aws/example_command_dynamodb.go - About 40 mins to fix

      Method SQSCommand.runSQS has 6 return statements (exceeds 4 allowed).
      Open

      func (s SQSCommand) runSQS(d command.CommandData) command.Command {
          c := command.Command{}
      
          sqsCli, err := getOrCreateSQSClient()
          if err != nil {
      Severity: Major
      Found in experiment/aws/example_command_sqs.go - About 40 mins to fix

        Method SQSPurgeCommand.runSQSPurge has 6 return statements (exceeds 4 allowed).
        Open

        func (s SQSPurgeCommand) runSQSPurge(d command.CommandData) {
            queueName := d.TextOther
            switch {
            case s.isInBlacklist(queueName),
                !s.isInWhitelist(queueName):
        Severity: Major
        Found in experiment/aws/example_command_sqs_purge.go - About 40 mins to fix

          Method MergeCommand.runMergeFace has 5 return statements (exceeds 4 allowed).
          Open

          func (m *MergeCommand) runMergeFace(d command.CommandData) {
              switch {
              case m.isInBlacklist(d.SenderName),
                  !m.isInWhitelist(d.SenderName):
                  _ = command.NewReplyEngineTask(d.Engine, d.Channel, i18n.Message("No!")).Run()
          Severity: Major
          Found in experiment/faceplusplus/example_command_merge.go - About 35 mins to fix

            Method RoomCommand.runRoom has 5 return statements (exceeds 4 allowed).
            Open

            func (a *RoomCommand) runRoom(d command.CommandData) command.Command {
                c := command.Command{}
            
                _, err := getGoogleCalendarClient()
                if err != nil {
            Severity: Major
            Found in experiment/google/example_command_room.go - About 35 mins to fix

              Method MergeTargetCommand.runMergeFace has 5 return statements (exceeds 4 allowed).
              Open

              func (m *MergeTargetCommand) runMergeFace(d command.CommandData) {
                  switch {
                  case m.isInBlacklist(d.SenderName),
                      !m.isInWhitelist(d.SenderName):
                      _ = command.NewReplyEngineTask(d.Engine, d.Channel, i18n.Message("No!")).Run()
              Severity: Major
              Found in experiment/faceplusplus/example_command_merge_target.go - About 35 mins to fix
                Severity
                Category
                Status
                Source
                Language