Preparing report...

Report for github.com/Neirpyc/dota2api

A+    Excellent!    Found 24 issues across 25 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo96%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.


golint48%

Golint is a linter for Go source code.

    • dota2api/utils.go
    • Line 11: warning: comment on exported method Dota2.Get should be of the form "Get ..." (golint)
    • Line 49: warning: exported function ArrayIntToStr should have comment or be unexported (golint)
    • dota2api/vanityUrl.go
    • Line 13: warning: exported type Vanity should have comment or be unexported (golint)
    • Line 17: warning: exported type VanityResp should have comment or be unexported (golint)
    • Line 22: warning: comment on exported method Dota2.ResolveVanityUrl should be of the form "ResolveVanityUrl ..." (golint)
    • Line 59: warning: exported function VanityUrl should have comment or be unexported (golint)
    • dota2api/friendList.go
    • Line 43: warning: exported method Friends.GetBySteamId should have comment or be unexported (golint)
    • Line 60: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 69: warning: exported type Friend should have comment or be unexported (golint)
    • Line 75: warning: exported type Friends should have comment or be unexported (golint)
    • Line 77: warning: exported method Friends.Count should have comment or be unexported (golint)
    • Line 81: warning: comment on exported method Dota2.GetFriendList should be of the form "GetFriendList ..." (golint)
    • Line 109: warning: exported function ParameterSteamId should have comment or be unexported (golint)
    • dota2api/playerSummaries.go
    • Line 117: warning: exported type PlayerAccounts should have comment or be unexported (golint)
    • Line 119: warning: exported type CommunityVisibilityState should have comment or be unexported (golint)
    • Line 122: warning: exported const VisibilityPrivate should have comment (or a comment on this block) or be unexported (golint)
    • Line 129: warning: exported type ProfileState should have comment or be unexported (golint)
    • Line 132: warning: exported const ProfileStateEmpty should have comment (or a comment on this block) or be unexported (golint)
    • Line 136: warning: exported type Avatar should have comment or be unexported (golint)
    • Line 162: warning: exported method Avatar.Avatar32 should have comment or be unexported (golint)
    • Line 166: warning: exported method Avatar.Avatar64 should have comment or be unexported (golint)
    • Line 170: warning: exported method Avatar.Avatar184 should have comment or be unexported (golint)
    • Line 174: warning: exported type UserStatus should have comment or be unexported (golint)
    • Line 177: warning: exported const UserStatusOffline should have comment (or a comment on this block) or be unexported (golint)
    • Line 186: warning: exported type Optional should have comment or be unexported (golint)
    • Line 208: warning: exported method Optional.GameId should have comment or be unexported (golint)
    • Line 212: warning: exported method Optional.RealName should have comment or be unexported (golint)
    • Line 216: warning: exported method Optional.GameName should have comment or be unexported (golint)
    • Line 220: warning: exported method Optional.PrimaryClanId should have comment or be unexported (golint)
    • Line 224: warning: exported method Optional.CommentPermission should have comment or be unexported (golint)
    • Line 228: warning: exported method Optional.TimeCreated should have comment or be unexported (golint)
    • Line 232: warning: exported method Optional.LocCountryCode should have comment or be unexported (golint)
    • Line 236: warning: exported method Optional.LocStateCode should have comment or be unexported (golint)
    • Line 240: warning: exported method Optional.LocCityId should have comment or be unexported (golint)
    • Line 244: warning: exported method Optional.GameServerIp should have comment or be unexported (golint)
    • Line 248: warning: exported type PlayerAccount should have comment or be unexported (golint)
    • Line 261: warning: comment on exported method Dota2.GetPlayerSummaries should be of the form "GetPlayerSummaries ..." (golint)
    • Line 290: warning: exported function ParameterSteamIds should have comment or be unexported (golint)
    • dota2api/leagues.go
    • Line 102: warning: exported type LiveGame should have comment or be unexported (golint)
    • Line 114: warning: exported type LiveGames should have comment or be unexported (golint)
    • Line 116: warning: exported method LiveGames.Count should have comment or be unexported (golint)
    • Line 120: warning: exported type LiveGamePlayer should have comment or be unexported (golint)
    • Line 127: warning: exported type LiveGamePlayers should have comment or be unexported (golint)
    • Line 129: warning: exported type League should have comment or be unexported (golint)
    • Line 134: warning: exported type Series should have comment or be unexported (golint)
    • Line 139: warning: exported type LiveTeam should have comment or be unexported (golint)
    • Line 146: warning: exported type ScoreBoard should have comment or be unexported (golint)
    • Line 152: warning: exported type Sides should have comment or be unexported (golint)
    • Line 157: warning: exported type SideLive should have comment or be unexported (golint)
    • Line 166: warning: exported type LiveTeams should have comment or be unexported (golint)
    • Line 171: warning: exported type PlayerLive should have comment or be unexported (golint)
    • Line 184: warning: exported type PlayersLive should have comment or be unexported (golint)
    • Line 186: warning: exported type PlayerStatsLive should have comment or be unexported (golint)
    • Line 194: warning: exported type UltimateState should have comment or be unexported (golint)
    • Line 199: warning: exported type LivePlayerItems should have comment or be unexported (golint)
    • Line 208: warning: exported type Position should have comment or be unexported (golint)
    • Line 212: warning: exported type LiveAbility should have comment or be unexported (golint)
    • Line 217: warning: exported type LiveAbilities should have comment or be unexported (golint)
    • Line 407: warning: exported method Dota2.GetLiveLeagueGames should have comment or be unexported (golint)
    • dota2api/matchDetails.go
    • Line 113: warning: exported type MatchDetails should have comment or be unexported (golint)
    • Line 135: warning: exported type PicksBans should have comment or be unexported (golint)
    • Line 137: warning: exported method PicksBans.GetPick should have comment or be unexported (golint)
    • Line 153: warning: exported method PicksBans.GetPickByHero should have comment or be unexported (golint)
    • Line 162: warning: exported method PicksBans.GetByTeam should have comment or be unexported (golint)
    • Line 172: warning: exported method PicksBans.GetByPickType should have comment or be unexported (golint)
    • Line 182: warning: exported type PickBan should have comment or be unexported (golint)
    • Line 189: warning: exported type PickType should have comment or be unexported (golint)
    • Line 192: warning: exported const Pick should have comment (or a comment on this block) or be unexported (golint)
    • Line 196: warning: exported method PickBan.IsPick should have comment or be unexported (golint)
    • Line 200: warning: exported method PickBan.IsBan should have comment or be unexported (golint)
    • Line 204: warning: exported method PickBan.GetType should have comment or be unexported (golint)
    • Line 211: warning: exported method PickBan.IsRadiant should have comment or be unexported (golint)
    • Line 215: warning: exported method PickBan.IsDire should have comment or be unexported (golint)
    • Line 219: warning: exported method PickBan.GetTeam should have comment or be unexported (golint)
    • Line 223: warning: exported type AbilityUpgrades should have comment or be unexported (golint)
    • Line 225: warning: exported method AbilityUpgrades.Count should have comment or be unexported (golint)
    • Line 229: warning: exported method AbilityUpgrades.GetByAbility should have comment or be unexported (golint)
    • Line 239: warning: exported method AbilityUpgrades.GetByOrder should have comment or be unexported (golint)
    • Line 246: warning: exported method AbilityUpgrades.GetByLevel should have comment or be unexported (golint)
    • Line 262: warning: exported type AbilityUpgrade should have comment or be unexported (golint)
    • Line 268: warning: exported type Engine should have comment or be unexported (golint)
    • Line 271: warning: exported const Source1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 275: warning: exported type TeamDetails should have comment or be unexported (golint)
    • Line 277: warning: exported method TeamDetails.Count should have comment or be unexported (golint)
    • Line 281: warning: exported type PlayerDetails should have comment or be unexported (golint)
    • Line 291: warning: exported type PlayerStats should have comment or be unexported (golint)
    • Line 303: warning: exported type PlayerGold should have comment or be unexported (golint)
    • Line 308: warning: exported method PlayerGold.Current should have comment or be unexported (golint)
    • Line 312: warning: exported method PlayerGold.Spent should have comment or be unexported (golint)
    • Line 316: warning: exported method PlayerGold.NetWorth should have comment or be unexported (golint)
    • Line 320: warning: exported type Gold should have comment or be unexported (golint)
    • Line 322: warning: exported method Gold.Raw should have comment or be unexported (golint)
    • Line 326: warning: exported type Damage should have comment or be unexported (golint)
    • Line 331: warning: exported method Damage.Raw should have comment or be unexported (golint)
    • Line 335: warning: exported method Damage.Scaled should have comment or be unexported (golint)
    • Line 339: warning: exported method Damage.ScalingFactor should have comment or be unexported (golint)
    • Line 343: warning: exported method Gold.ToString should have comment or be unexported (golint)
    • Line 354: warning: exported type LeaverStatus should have comment or be unexported (golint)
    • Line 357: warning: exported const LeaverStatusNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 366: warning: exported type PlayersItems should have comment or be unexported (golint)
    • Line 379: warning: exported type KDA should have comment or be unexported (golint)
    • Line 385: warning: exported type Side should have comment or be unexported (golint)
    • Line 388: warning: exported const Radiant should have comment (or a comment on this block) or be unexported (golint)
    • Line 392: warning: exported type Victory should have comment or be unexported (golint)
    • Line 395: warning: exported const RadiantVictory should have comment (or a comment on this block) or be unexported (golint)
    • Line 399: warning: exported method Victory.RadiantWon should have comment or be unexported (golint)
    • Line 403: warning: exported method Victory.DireWon should have comment or be unexported (golint)
    • Line 407: warning: exported method Victory.GetWinningTeam should have comment or be unexported (golint)
    • Line 411: warning: exported type BuildingsState should have comment or be unexported (golint)
    • Line 416: warning: exported type TeamBuildingsState should have comment or be unexported (golint)
    • Line 424: warning: exported type LaneBuildingsState should have comment or be unexported (golint)
    • Line 461: warning: exported type Votes should have comment or be unexported (golint)
    • Line 466: warning: exported type GameMode should have comment or be unexported (golint)
    • Line 468: warning: comment on exported method GameMode.GetString should be of the form "GetString ..." (golint)
    • Line 540: warning: exported type Score should have comment or be unexported (golint)
    • Line 719: warning: comment on exported method Dota2.GetMatchDetails should be of the form "GetMatchDetails ..." (golint)
    • Line 752: warning: exported function MatchId should have comment or be unexported (golint)
    • dota2api/matchHistory.go
    • Line 11: warning: exported const LobbyInvalid should have comment (or a comment on this block) or be unexported (golint)
    • Line 97: warning: exported type MatchHistory should have comment or be unexported (golint)
    • Line 99: warning: exported method MatchHistory.Count should have comment or be unexported (golint)
    • Line 103: warning: exported type MatchSummary should have comment or be unexported (golint)
    • Line 112: warning: exported method MatchSummary.GetPlayer should have comment or be unexported (golint)
    • Line 122: warning: exported method MatchSummary.GetByHero should have comment or be unexported (golint)
    • Line 126: warning: exported method MatchSummary.PlayerCount should have comment or be unexported (golint)
    • Line 130: warning: exported method MatchSummary.GetByHeroId should have comment or be unexported (golint)
    • Line 140: warning: exported type Player should have comment or be unexported (golint)
    • Line 145: warning: exported type Team should have comment or be unexported (golint)
    • Line 150: warning: exported method Team.Count should have comment or be unexported (golint)
    • Line 154: warning: exported method Team.GetPlayer should have comment or be unexported (golint)
    • Line 161: warning: exported method Team.GetByHero should have comment or be unexported (golint)
    • Line 165: warning: exported method Team.GetByHeroId should have comment or be unexported (golint)
    • Line 174: warning: exported type LobbyType should have comment or be unexported (golint)
    • Line 176: warning: exported method LobbyType.GetId should have comment or be unexported (golint)
    • Line 180: warning: comment on exported method LobbyType.GetName should be of the form "GetName ..." (golint)
    • Line 208: warning: exported type Cursor should have comment or be unexported (golint)
    • Line 215: warning: exported function NewCursor should have comment or be unexported (golint)
    • Line 225: warning: exported method Cursor.GetLastReceivedMatch should have comment or be unexported (golint)
    • Line 229: warning: exported method Cursor.SetBegin should have comment or be unexported (golint)
    • Line 233: warning: exported method Cursor.GetRemaining should have comment or be unexported (golint)
    • Line 237: warning: exported method Dota2.GetMatchHistory should have comment or be unexported (golint)
    • Line 299: warning: exported method Dota2.GetMatchHistoryBySequenceNum should have comment or be unexported (golint)
    • Line 355: warning: exported function HeroId should have comment or be unexported (golint)
    • Line 363: warning: exported function MatchesRequested should have comment or be unexported (golint)
    • Line 371: warning: exported function AccountId should have comment or be unexported (golint)
    • Line 379: warning: exported function StartAtMatchId should have comment or be unexported (golint)
    • Line 387: warning: exported function MinPlayers should have comment or be unexported (golint)
    • Line 395: warning: exported function StartAtMatchSeqNum should have comment or be unexported (golint)
    • dota2api/parameters.go
    • Line 49: warning: exported type Parameter should have comment or be unexported (golint)
    • Line 59: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 86: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 95: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 100: warning: exported type ParameterInt should have comment or be unexported (golint)
    • Line 118: warning: exported type ParameterString should have comment or be unexported (golint)
    • Line 136: warning: exported type ParameterInt64 should have comment or be unexported (golint)
    • dota2api/steamId.go
    • Line 7: warning: exported type SteamId should have comment or be unexported (golint)
    • Line 12: warning: exported method SteamId.SteamId64 should have comment or be unexported (golint)
    • Line 19: warning: exported method SteamId.SteamId32 should have comment or be unexported (golint)
    • Line 23: warning: exported method SteamId.SetSteamId32 should have comment or be unexported (golint)
    • Line 28: warning: exported method SteamId.SetSteamId64 should have comment or be unexported (golint)
    • Line 33: warning: exported function NewSteamIdFrom64 should have comment or be unexported (golint)
    • Line 40: warning: exported function NewSteamIdFrom32 should have comment or be unexported (golint)
    • dota2api/config.go
    • Line 18: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 22: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 25: warning: exported type Config should have comment or be unexported (golint)
    • Line 37: warning: exported type HTTPClient should have comment or be unexported (golint)
    • Line 41: warning: exported type Dota2 should have comment or be unexported (golint)
    • Line 85: warning: exported function LoadConfig should have comment or be unexported (golint)
    • Line 119: warning: exported function LoadConfigFromFile should have comment or be unexported (golint)
    • dota2api/heroes.go
    • Line 22: warning: exported type HeroImageSize should have comment or be unexported (golint)
    • Line 25: warning: exported const SizeLg should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported type Heroes should have comment or be unexported (golint)
    • Line 47: warning: comment on exported method Heroes.GetById should be of the form "GetById ..." (golint)
    • Line 70: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 73: warning: comment on exported method Heroes.GetByName should be of the form "GetByName ..." (golint)
    • Line 83: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 110: warning: exported type Hero should have comment or be unexported (golint)
    • Line 126: warning: comment on exported method Dota2.GetHeroes should be of the form "GetHeroes ..." (golint)
    • Line 193: warning: exported method Heroes.Count should have comment or be unexported (golint)
    • Line 205: warning: exported method Dota2.GetHeroImage should have comment or be unexported (golint)
    • dota2api/items.go
    • Line 67: warning: exported type Item should have comment or be unexported (golint)
    • Line 76: warning: exported type Items should have comment or be unexported (golint)
    • Line 80: warning: comment on exported method Items.GetById should be of the form "GetById ..." (golint)
    • Line 103: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 106: warning: exported method Items.GetByPos should have comment or be unexported (golint)
    • Line 110: warning: comment on exported method Items.GetByName should be of the form "GetByName ..." (golint)
    • Line 120: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 123: warning: exported method Items.Item should have comment or be unexported (golint)
    • Line 133: warning: comment on exported method Dota2.GetItems should be of the form "GetItems ..." (golint)
    • Line 208: warning: exported method Items.Count should have comment or be unexported (golint)
    • Line 212: warning: exported method Dota2.GetItemImage should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign48%

IneffAssign detects ineffectual assignments in Go code.

    • dota2api/items_test.go
    • Line 20: warning: undeclared name: Goblin (ineffassign)
    • Line 74: warning: undeclared name: Goblin (ineffassign)
    • Line 88: warning: undeclared name: Goblin (ineffassign)
    • Line 123: warning: undeclared name: Goblin (ineffassign)
    • Line 162: warning: undeclared name: Goblin (ineffassign)
    • Line 5: warning: "github.com/franela/goblin" imported but not used (ineffassign)
    • dota2api/matchDetails_test.go
    • Line 18: warning: undeclared name: Goblin (ineffassign)
    • Line 52: warning: details.ForEachPlayer undefined (type MatchDetails has no field or method ForEachPlayer) (ineffassign)
    • Line 194: warning: details.ForEachPlayer undefined (type MatchDetails has no field or method ForEachPlayer) (ineffassign)
    • Line 236: warning: details.Dire.ForEach undefined (type TeamDetails has no field or method ForEach) (ineffassign)
    • Line 5: warning: "github.com/franela/goblin" imported but not used (ineffassign)
    • dota2api/example/main.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/Neirpyc/dota2api (invalid package name: "") (ineffassign)
    • dota2api/generators/genIterators.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import gopkg.in/yaml.v2 (invalid package name: "") (ineffassign)
    • Line 339: warning: undeclared name: yaml (ineffassign)
    • Line 7: warning: "gopkg.in/yaml.v2" imported but not used (ineffassign)
    • dota2api/config.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import gopkg.in/yaml.v2 (invalid package name: "") (ineffassign)
    • Line 125: warning: undeclared name: yaml (ineffassign)
    • Line 7: warning: "gopkg.in/yaml.v2" imported but not used (ineffassign)
    • Line 7: warning: could not import gopkg.in/yaml.v2 (invalid package name: "") (ineffassign)
    • Line 125: warning: undeclared name: yaml (ineffassign)
    • Line 7: warning: "gopkg.in/yaml.v2" imported but not used (ineffassign)
    • dota2api/heroes_test.go
    • Line 20: warning: undeclared name: Goblin (ineffassign)
    • Line 74: warning: undeclared name: Goblin (ineffassign)
    • Line 88: warning: undeclared name: Goblin (ineffassign)
    • Line 133: warning: undeclared name: Goblin (ineffassign)
    • Line 172: warning: undeclared name: Goblin (ineffassign)
    • Line 5: warning: "github.com/franela/goblin" imported but not used (ineffassign)
    • dota2api/steamId_test.go
    • Line 10: warning: undeclared name: Goblin (ineffassign)
    • Line 23: warning: undeclared name: Goblin (ineffassign)
    • Line 36: warning: undeclared name: Goblin (ineffassign)
    • Line 72: warning: undeclared name: Goblin (ineffassign)
    • Line 108: warning: undeclared name: Goblin (ineffassign)
    • Line 128: warning: undeclared name: Goblin (ineffassign)
    • Line 5: warning: "github.com/franela/goblin" imported but not used (ineffassign)
    • dota2api/config_test.go
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: could not import github.com/franela/goblin (invalid package name: "") (ineffassign)
    • Line 73: warning: undeclared name: Goblin (ineffassign)
    • Line 5: warning: "github.com/franela/goblin" imported but not used (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!