Preparing report...

Report for github.com/CodeTeam/davoop

A    Great!    Found 9 issues across 11 files

Tweet

gofmt90%

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!


gocyclo90%

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.

    • davoop/webdav/server.go
    • Line 310: warning: cyclomatic complexity 44 of function (*Server).doPropfind() is high (> 15) (gocyclo)
    • Line 811: warning: cyclomatic complexity 19 of function (*Server).copyResource() is high (> 15) (gocyclo)
    • Line 1044: warning: cyclomatic complexity 18 of function (*Server).doLock() is high (> 15) (gocyclo)

golint18%

Golint is a linter for Go source code.

    • davoop/davoop/file.go
    • Line 9: warning: exported type File should have comment or be unexported (golint)
    • Line 25: warning: exported type HDFSFile should have comment or be unexported (golint)
    • Line 30: warning: exported method HDFSFile.Stat should have comment or be unexported (golint)
    • Line 34: warning: exported method HDFSFile.Readdir should have comment or be unexported (golint)
    • Line 46: warning: exported method HDFSFile.Seek should have comment or be unexported (golint)
    • Line 50: warning: exported method HDFSFile.Close should have comment or be unexported (golint)
    • davoop/davoop/filesystem.go
    • Line 13: warning: exported type HDFSDir should have comment or be unexported (golint)
    • Line 18: warning: exported function NewHDFSDir should have comment or be unexported (golint)
    • Line 25: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 48: warning: exported method HDFSDir.Open should have comment or be unexported (golint)
    • Line 61: warning: exported method HDFSDir.Create should have comment or be unexported (golint)
    • Line 74: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 89: warning: exported method HDFSDir.Remove should have comment or be unexported (golint)
    • davoop/webdav/node.go
    • Line 9: warning: exported type Node should have comment or be unexported (golint)
    • Line 17: warning: exported function NodeFromXmlString should have comment or be unexported (golint)
    • Line 22: warning: exported function NodeFromXml should have comment or be unexported (golint)
    • Line 70: warning: exported method Node.HasChildren should have comment or be unexported (golint)
    • Line 79: warning: exported method Node.GetChildrens should have comment or be unexported (golint)
    • Line 95: warning: exported method Node.FirstChildren should have comment or be unexported (golint)
    • davoop/webdav/server.go
    • Line 22: warning: exported function ExecDir should have comment or be unexported (golint)
    • Line 41: warning: exported function Handler should have comment or be unexported (golint)
    • Line 45: warning: exported type Server should have comment or be unexported (golint)
    • Line 58: warning: don't use underscores in Go names; struct field tokens_to_lock should be tokensToLock (golint)
    • Line 60: warning: don't use underscores in Go names; struct field path_to_token should be pathToToken (golint)
    • Line 69: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 81: warning: exported var PullMethods should have comment or be unexported (golint)
    • Line 100: warning: exported function IsPullMethod should have comment or be unexported (golint)
    • Line 105: warning: exported function IsPushMethod should have comment or be unexported (golint)
    • Line 930: warning: exported method Server.CopyFile should have comment or be unexported (golint)
    • Line 1005: warning: don't use underscores in Go names; method _lock_unlock_create should be _lockUnlockCreate (golint)
    • davoop/webdav/util.go
    • Line 13: warning: exported type Depth should have comment or be unexported (golint)
    • Line 16: warning: exported var NoDepth should have comment or be unexported (golint)
    • Line 22: warning: exported function ParseDepth should have comment or be unexported (golint)
    • Line 26: warning: exported type LockToken should have comment or be unexported (golint)
    • Line 29: warning: exported var NoLockToken should have comment or be unexported (golint)
    • Line 32: warning: exported function GenToken should have comment or be unexported (golint)
    • Line 38: warning: exported function ParseToken should have comment or be unexported (golint)
    • Line 42: warning: exported var IfHdr should have comment or be unexported (golint)
    • Line 44: warning: exported var ListItem should have comment or be unexported (golint)
    • Line 47: warning: exported type TagList should have comment or be unexported (golint)
    • Line 53: warning: exported function IfParser should have comment or be unexported (golint)
    • Line 81: warning: exported type TimeOut should have comment or be unexported (golint)
    • Line 91: warning: comment on exported function ParseTimeOut should be of the form "ParseTimeOut ..." (golint)
    • Line 110: warning: exported function IsOverwrite should have comment or be unexported (golint)
    • davoop/main.go
    • Line 14: warning: exported type Configuration should have comment or be unexported (golint)
    • davoop/webdav/client.go
    • Line 5: warning: exported type FileSystemCloser should have comment or be unexported (golint)
    • Line 10: warning: exported function Dial should have comment or be unexported (golint)
    • davoop/webdav/filesystem.go
    • Line 59: warning: exported method Dir.Open should have comment or be unexported (golint)
    • Line 72: warning: exported method Dir.Create should have comment or be unexported (golint)
    • Line 95: warning: exported method Dir.Remove should have comment or be unexported (golint)
    • davoop/webdav/lock.go
    • Line 10: warning: exported type Lock should have comment or be unexported (golint)
    • Line 22: warning: exported function NewLock should have comment or be unexported (golint)
    • Line 36: warning: comment on exported function ParseLockString should be of the form "ParseLockString ..." (golint)
    • Line 65: warning: exported method Lock.Refresh should have comment or be unexported (golint)
    • Line 69: warning: exported method Lock.IsValid should have comment or be unexported (golint)
    • Line 73: warning: exported method Lock.GetTimeout should have comment or be unexported (golint)
    • Line 77: warning: exported method Lock.SetTimeout should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign63%

IneffAssign detects ineffectual assignments in Go code.

    • davoop/davoop/filesystem.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/codeteam/davoop/webdav (invalid package name: "") (ineffassign)
    • davoop/davoop/file.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/colinmarc/hdfs (invalid package name: "") (ineffassign)
    • davoop/main.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/codeteam/davoop/davoop (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/codeteam/davoop/webdav (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/kelseyhightower/envconfig (invalid package name: "") (ineffassign)

misspell90%

Misspell Finds commonly misspelled English words