Preparing report...

Report for github.com/jonhadfield/sn-cli

A    Great!    Found 16 issues across 20 files

Tweet

gofmt85%

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!


gocyclo70%

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.

    • sn-cli/tag.go
    • Line 22: warning: cyclomatic complexity 22 of function tagNotes() is high (> 15) (gocyclo)
    • Line 348: warning: cyclomatic complexity 16 of function addTags() is high (> 15) (gocyclo)
    • sn-cli/note.go
    • Line 147: warning: cyclomatic complexity 16 of function deleteNotes() is high (> 15) (gocyclo)
    • sn-cli/cmd/sncli/tag.go
    • Line 204: warning: cyclomatic complexity 23 of function processGetTags() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 18 of function processEditTag() is high (> 15) (gocyclo)
    • sn-cli/cmd/sncli/note.go
    • Line 171: warning: cyclomatic complexity 21 of function processEditNote() is high (> 15) (gocyclo)
    • Line 298: warning: cyclomatic complexity 20 of function processGetNotes() is high (> 15) (gocyclo)
    • sn-cli/stats.go
    • Line 22: warning: cyclomatic complexity 38 of function (*StatsConfig).Run() is high (> 15) (gocyclo)

golint40%

Golint is a linter for Go source code.

    • sn-cli/stats.go
    • Line 15: warning: exported var Bold should have comment or be unexported (golint)
    • Line 22: warning: exported method StatsConfig.Run should have comment or be unexported (golint)
    • sn-cli/export.go
    • Line 11: warning: exported type ExportConfig should have comment or be unexported (golint)
    • Line 17: warning: exported type ImportConfig should have comment or be unexported (golint)
    • Line 23: warning: exported method ExportConfig.Run should have comment or be unexported (golint)
    • Line 71: warning: exported method ImportConfig.Run should have comment or be unexported (golint)
    • sn-cli/note.go
    • Line 9: warning: exported method AddNoteInput.Run should have comment or be unexported (golint)
    • Line 110: warning: exported method DeleteNoteConfig.Run should have comment or be unexported (golint)
    • Line 116: warning: exported method GetNoteConfig.Run should have comment or be unexported (golint)
    • sn-cli/tag.go
    • Line 145: warning: exported method TagItemsConfig.Run should have comment or be unexported (golint)
    • Line 157: warning: exported method AddTagsInput.Run should have comment or be unexported (golint)
    • Line 208: warning: exported method GetTagConfig.Run should have comment or be unexported (golint)
    • Line 242: warning: exported method DeleteTagConfig.Run should have comment or be unexported (golint)
    • sn-cli/test_data.go
    • Line 160: warning: exported type TestDataCreateNotesConfig should have comment or be unexported (golint)
    • Line 167: warning: exported type TestDataCreateTagsConfig should have comment or be unexported (golint)
    • Line 173: warning: exported method TestDataCreateTagsConfig.Run should have comment or be unexported (golint)
    • Line 177: warning: exported method TestDataCreateNotesConfig.Run should have comment or be unexported (golint)
    • sn-cli/helpers.go
    • Line 11: warning: exported function StringInSlice should have comment or be unexported (golint)
    • Line 61: warning: exported function ItemRefsToYaml should have comment or be unexported (golint)
    • Line 75: warning: exported function ItemRefsToJSON should have comment or be unexported (golint)
    • Line 89: warning: exported function CommaSplit should have comment or be unexported (golint)
    • Line 109: warning: exported function RemoveDeleted should have comment or be unexported (golint)
    • sn-cli/main.go
    • Line 12: warning: exported const SNServerURL should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type ItemReferenceYAML should have comment or be unexported (golint)
    • Line 22: warning: exported type ItemReferenceJSON should have comment or be unexported (golint)
    • Line 27: warning: exported type OrgStandardNotesSNDetailJSON should have comment or be unexported (golint)
    • Line 31: warning: exported type OrgStandardNotesSNDetailYAML should have comment or be unexported (golint)
    • Line 34: warning: exported type AppDataContentYAML should have comment or be unexported (golint)
    • Line 37: warning: exported type AppDataContentJSON should have comment or be unexported (golint)
    • Line 41: warning: exported type TagContentYAML should have comment or be unexported (golint)
    • Line 46: warning: exported type TagContentJSON should have comment or be unexported (golint)
    • Line 51: warning: exported type SettingContentYAML should have comment or be unexported (golint)
    • Line 56: warning: exported type SettingContentJSON should have comment or be unexported (golint)
    • Line 61: warning: exported type NoteContentYAML should have comment or be unexported (golint)
    • Line 67: warning: exported type NoteContentJSON should have comment or be unexported (golint)
    • Line 73: warning: exported type TagJSON should have comment or be unexported (golint)
    • Line 81: warning: exported type TagYAML should have comment or be unexported (golint)
    • Line 89: warning: exported type NoteJSON should have comment or be unexported (golint)
    • Line 97: warning: exported type SettingYAML should have comment or be unexported (golint)
    • Line 105: warning: exported type SettingJSON should have comment or be unexported (golint)
    • Line 113: warning: exported type NoteYAML should have comment or be unexported (golint)
    • Line 121: warning: exported type TagItemsConfig should have comment or be unexported (golint)
    • Line 132: warning: exported type AddTagsInput should have comment or be unexported (golint)
    • Line 138: warning: exported type AddTagsOutput should have comment or be unexported (golint)
    • Line 142: warning: exported type GetTagConfig should have comment or be unexported (golint)
    • Line 149: warning: exported type GetSettingsConfig should have comment or be unexported (golint)
    • Line 156: warning: exported type GetNoteConfig should have comment or be unexported (golint)
    • Line 167: warning: exported type DeleteTagConfig should have comment or be unexported (golint)
    • Line 176: warning: exported type AddNoteInput should have comment or be unexported (golint)
    • Line 185: warning: exported type DeleteNoteConfig should have comment or be unexported (golint)
    • Line 194: warning: exported type WipeConfig should have comment or be unexported (golint)
    • Line 200: warning: exported type StatsConfig should have comment or be unexported (golint)
    • Line 246: warning: exported method WipeConfig.Run should have comment or be unexported (golint)
    • sn-cli/register.go
    • Line 7: warning: exported type RegisterConfig should have comment or be unexported (golint)
    • Line 14: warning: exported method RegisterConfig.Run should have comment or be unexported (golint)
    • sn-cli/settings.go
    • Line 8: warning: exported method GetSettingsConfig.Run should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words

    • sn-cli/test_data.go
    • Line 17: warning: "ridiculus" is a misspelling of "ridiculous" (misspell)
    • Line 36: warning: "facilisi" is a misspelling of "facilities" (misspell)
    • Line 43: warning: "ridiculus" is a misspelling of "ridiculous" (misspell)