Preparing report...

Report for github.com/SeeSpotRun/drs

A    Great!    Found 7 issues across 10 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!


gocyclo60%

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.

    • drs/drs/drs.go
    • Line 290: warning: cyclomatic complexity 30 of function (*Disk).scheduler() is high (> 15) (gocyclo)
    • drs/drs/walk.go
    • Line 80: warning: cyclomatic complexity 23 of function (*Path).process() is high (> 15) (gocyclo)
    • drs/sums.go
    • Line 167: warning: cyclomatic complexity 35 of function main() is high (> 15) (gocyclo)
    • drs/match.go
    • Line 304: warning: cyclomatic complexity 23 of function main() is high (> 15) (gocyclo)

golint70%

Golint is a linter for Go source code.

    • drs/drs/drs.go
    • Line 96: warning: exported type DiskConfig should have comment or be unexported (golint)
    • Line 105: warning: exported var HDD should have comment or be unexported (golint)
    • Line 114: warning: exported var Aggressive should have comment or be unexported (golint)
    • Line 123: warning: exported var SSD should have comment or be unexported (golint)
    • Line 150: warning: exported type TokenReturn should have comment or be unexported (golint)
    • Line 152: warning: exported method TokenReturn.Done should have comment or be unexported (golint)
    • Line 253: warning: don't use underscores in Go names; var has_match should be hasMatch (golint)
    • Line 419: warning: exported method File.Close should have comment or be unexported (golint)
    • Line 443: warning: exported const Normal should have comment (or a comment on this block) or be unexported (golint)
    • drs/match.go
    • Line 77: warning: exported method File.Schedule should have comment or be unexported (golint)
    • Line 124: warning: exported type Group should have comment or be unexported (golint)
    • Line 133: warning: exported function NewGroup should have comment or be unexported (golint)
    • Line 152: warning: exported type Grouper should have comment or be unexported (golint)
    • Line 210: warning: exported function NewGrouper should have comment or be unexported (golint)
    • Line 238: warning: exported type Reporter should have comment or be unexported (golint)
    • Line 248: warning: don't use underscores in Go names; func report_unique should be reportUnique (golint)
    • Line 250: warning: don't use underscores in Go names; func report_hashing should be reportHashing (golint)
    • Line 254: warning: don't use underscores in Go names; func report_error should be reportError (golint)
    • Line 261: warning: don't use underscores in Go names; func report_dupes should be reportDupes (golint)
    • Line 274: warning: exported function NewReporter should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign50%

IneffAssign detects ineffectual assignments in Go code.

    • drs/sums.go
    • Line 60: warning: cannot find package "." in: (ineffassign)
    • Line 60: warning: could not import github.com/SeeSpotRun/go-disk-utils/walk (invalid package name: "") (ineffassign)
    • Line 111: warning: job redeclared in this block (ineffassign)
    • Line 167: warning: main redeclared in this block (ineffassign)
    • Line 125: warning: method Go already declared for type job struct{path string; offset uint64; ssd bool} (ineffassign)
    • Line 216: warning: undeclared name: docopt (ineffassign)
    • Line 56: warning: "github.com/docopt/docopt-go" imported but not used (ineffassign)
    • drs/sha1.go
    • Line 80: warning: main redeclared in this block (ineffassign)
    • Line 47: warning: other declaration of job (ineffassign)
    • Line 47: warning: other declaration of job (ineffassign)
    • Line 55: warning: other declaration of Go (ineffassign)
    • Line 55: warning: other declaration of Go (ineffassign)
    • drs/sha1walk.go
    • Line 50: warning: job redeclared in this block (ineffassign)
    • Line 88: warning: main redeclared in this block (ineffassign)
    • Line 57: warning: method Go already declared for type job struct{path string; offset uint64; ssd bool} (ineffassign)
    • Line 70: warning: j.hash undefined (type *job has no field or method hash) (ineffassign)
    • Line 74: warning: j.hash undefined (type *job has no field or method hash) (ineffassign)
    • Line 104: warning: undeclared name: docopt (ineffassign)
    • Line 165: warning: j.hash undefined (type *job has no field or method hash) (ineffassign)
    • Line 38: warning: "github.com/docopt/docopt-go" imported but not used (ineffassign)
    • drs/drs/offset_linux.go
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: could not import github.com/SeeSpotRun/go-fibmap (invalid package name: "") (ineffassign)
    • Line 38: warning: undeclared name: fibmap (ineffassign)
    • Line 28: warning: "github.com/SeeSpotRun/go-fibmap" imported but not used (ineffassign)
    • drs/match.go
    • Line 42: warning: cannot find package "." in: (ineffassign)
    • Line 43: warning: cannot find package "." in: (ineffassign)
    • Line 44: warning: cannot find package "." in: (ineffassign)
    • Line 42: warning: could not import github.com/SeeSpotRun/coerce (invalid package name: "") (ineffassign)
    • Line 43: warning: could not import github.com/SeeSpotRun/drs/drs (invalid package name: "") (ineffassign)
    • Line 44: warning: could not import github.com/docopt/docopt-go (invalid package name: "") (ineffassign)
    • Line 304: warning: other declaration of main (ineffassign)
    • Line 304: warning: other declaration of main (ineffassign)
    • Line 304: warning: other declaration of main (ineffassign)
    • Line 347: warning: undeclared name: docopt (ineffassign)
    • Line 44: warning: "github.com/docopt/docopt-go" imported but not used (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!