Preparing report...

Report for github.com/knoxite/knoxite

A+    Excellent!    Found 22 issues across 87 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!


gocyclo91%

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.

    • knoxite/verify_test.go
    • Line 65: warning: cyclomatic complexity 21 of function TestVerifyRepo() is high (> 15) (gocyclo)
    • Line 176: warning: cyclomatic complexity 21 of function TestVerifyVolume() is high (> 15) (gocyclo)
    • Line 290: warning: cyclomatic complexity 21 of function TestVerifySnapshot() is high (> 15) (gocyclo)

golint82%

Golint is a linter for Go source code.

    • knoxite/cmd/knoxite/config/membackend.go
    • Line 1: warning: package comment should be of the form "Package config ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 23: warning: exported method MemBackend.Type should have comment or be unexported (golint)
    • knoxite/storage/sftp/sftp.go
    • Line 27: warning: exported type SFTPStorage should have comment or be unexported (golint)
    • Line 38: warning: exported method SFTPStorage.NewBackend should have comment or be unexported (golint)
    • Line 52: warning: don't use underscores in Go names; var agent_conn should be agentConn (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 100: warning: exported method SFTPStorage.Protocols should have comment or be unexported (golint)
    • Line 104: warning: exported method SFTPStorage.AvailableSpace should have comment or be unexported (golint)
    • Line 113: warning: exported method SFTPStorage.Close should have comment or be unexported (golint)
    • Line 117: warning: exported method SFTPStorage.Description should have comment or be unexported (golint)
    • Line 121: warning: exported method SFTPStorage.Location should have comment or be unexported (golint)
    • Line 125: warning: exported method SFTPStorage.CreatePath should have comment or be unexported (golint)
    • Line 129: warning: exported method SFTPStorage.DeleteFile should have comment or be unexported (golint)
    • Line 133: warning: exported method SFTPStorage.DeletePath should have comment or be unexported (golint)
    • Line 158: warning: exported method SFTPStorage.ReadFile should have comment or be unexported (golint)
    • Line 168: warning: exported method SFTPStorage.WriteFile should have comment or be unexported (golint)
    • Line 179: warning: exported method SFTPStorage.Stat should have comment or be unexported (golint)
    • knoxite/cmd/knoxite/utils/utils.go
    • Line 27: warning: exported var ErrPasswordMismatch should have comment or be unexported (golint)
    • Line 32: warning: exported function ReadPassword should have comment or be unexported (golint)
    • Line 48: warning: exported function ReadPasswordTwice should have comment or be unexported (golint)
    • Line 161: warning: exported function PathToUrl should have comment or be unexported (golint)
    • knoxite/cmd/knoxite/config/aesbackend.go
    • Line 1: warning: package comment should be of the form "Package config ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 80: warning: exported method AESBackend.Type should have comment or be unexported (golint)
    • knoxite/verbosity.go
    • Line 11: warning: exported type Verbosity should have comment or be unexported (golint)
    • Line 14: warning: exported const LogLevelFatal should have comment (or a comment on this block) or be unexported (golint)
    • knoxite/verify.go
    • Line 15: warning: exported function VerifyRepo should have comment or be unexported (golint)
    • Line 75: warning: exported function VerifyVolume should have comment or be unexported (golint)
    • Line 138: warning: exported function VerifySnapshot should have comment or be unexported (golint)
    • Line 187: warning: exported function VerifyArchive should have comment or be unexported (golint)
    • knoxite/cmd/knoxite/config/config.go
    • Line 1: warning: package comment should be of the form "Package config ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 42: warning: exported type Config should have comment or be unexported (golint)
    • Line 58: warning: exported method Config.Save should have comment or be unexported (golint)
    • knoxite/logger.go
    • Line 17: warning: exported type Logger should have comment or be unexported (golint)
    • Line 22: warning: exported function NewLogger should have comment or be unexported (golint)
    • Line 29: warning: exported method Logger.WithWriter should have comment or be unexported (golint)
    • Line 34: warning: exported method Logger.Warn should have comment or be unexported (golint)
    • Line 38: warning: exported method Logger.Warnf should have comment or be unexported (golint)
    • Line 42: warning: exported method Logger.Info should have comment or be unexported (golint)
    • Line 46: warning: exported method Logger.Infof should have comment or be unexported (golint)
    • Line 50: warning: exported method Logger.Debug should have comment or be unexported (golint)
    • Line 54: warning: exported method Logger.Debugf should have comment or be unexported (golint)
    • Line 58: warning: exported method Logger.Fatal should have comment or be unexported (golint)
    • Line 63: warning: exported method Logger.Fatalf should have comment or be unexported (golint)
    • knoxite/repository.go
    • Line 228: warning: comment on exported method Repository.ChangePassword should be of the form "ChangePassword ..." (golint)
    • Line 235: warning: comment on exported method Repository.Migrate should be of the form "Migrate ..." (golint)
    • knoxite/storage/mega/mega.go
    • Line 180: warning: don't use underscores in Go names; var chk_start should be chkStart (golint)
    • Line 180: warning: don't use underscores in Go names; var chk_size should be chkSize (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell97%

Misspell Finds commonly misspelled English words

    • knoxite/verify_test.go
    • Line 170: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 284: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 397: warning: "occured" is a misspelling of "occurred" (misspell)