Preparing report...

Report for github.com/jonhadfield/gosn

A+    Excellent!    Found 5 issues across 13 files

Tweet

gofmt92%

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


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!


golint69%

Golint is a linter for Go source code.

    • gosn/authentication.go
    • Line 254: warning: exported type SignInInput should have comment or be unexported (golint)
    • Line 263: warning: exported type SignInOutput should have comment or be unexported (golint)
    • Line 370: warning: exported type RegisterInput should have comment or be unexported (golint)
    • Line 485: warning: comment on exported function CliSignIn should be of the form "CliSignIn ..." (golint)
    • Line 532: warning: exported method Session.Valid should have comment or be unexported (golint)
    • gosn/filter.go
    • Line 9: warning: exported type ItemFilters should have comment or be unexported (golint)
    • Line 14: warning: exported type Filter should have comment or be unexported (golint)
    • Line 21: warning: exported method Items.Filter should have comment or be unexported (golint)
    • gosn/items.go
    • Line 81: warning: comment on exported function NewComponentContent should be of the form "NewComponentContent ..." (golint)
    • Line 89: warning: comment on exported type ComponentClientStructure should be of the form "ComponentClientStructure ..." (with optional leading article) (golint)
    • Line 105: warning: comment on exported type NoteClientStructure should be of the form "NoteClientStructure ..." (with optional leading article) (golint)
    • Line 192: warning: exported type EncryptedItems should have comment or be unexported (golint)
    • Line 194: warning: exported method EncryptedItems.Decrypt should have comment or be unexported (golint)
    • Line 233: warning: exported method EncryptedItems.DecryptAndParse should have comment or be unexported (golint)
    • Line 319: warning: exported method Items.Validate should have comment or be unexported (golint)
    • Line 355: warning: exported method Items.Encrypt should have comment or be unexported (golint)
    • Line 507: warning: exported type EncryptedItem should have comment or be unexported (golint)
    • Line 517: warning: exported type DecryptedItem should have comment or be unexported (golint)
    • Line 526: warning: exported type DecryptedItems should have comment or be unexported (golint)
    • Line 528: warning: exported type UpdateItemRefsInput should have comment or be unexported (golint)
    • Line 533: warning: exported type UpdateItemRefsOutput should have comment or be unexported (golint)
    • Line 537: warning: exported function UpdateItemRefs should have comment or be unexported (golint)
    • Line 559: warning: exported method NoteContent.SetReferences should have comment or be unexported (golint)
    • Line 562: warning: exported method TagContent.SetReferences should have comment or be unexported (golint)
    • Line 566: warning: exported method TagContent.UpsertReferences should have comment or be unexported (golint)
    • Line 582: warning: exported method NoteContent.UpsertReferences should have comment or be unexported (golint)
    • Line 756: warning: exported type OrgStandardNotesSNDetail should have comment or be unexported (golint)
    • Line 759: warning: exported type AppDataContent should have comment or be unexported (golint)
    • Line 763: warning: exported type NoteContent should have comment or be unexported (golint)
    • Line 770: warning: exported method NoteContent.GetUpdateTime should have comment or be unexported (golint)
    • Line 778: warning: exported method TagContent.GetUpdateTime should have comment or be unexported (golint)
    • Line 786: warning: exported method NoteContent.SetUpdateTime should have comment or be unexported (golint)
    • Line 790: warning: exported method TagContent.SetUpdateTime should have comment or be unexported (golint)
    • Line 794: warning: exported method NoteContent.GetTitle should have comment or be unexported (golint)
    • Line 798: warning: exported method NoteContent.SetTitle should have comment or be unexported (golint)
    • Line 802: warning: exported method TagContent.SetTitle should have comment or be unexported (golint)
    • Line 806: warning: exported method NoteContent.GetText should have comment or be unexported (golint)
    • Line 810: warning: exported method NoteContent.SetText should have comment or be unexported (golint)
    • Line 814: warning: exported method TagContent.GetText should have comment or be unexported (golint)
    • Line 819: warning: exported method TagContent.SetText should have comment or be unexported (golint)
    • Line 823: warning: exported method TagContent.GetName should have comment or be unexported (golint)
    • Line 827: warning: exported method TagContent.GetActive should have comment or be unexported (golint)
    • Line 832: warning: exported method TagContent.TextContains should have comment or be unexported (golint)
    • Line 837: warning: exported method TagContent.GetTitle should have comment or be unexported (golint)
    • Line 841: warning: exported method TagContent.References should have comment or be unexported (golint)
    • Line 846: warning: exported method TagContent.GetAppData should have comment or be unexported (golint)
    • Line 850: warning: exported method NoteContent.GetAppData should have comment or be unexported (golint)
    • Line 854: warning: exported method NoteContent.SetAppData should have comment or be unexported (golint)
    • Line 858: warning: exported method TagContent.SetAppData should have comment or be unexported (golint)
    • Line 862: warning: exported method NoteContent.References should have comment or be unexported (golint)
    • Line 867: warning: exported method NoteContent.GetActive should have comment or be unexported (golint)
    • Line 872: warning: exported method NoteContent.GetName should have comment or be unexported (golint)
    • Line 876: warning: exported method NoteContent.AddItemAssociations should have comment or be unexported (golint)
    • Line 880: warning: exported method TagContent.GetItemAssociations should have comment or be unexported (golint)
    • Line 884: warning: exported method TagContent.GetItemDisassociations should have comment or be unexported (golint)
    • Line 888: warning: exported method NoteContent.GetItemAssociations should have comment or be unexported (golint)
    • Line 892: warning: exported method NoteContent.GetItemDisassociations should have comment or be unexported (golint)
    • Line 896: warning: exported method ComponentContent.GetItemAssociations should have comment or be unexported (golint)
    • Line 900: warning: exported method ComponentContent.GetItemDisassociations should have comment or be unexported (golint)
    • Line 904: warning: exported type TagContent should have comment or be unexported (golint)
    • Line 910: warning: exported type ComponentContent should have comment or be unexported (golint)
    • Line 929: warning: exported method ComponentContent.UpsertReferences should have comment or be unexported (golint)
    • Line 933: warning: exported method ComponentContent.SetReferences should have comment or be unexported (golint)
    • Line 937: warning: exported method NoteContent.AssociateItems should have comment or be unexported (golint)
    • Line 941: warning: exported method TagContent.AssociateItems should have comment or be unexported (golint)
    • Line 945: warning: exported method NoteContent.DisassociateItems should have comment or be unexported (golint)
    • Line 949: warning: exported method TagContent.DisassociateItems should have comment or be unexported (golint)
    • Line 953: warning: exported method ComponentContent.AssociateItems should have comment or be unexported (golint)
    • Line 992: warning: exported method ComponentContent.DisassociateItems should have comment or be unexported (golint)
    • Line 1010: warning: exported method ComponentContent.SetText should have comment or be unexported (golint)
    • Line 1014: warning: exported method ComponentContent.GetText should have comment or be unexported (golint)
    • Line 1018: warning: exported method ComponentContent.GetUpdateTime should have comment or be unexported (golint)
    • Line 1026: warning: exported method ComponentContent.SetUpdateTime should have comment or be unexported (golint)
    • Line 1030: warning: exported method ComponentContent.GetTitle should have comment or be unexported (golint)
    • Line 1034: warning: exported method ComponentContent.GetName should have comment or be unexported (golint)
    • Line 1038: warning: exported method ComponentContent.GetActive should have comment or be unexported (golint)
    • Line 1042: warning: exported method ComponentContent.SetTitle should have comment or be unexported (golint)
    • Line 1045: warning: exported method ComponentContent.GetAppData should have comment or be unexported (golint)
    • Line 1049: warning: exported method ComponentContent.SetAppData should have comment or be unexported (golint)
    • Line 1053: warning: exported method ComponentContent.References should have comment or be unexported (golint)
    • Line 1058: warning: exported type ItemReferences should have comment or be unexported (golint)
    • Line 1060: warning: exported type Items should have comment or be unexported (golint)
    • Line 1062: warning: exported method DecryptedItems.Parse should have comment or be unexported (golint)
    • Line 1136: warning: exported method EncryptedItems.DeDupe should have comment or be unexported (golint)
    • Line 1152: warning: exported method EncryptedItems.RemoveDeleted should have comment or be unexported (golint)
    • Line 1164: warning: exported method Items.DeDupe should have comment or be unexported (golint)
    • Line 1180: warning: exported method Items.RemoveDeleted should have comment or be unexported (golint)
    • Line 1192: warning: exported method DecryptedItems.RemoveDeleted should have comment or be unexported (golint)
    • Line 1204: warning: exported method TagContent.Equals should have comment or be unexported (golint)
    • Line 1209: warning: exported method Item.Equals should have comment or be unexported (golint)
    • Line 1233: warning: exported method NoteContent.Copy should have comment or be unexported (golint)
    • Line 1242: warning: exported method TagContent.Copy should have comment or be unexported (golint)
    • Line 1251: warning: exported method Item.Copy should have comment or be unexported (golint)
    • gosn/session.go
    • Line 22: warning: exported const SNServerURL should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported function GetCredentials should have comment or be unexported (golint)
    • Line 72: warning: comment on exported function Encrypt should be of the form "Encrypt ..." (golint)
    • Line 96: warning: exported function GetSessionFromKeyring should have comment or be unexported (golint)
    • Line 104: warning: exported function AddSession should have comment or be unexported (golint)
    • Line 176: warning: exported function SessionExists should have comment or be unexported (golint)
    • Line 209: warning: exported function MakeSessionString should have comment or be unexported (golint)
    • Line 213: warning: exported function GetSessionFromUser should have comment or be unexported (golint)
    • Line 239: warning: exported function GetSession should have comment or be unexported (golint)
    • Line 297: warning: exported function ParseSessionString should have comment or be unexported (golint)
    • Line 315: warning: comment on exported function Decrypt should be of the form "Decrypt ..." (golint)
    • Line 382: warning: exported function SessionStatus should have comment or be unexported (golint)

gocyclo84%

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.

    • gosn/filter.go
    • Line 483: warning: cyclomatic complexity 31 of function applyComponentFilters() is high (> 15) (gocyclo)
    • Line 396: warning: cyclomatic complexity 26 of function applyTagFilters() is high (> 15) (gocyclo)
    • Line 251: warning: cyclomatic complexity 22 of function applyNoteFilters() is high (> 15) (gocyclo)
    • Line 130: warning: cyclomatic complexity 19 of function applyNoteTagTitleFilter() is high (> 15) (gocyclo)
    • Line 320: warning: cyclomatic complexity 19 of function applyNoteTitleFilter() is high (> 15) (gocyclo)
    • Line 52: warning: cyclomatic complexity 18 of function applyNoteTextFilter() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell92%

Misspell Finds commonly misspelled English words

    • gosn/items_test.go
    • Line 25: warning: "ridiculus" is a misspelling of "ridiculous" (misspell)
    • Line 44: warning: "facilisi" is a misspelling of "facilities" (misspell)
    • Line 51: warning: "ridiculus" is a misspelling of "ridiculous" (misspell)