heshoots/discordbot

View on GitHub

Showing 3 of 3 total issues

Function GetRoutes has 79 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func GetRoutes() Routes {
    return Routes{
        Route{
            "Announce",
            []string{"!discord", "!announce"},
Severity: Major
Found in pkg/server/routes.go - About 2 hrs to fix

    Function CreateTournament has 5 return statements (exceeds 4 allowed).
    Open

    func CreateTournament(apikey string, subdomain string, name string, game string) (string, error) {
        client := &http.Client{}
        tournamentvalues := map[string]string{"name": name, "url": name, "subdomain": subdomain, "game_name": game, "tournament_type": "double elimination"}
        values := map[string]map[string]string{"tournament": tournamentvalues}
        jsonValue, err := json.Marshal(values)
    Severity: Major
    Found in pkg/challonge/challonge.go - About 35 mins to fix

      Function GetLanesEvents has 5 return statements (exceeds 4 allowed).
      Open

      func GetLanesEvents() ([]*Event, error) {
          var events []*Event
          urls, err := getPages()
          if err != nil {
              return nil, err
      Severity: Major
      Found in pkg/events/events.go - About 35 mins to fix
        Severity
        Category
        Status
        Source
        Language