Preparing report...

Report for github.com/rubiojr/rapi

A+    Excellent!    Found 89 issues across 340 files

Tweet

gofmt83%

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!


gocyclo92%

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.

    • rapi/internal/restorer/restorer.go
    • Line 52: warning: cyclomatic complexity 23 of function (*Restorer).traverseTree() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 17 of function (*Restorer).RestoreTo() is high (> 15) (gocyclo)
    • rapi/rapi.go
    • Line 332: warning: cyclomatic complexity 31 of function OpenRepository() is high (> 15) (gocyclo)
    • Line 452: warning: cyclomatic complexity 30 of function parseConfig() is high (> 15) (gocyclo)
    • Line 587: warning: cyclomatic complexity 17 of function open() is high (> 15) (gocyclo)
    • rapi/backend/test/tests.go
    • Line 111: warning: cyclomatic complexity 24 of function (*Suite).TestLoad() is high (> 15) (gocyclo)
    • Line 229: warning: cyclomatic complexity 16 of function (*Suite).TestList() is high (> 15) (gocyclo)
    • rapi/internal/ui/backup.go
    • Line 275: warning: cyclomatic complexity 21 of function (*Backup).CompleteItem() is high (> 15) (gocyclo)
    • Line 78: warning: cyclomatic complexity 17 of function (*Backup).Run() is high (> 15) (gocyclo)

golint94%

Golint is a linter for Go source code.

    • rapi/examples/util/util.go
    • Line 10: warning: exported var RepoPath should have comment or be unexported (golint)
    • Line 11: warning: exported var RepoPass should have comment or be unexported (golint)
    • Line 13: warning: exported const MP3SHA256 should have comment or be unexported (golint)
    • Line 15: warning: comment on exported function FindAndOpenKey should be of the form "FindAndOpenKey ..." (golint)
    • Line 23: warning: exported function CheckErr should have comment or be unexported (golint)
    • rapi/restic/rapi.go
    • Line 11: warning: exported method ID.DirectoryPrefix should have comment or be unexported (golint)
    • Line 46: warning: comment on exported method Blob.Decrypt should be of the form "Decrypt ..." (golint)
    • Line 53: warning: comment on exported method Blob.DecryptFromPack should be of the form "DecryptFromPack ..." (golint)
    • rapi/rapi.go
    • Line 85: warning: exported var DefaultOptions should have comment or be unexported (golint)
    • Line 298: warning: exported function ReadRepo should have comment or be unexported (golint)
    • rapi/restic/node.go
    • Line 236: warning: exported method Node.RestoreTimestamps should have comment or be unexported (golint)
    • Line 339: warning: exported method Node.MarshalJSON should have comment or be unexported (golint)
    • Line 354: warning: exported method Node.UnmarshalJSON should have comment or be unexported (golint)
    • Line 367: warning: exported method Node.Equals should have comment or be unexported (golint)
    • rapi/internal/debug/hooks_release.go
    • Line 5: warning: exported function Hook should have comment or be unexported (golint)
    • Line 7: warning: exported function RunHook should have comment or be unexported (golint)
    • Line 9: warning: exported function RemoveHook should have comment or be unexported (golint)
    • rapi/repository/key_rapi.go
    • Line 13: warning: comment on exported function OpenKeyFromFile should be of the form "OpenKeyFromFile ..." (golint)
    • Line 25: warning: comment on exported function Open should be of the form "Open ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words