topfreegames/khan

View on GitHub
perf/main.go

Summary

Maintainability
A
3 hrs
Test Coverage

Function createClans has 60 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func createClans(db models.DB, games []string, clans int, progress func() bool) map[string][]clanData {
    for _, game := range games {
        sql := `
        WITH owner AS (
            INSERT INTO players(
Severity: Minor
Found in perf/main.go - About 1 hr to fix

    Function createClanPlayers has 56 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func createClanPlayers(db models.DB, games []string, clans map[string][]clanData, playersPerClan int, approved, denied, banned bool, progress func() bool) {
        for _, game := range games {
            for _, clan := range clans[game] {
                sql := `
                WITH addedPlayers AS (
    Severity: Minor
    Found in perf/main.go - About 1 hr to fix

      Function createClanPlayers has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func createClanPlayers(db models.DB, games []string, clans map[string][]clanData, playersPerClan int, approved, denied, banned bool, progress func() bool) {
      Severity: Minor
      Found in perf/main.go - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status