topfreegames/khan

View on GitHub
models/game.go

Summary

Maintainability
B
4 hrs
Test Coverage

Function CreateGame has 95 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func CreateGame(
    db DB,
    publicID, name string,
    levels, metadata map[string]interface{},
    minLevelAccept, minLevelCreate, minLevelRemove,
Severity: Major
Found in models/game.go - About 2 hrs to fix

    Function CreateGame has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        db DB,
        publicID, name string,
        levels, metadata map[string]interface{},
        minLevelAccept, minLevelCreate, minLevelRemove,
        minOffsetRemove, minOffsetPromote, minOffsetDemote, maxMembers,
    Severity: Major
    Found in models/game.go - About 50 mins to fix

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

          db DB, publicID, name string, levels, metadata map[string]interface{},
          minLevelAccept, minLevelCreate, minLevelRemove, minOffsetRemove, minOffsetPromote,
          minOffsetDemote, maxMembers, maxClans, cooldownAfterDeny, cooldownAfterDelete,
          cooldownBeforeApply, cooldownBeforeInvite, maxPendingInvites int,
          clanUpdateMetadataFieldsHookTriggerWhitelist string,
      Severity: Minor
      Found in models/game.go - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status