Preparing report...

Report for github.com/Confbase/cfg

A    Great!    Found 36 issues across 61 files

Tweet

gofmt95%

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!


gocyclo81%

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.

    • cfg/ls/ls.go
    • Line 19: warning: cyclomatic complexity 26 of function Ls() is high (> 15) (gocyclo)
    • cfg/init/init.go
    • Line 142: warning: cyclomatic complexity 20 of function mkGitIgnore() is high (> 15) (gocyclo)
    • Line 21: warning: cyclomatic complexity 19 of function Init() is high (> 15) (gocyclo)

golint42%

Golint is a linter for Go source code.

    • cfg/cmdrunner/cmdrunner.go
    • Line 17: warning: exported function RunOrFatal should have comment or be unexported (golint)
    • Line 38: warning: exported function PipeTo should have comment or be unexported (golint)
    • Line 64: warning: exported function PipeThrough should have comment or be unexported (golint)
    • cfg/dotcfg/snapsfile.go
    • Line 12: warning: exported function NewSnaps should have comment or be unexported (golint)
    • Line 19: warning: exported function MustLoadSnaps should have comment or be unexported (golint)
    • Line 36: warning: exported method Snaps.MustSerialize should have comment or be unexported (golint)
    • Line 43: warning: exported method Snaps.Serialize should have comment or be unexported (golint)
    • cfg/init/init.go
    • Line 14: warning: exported function MustInit should have comment or be unexported (golint)
    • Line 21: warning: exported function Init should have comment or be unexported (golint)
    • cfg/dotcfg/schemas.go
    • Line 3: warning: exported type Schemas should have comment or be unexported (golint)
    • Line 7: warning: exported function NewSchemas should have comment or be unexported (golint)
    • cfg/rollback/rollback.go
    • Line 8: warning: exported type Tx should have comment or be unexported (golint)
    • Line 13: warning: exported function NewTx should have comment or be unexported (golint)
    • Line 20: warning: exported method Tx.MustRollback should have comment or be unexported (golint)
    • Line 27: warning: exported method Tx.Rollback should have comment or be unexported (golint)
    • Line 47: warning: exported function MergeTxErr should have comment or be unexported (golint)
    • cfg/snap/remove.go
    • Line 12: warning: exported function Remove should have comment or be unexported (golint)
    • Line 36: warning: should omit 2nd value from range; this loop is equivalent to `for target := range ...` (golint)
    • cfg/lint/lint.go
    • Line 13: warning: exported function MustLint should have comment or be unexported (golint)
    • Line 20: warning: exported function Lint should have comment or be unexported (golint)
    • cfg/dotcfg/keyfile.go
    • Line 14: warning: exported function NewKey should have comment or be unexported (golint)
    • Line 22: warning: exported function MustLoadKey should have comment or be unexported (golint)
    • Line 39: warning: exported method Key.MustSerialize should have comment or be unexported (golint)
    • Line 46: warning: exported method Key.Serialize should have comment or be unexported (golint)
    • cfg/decorate/decorate.go
    • Line 5: warning: exported type Decorator should have comment or be unexported (golint)
    • Line 9: warning: exported function New should have comment or be unexported (golint)
    • Line 13: warning: exported method Decorator.Decorate should have comment or be unexported (golint)
    • Line 20: warning: exported method Decorator.Title should have comment or be unexported (golint)
    • Line 24: warning: exported method Decorator.Red should have comment or be unexported (golint)
    • Line 28: warning: exported method Decorator.Green should have comment or be unexported (golint)
    • Line 32: warning: exported method Decorator.LightBlue should have comment or be unexported (golint)
    • cfg/status/status.go
    • Line 13: warning: exported function MustShowStatus should have comment or be unexported (golint)
    • Line 20: warning: exported function ShowStatus should have comment or be unexported (golint)
    • cfg/remote/remote.go
    • Line 12: warning: exported function Add should have comment or be unexported (golint)
    • Line 46: warning: exported function Remove should have comment or be unexported (golint)
    • Line 78: warning: exported function Ls should have comment or be unexported (golint)
    • Line 90: warning: exported function ExtractTeam should have comment or be unexported (golint)
    • Line 101: warning: exported function ExtractBase should have comment or be unexported (golint)
    • cfg/unmark/unmark.go
    • Line 12: warning: exported function MustUnmark should have comment or be unexported (golint)
    • Line 19: warning: exported function Unmark should have comment or be unexported (golint)
    • cfg/dotcfg/types.go
    • Line 4: warning: exported const DirName should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported type JSONSchema should have comment or be unexported (golint)
    • Line 15: warning: exported type Template should have comment or be unexported (golint)
    • Line 21: warning: comment on exported type File should be of the form "File ..." (with optional leading article) (golint)
    • Line 29: warning: exported type Singleton should have comment or be unexported (golint)
    • Line 34: warning: exported type Instance should have comment or be unexported (golint)
    • Line 40: warning: comment on exported type Key should be of the form "Key ..." (with optional leading article) (golint)
    • Line 47: warning: exported type Snapshot should have comment or be unexported (golint)
    • Line 51: warning: comment on exported type Snaps should be of the form "Snaps ..." (with optional leading article) (golint)
    • cfg/rm/rm.go
    • Line 10: warning: exported function MustRm should have comment or be unexported (golint)
    • Line 17: warning: exported function Rm should have comment or be unexported (golint)
    • cfg/tag/tag.go
    • Line 10: warning: exported function MustTag should have comment or be unexported (golint)
    • Line 17: warning: exported function Tag should have comment or be unexported (golint)
    • cfg/new/new.go
    • Line 16: warning: exported function MustNew should have comment or be unexported (golint)
    • Line 23: warning: exported function New should have comment or be unexported (golint)
    • cfg/commit/commit.go
    • Line 15: warning: exported function MustCommit should have comment or be unexported (golint)
    • Line 22: warning: exported function MustCommitOrRevert should have comment or be unexported (golint)
    • cfg/ls/ls.go
    • Line 19: warning: exported function Ls should have comment or be unexported (golint)
    • Line 85: warning: exported function LsTemplsHuman should have comment or be unexported (golint)
    • Line 110: warning: exported function LsTemplsTty should have comment or be unexported (golint)
    • Line 133: warning: exported function LsInstsHuman should have comment or be unexported (golint)
    • Line 159: warning: exported function LsInstsTty should have comment or be unexported (golint)
    • Line 183: warning: exported function LsSinglesHuman should have comment or be unexported (golint)
    • Line 206: warning: exported function LsSinglesTty should have comment or be unexported (golint)
    • Line 229: warning: exported function LsUntrackedHuman should have comment or be unexported (golint)
    • Line 257: warning: exported function LsUntrackedTty should have comment or be unexported (golint)
    • cfg/dotcfg/cfgfile.go
    • Line 19: warning: exported function NewInstance should have comment or be unexported (golint)
    • Line 26: warning: exported function NewCfg should have comment or be unexported (golint)
    • Line 35: warning: exported function LoadCfg should have comment or be unexported (golint)
    • Line 50: warning: exported function MustLoadCfg should have comment or be unexported (golint)
    • Line 59: warning: exported method File.MustSerialize should have comment or be unexported (golint)
    • Line 68: warning: receiver name cfgFile should be consistent with previous receiver name f for File (golint)
    • Line 162: warning: exported method File.MustStage should have comment or be unexported (golint)
    • Line 162: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 169: warning: exported method File.Stage should have comment or be unexported (golint)
    • Line 169: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 199: warning: exported method File.Commit should have comment or be unexported (golint)
    • Line 199: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 204: warning: exported method File.MustCommit should have comment or be unexported (golint)
    • Line 204: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 211: warning: exported method File.StageSelf should have comment or be unexported (golint)
    • Line 211: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 215: warning: exported method File.MustStageSelf should have comment or be unexported (golint)
    • Line 215: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 222: warning: exported method File.CommitSelf should have comment or be unexported (golint)
    • Line 222: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 226: warning: exported type FileInfo should have comment or be unexported (golint)
    • Line 230: warning: exported type SentinelFileInfo should have comment or be unexported (golint)
    • Line 232: warning: exported method SentinelFileInfo.Name should have comment or be unexported (golint)
    • Line 235: warning: exported method SentinelFileInfo.IsDir should have comment or be unexported (golint)
    • Line 244: warning: exported method File.GetUntrackedFiles should have comment or be unexported (golint)
    • Line 244: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 304: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 346: warning: exported method File.MustRmSchema should have comment or be unexported (golint)
    • Line 346: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 353: warning: exported method File.RmSchema should have comment or be unexported (golint)
    • Line 353: warning: receiver name cfg should be consistent with previous receiver name f for File (golint)
    • Line 391: warning: exported method File.MustWarnDiffs should have comment or be unexported (golint)
    • Line 391: warning: receiver name cfgFile should be consistent with previous receiver name f for File (golint)
    • Line 398: warning: exported method File.WarnDiffs should have comment or be unexported (golint)
    • Line 398: warning: receiver name cfgFile should be consistent with previous receiver name f for File (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words