Preparing report...

Report for github.com/harkce/goinsta

(v0.0.0-20220109003210-a7078c7ce214)

A+    Excellent!    Found 28 issues across 48 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!


golint45%

Golint is a linter for Go source code.

    • account.go
    • Line 116: warning: don't use underscores in Go names; method parameter new_ should be new (golint)
    • explore.go
    • Line 5: warning: exported type Discover should have comment or be unexported (golint)
    • Line 34: warning: exported type DiscoverMediaItem should have comment or be unexported (golint)
    • Line 38: warning: exported type DiscoverSectionalItem should have comment or be unexported (golint)
    • feeds.go
    • Line 20: warning: comment on exported method Feed.LocationID should be of the form "LocationID ..." (golint)
    • types.go
    • Line 26: warning: exported type Device should have comment or be unexported (golint)
    • Line 400: warning: exported type ErrChallengeProcess should have comment or be unexported (golint)
    • Line 408: warning: exported type Cooldowns should have comment or be unexported (golint)
    • Line 423: warning: exported type ScoresBootstrapUsers should have comment or be unexported (golint)
    • Line 434: warning: exported type CommentOffensive should have comment or be unexported (golint)
    • activity.go
    • Line 57: warning: comment on exported type RecentItems should be of the form "RecentItems ..." (with optional leading article) (golint)
    • hashtags.go
    • Line 90: warning: exported method Hashtag.GetNextID should have comment or be unexported (golint)
    • Line 246: warning: comment on exported method Hashtag.ClearError should be of the form "ClearError ..." (golint)
    • Line 251: warning: receiver name media should be consistent with previous receiver name h for Hashtag (golint)
    • search.go
    • Line 14: warning: exported type SearchFunc should have comment or be unexported (golint)
    • Line 59: warning: exported type Place should have comment or be unexported (golint)
    • Line 65: warning: exported type TopSearchItem should have comment or be unexported (golint)
    • Line 74: warning: exported type SearchHistory should have comment or be unexported (golint)
    • Line 92: warning: exported method Search.Search should have comment or be unexported (golint)
    • Line 96: warning: exported method Search.SearchUser should have comment or be unexported (golint)
    • Line 100: warning: exported method Search.SearchHashtag should have comment or be unexported (golint)
    • Line 104: warning: exported method Search.SearchLocation should have comment or be unexported (golint)
    • Line 108: warning: exported method SearchResult.Next should have comment or be unexported (golint)
    • Line 154: warning: exported method Search.History should have comment or be unexported (golint)
    • Line 166: warning: exported method TopSearchItem.RegisterClick should have comment or be unexported (golint)
    • Line 189: warning: exported method SearchResult.RegisterUserClick should have comment or be unexported (golint)
    • Line 314: warning: receiver name search should be consistent with previous receiver name sb for Search (golint)
    • Line 377: warning: receiver name search should be consistent with previous receiver name sb for Search (golint)
    • Line 405: warning: receiver name search should be consistent with previous receiver name sb for Search (golint)
    • Line 436: warning: receiver name search should be consistent with previous receiver name sb for Search (golint)
    • Line 470: warning: exported method Search.NullState should have comment or be unexported (golint)
    • Line 470: warning: receiver name search should be consistent with previous receiver name sb for Search (golint)
    • Line 478: warning: receiver name search should be consistent with previous receiver name sb for Search (golint)
    • stories.go
    • Line 122: warning: comment on exported method Reel.Delete should be of the form "Delete ..." (golint)
    • inbox.go
    • Line 181: warning: exported type AnimatedMedia should have comment or be unexported (golint)
    • Line 199: warning: exported type VoiceMedia should have comment or be unexported (golint)
    • Line 220: warning: comment on exported type VisualMedia should be of the form "VisualMedia ..." (with optional leading article) (golint)
    • Line 305: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 459: warning: receiver name conv should be consistent with previous receiver name c for Conversation (golint)
    • Line 489: warning: exported method Conversation.Hide should have comment or be unexported (golint)
    • Line 489: warning: receiver name conv should be consistent with previous receiver name c for Conversation (golint)
    • location.go
    • Line 8: warning: exported type LocationInstance should have comment or be unexported (golint)
    • Line 16: warning: exported type LayoutSection should have comment or be unexported (golint)
    • Line 32: warning: exported type Section should have comment or be unexported (golint)
    • Line 41: warning: exported method LocationInstance.Feeds should have comment or be unexported (golint)
    • Line 65: warning: exported method Location.Feed should have comment or be unexported (golint)
    • uploads.go
    • Line 17: warning: exported type UploadOptions should have comment or be unexported (golint)
    • utilities/encryption.go
    • Line 18: warning: exported function RSADecodePublicKeyFromBase64 should have comment or be unexported (golint)
    • Line 34: warning: exported function AESGCMEncrypt should have comment or be unexported (golint)
    • Line 41: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 49: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 61: warning: exported function RSAPublicKeyPKCS1Encrypt should have comment or be unexported (golint)
    • Line 65: warning: exported function EncryptPassword should have comment or be unexported (golint)
    • collections.go
    • Line 9: warning: exported var ErrAllSaved should have comment or be unexported (golint)
    • Line 489: warning: receiver name media should be consistent with previous receiver name c for Collection (golint)
    • Line 505: warning: comment on exported method Item.SaveTo should be of the form "SaveTo ..." (golint)
    • Line 672: warning: comment on exported method SavedMedia.GetNextID should be of the form "GetNextID ..." (golint)
    • const.go
    • Line 60: warning: comment on exported var GalaxyS10 should be of the form "GalaxyS10 ..." (golint)
    • Line 71: warning: exported var G6 should have comment or be unexported (golint)
    • Line 87: warning: exported const MuteAll should have comment (or a comment on this block) or be unexported (golint)
    • env.go
    • Line 14: warning: exported type EnvPlainAcc should have comment or be unexported (golint)
    • Line 20: warning: exported type EnvEncAcc should have comment or be unexported (golint)
    • Line 26: warning: exported type EnvAcc should have comment or be unexported (golint)
    • Line 139: warning: exported function EnvUpdateAccs should have comment or be unexported (golint)
    • Line 143: warning: exported function EnvUpdateEnc should have comment or be unexported (golint)
    • Line 147: warning: exported function EnvUpdatePlain should have comment or be unexported (golint)
    • Line 244: warning: exported function EnvReadAccs should have comment or be unexported (golint)
    • goinsta.go
    • Line 126: warning: exported method Instagram.SetInfoHandler should have comment or be unexported (golint)
    • Line 130: warning: exported method Instagram.SetWarnHandler should have comment or be unexported (golint)
    • Line 134: warning: exported method Instagram.SetDebugHandler should have comment or be unexported (golint)
    • Line 166: warning: comment on exported method Instagram.SetFamilyID should be of the form "SetFamilyID ..." (golint)
    • Line 315: warning: comment on exported method Instagram.ExportIO should be of the form "ExportIO ..." (golint)
    • Line 503: warning: exported method Instagram.OpenApp should have comment or be unexported (golint)
    • Line 720: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • utils.go
    • Line 13: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 203: warning: exported function MergeMapI should have comment or be unexported (golint)
    • Line 212: warning: exported function MergeMapS should have comment or be unexported (golint)
    • media.go
    • Line 292: warning: exported method Item.CommentCheckOffensive should have comment or be unexported (golint)
    • Line 319: warning: exported method Item.Reply should have comment or be unexported (golint)
    • Line 362: warning: exported function MediaToString should have comment or be unexported (golint)
    • Line 631: warning: comment on exported method Item.DownloadTo should be of the form "DownloadTo ..." (golint)
    • Line 774: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 779: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 811: warning: exported method Item.GetID should have comment or be unexported (golint)
    • Line 923: warning: comment on exported method FeedMedia.GetNextID should be of the form "GetNextID ..." (golint)
    • profiles.go
    • Line 189: warning: don't use underscores in Go names; method parameter id_ should be id (golint)
    • shortid.go
    • Line 18: warning: exported function MediaIDFromShortID should have comment or be unexported (golint)
    • broadcasts.go
    • Line 82: warning: exported type BroadcastComments should have comment or be unexported (golint)
    • Line 110: warning: exported type BroadcastLikes should have comment or be unexported (golint)
    • Line 132: warning: exported type BroadcastHeartbeat should have comment or be unexported (golint)
    • Line 166: warning: comment on exported method Broadcast.GetComments should be of the form "GetComments ..." (golint)
    • Line 200: warning: comment on exported method Broadcast.GetLikes should be of the form "GetLikes ..." (golint)
    • Line 228: warning: comment on exported method Broadcast.GetHeartbeat should be of the form "GetHeartbeat ..." (golint)
    • challenge.go
    • Line 9: warning: exported type ChallengeStepData should have comment or be unexported (golint)
    • Line 21: warning: exported type Challenge should have comment or be unexported (golint)
    • Line 41: warning: exported type ChallengeContext should have comment or be unexported (golint)
    • Line 51: warning: exported type TwoFactorInfo should have comment or be unexported (golint)
    • Line 118: warning: receiver name challenge should be consistent with previous receiver name c for Challenge (golint)
    • Line 156: warning: comment on exported method Challenge.SendSecurityCode should be of the form "SendSecurityCode ..." (golint)
    • Line 157: warning: receiver name challenge should be consistent with previous receiver name c for Challenge (golint)
    • Line 197: warning: exported method Challenge.Process should have comment or be unexported (golint)
    • Line 287: warning: exported method ChallengeError.Process should have comment or be unexported (golint)
    • contacts.go
    • Line 7: warning: exported type Contacts should have comment or be unexported (golint)
    • Line 11: warning: exported type Contact should have comment or be unexported (golint)
    • Line 17: warning: exported type SyncAnswer should have comment or be unexported (golint)
    • Line 38: warning: exported method Contacts.SyncContacts should have comment or be unexported (golint)
    • Line 68: warning: exported method Contacts.UnlinkContacts should have comment or be unexported (golint)
    • igtv.go
    • Line 14: warning: comment on exported type IGTV should be of the form "IGTV ..." (with optional leading article) (golint)
    • Line 150: warning: comment on exported method IGTVChannel.GetNextID should be of the form "GetNextID ..." (golint)
    • Line 237: warning: exported method IGTVChannel.Delete should have comment or be unexported (golint)
    • Line 245: warning: receiver name media should be consistent with previous receiver name igtv for IGTVChannel (golint)
    • Line 330: warning: comment on exported method IGTV.GetNextID should be of the form "GetNextID ..." (golint)
    • timeline.go
    • Line 15: warning: exported var PULLTOREFRESH should have comment or be unexported (golint)
    • Line 337: warning: comment on exported method Timeline.Broadcasts should be of the form "Broadcasts ..." (golint)
    • Line 342: warning: exported method Timeline.GetNextID should have comment or be unexported (golint)

gocyclo87%

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.

    • request.go
    • Line 69: warning: cyclomatic complexity 39 of function (*Instagram).sendRequest() is high (> 15) (gocyclo)
    • timeline.go
    • Line 92: warning: cyclomatic complexity 28 of function (*Timeline).Next() is high (> 15) (gocyclo)
    • goinsta.go
    • Line 503: warning: cyclomatic complexity 22 of function (*Instagram).OpenApp() is high (> 15) (gocyclo)
    • env.go
    • Line 359: warning: cyclomatic complexity 21 of function addOrUpdateAcc() is high (> 15) (gocyclo)
    • uploads.go
    • Line 596: warning: cyclomatic complexity 17 of function (*UploadOptions).createVideoConfig() is high (> 15) (gocyclo)
    • Line 477: warning: cyclomatic complexity 16 of function (*UploadOptions).createRUploadParams() is high (> 15) (gocyclo)
    • utils.go
    • Line 31: warning: cyclomatic complexity 17 of function toString() is high (> 15) (gocyclo)

ineffassign87%

IneffAssign detects ineffectual assignments in Go code.

    • collections.go
    • Line 138: warning: ineffectual assignment to err (ineffassign)
    • Line 247: warning: ineffectual assignment to err (ineffassign)
    • Line 277: warning: ineffectual assignment to err (ineffassign)
    • Line 316: warning: ineffectual assignment to err (ineffassign)
    • Line 355: warning: ineffectual assignment to err (ineffassign)
    • Line 458: warning: ineffectual assignment to err (ineffassign)
    • inbox.go
    • Line 482: warning: ineffectual assignment to err (ineffassign)
    • Line 511: warning: ineffectual assignment to err (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell81%

Misspell Finds commonly misspelled English words

    • users.go
    • Line 285: warning: "arguements" is a misspelling of "arguments" (misspell)
    • Line 709: warning: "extention" is a misspelling of "extension" (misspell)
    • collections.go
    • Line 37: warning: "collcetion" is a misspelling of "collections" (misspell)
    • Line 150: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 484: warning: "occured" is a misspelling of "occurred" (misspell)
    • goinsta.go
    • Line 516: warning: "offical" is a misspelling of "official" (misspell)
    • Line 516: warning: "withing" is a misspelling of "within" (misspell)
    • media.go
    • Line 623: warning: "extentions" is a misspelling of "extensions" (misspell)
    • Line 931: warning: "arguements" is a misspelling of "arguments" (misspell)
    • const.go
    • Line 284: warning: "availible" is a misspelling of "available" (misspell)
    • env.go
    • Line 101: warning: "exisitng" is a misspelling of "existing" (misspell)
    • igtv.go
    • Line 321: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 330: warning: "occured" is a misspelling of "occurred" (misspell)