Preparing report...

Report for github.com/upspin/upspin

A+    Excellent!    Found 93 issues across 269 files

Tweet

gofmt97%

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!


gocyclo78%

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.

    • upspin/dir/server/tree/all_test.go
    • Line 45: warning: cyclomatic complexity 42 of function TestPutNodes() is high (> 15) (gocyclo)
    • Line 351: warning: cyclomatic complexity 25 of function TestRebuildFromLog() is high (> 15) (gocyclo)
    • Line 617: warning: cyclomatic complexity 19 of function TestList() is high (> 15) (gocyclo)
    • Line 693: warning: cyclomatic complexity 19 of function TestPutDirSameTreeNonRoot() is high (> 15) (gocyclo)
    • Line 521: warning: cyclomatic complexity 19 of function TestLinks() is high (> 15) (gocyclo)
    • upspin/dir/server/serverlog/log_test.go
    • Line 828: warning: cyclomatic complexity 23 of function TestVersion0Logs() is high (> 15) (gocyclo)
    • Line 118: warning: cyclomatic complexity 22 of function TestConcurrent() is high (> 15) (gocyclo)
    • Line 512: warning: cyclomatic complexity 20 of function TestIndex() is high (> 15) (gocyclo)
    • Line 738: warning: cyclomatic complexity 17 of function TestOffsetOf() is high (> 15) (gocyclo)
    • upspin/upbox/schema.go
    • Line 469: warning: cyclomatic complexity 38 of function (*Schema).Start() is high (> 15) (gocyclo)
    • Line 261: warning: cyclomatic complexity 25 of function SchemaFromYAML() is high (> 15) (gocyclo)
    • upspin/pack/ee/ee.go
    • Line 487: warning: cyclomatic complexity 22 of function (ee).updateDirEntry() is high (> 15) (gocyclo)
    • Line 382: warning: cyclomatic complexity 18 of function (ee).Share() is high (> 15) (gocyclo)
    • Line 253: warning: cyclomatic complexity 17 of function (ee).Unpack() is high (> 15) (gocyclo)
    • upspin/test/error_test.go
    • Line 793: warning: cyclomatic complexity 27 of function testGlobErrors() is high (> 15) (gocyclo)
    • Line 954: warning: cyclomatic complexity 19 of function testGlobLinkErrors() is high (> 15) (gocyclo)
    • upspin/dir/inprocess/directory.go
    • Line 808: warning: cyclomatic complexity 22 of function (*server).installEntry() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 21 of function (*server).Put() is high (> 15) (gocyclo)
    • Line 323: warning: cyclomatic complexity 18 of function (*server).put() is high (> 15) (gocyclo)
    • upspin/cmd/upspinfs/cache.go
    • Line 289: warning: cyclomatic complexity 17 of function (*cachedFile).download() is high (> 15) (gocyclo)
    • Line 526: warning: cyclomatic complexity 16 of function (*cachedFile).writeback() is high (> 15) (gocyclo)
    • upspin/client/all_test.go
    • Line 361: warning: cyclomatic complexity 33 of function TestFileSeek() is high (> 15) (gocyclo)
    • Line 260: warning: cyclomatic complexity 22 of function TestFileRandomAccess() is high (> 15) (gocyclo)
    • Line 1007: warning: cyclomatic complexity 18 of function TestAllUsers() is high (> 15) (gocyclo)
    • Line 789: warning: cyclomatic complexity 16 of function TestSimpleLinks() is high (> 15) (gocyclo)
    • upspin/test/access_test.go
    • Line 20: warning: cyclomatic complexity 43 of function testReadAccess() is high (> 15) (gocyclo)
    • Line 278: warning: cyclomatic complexity 31 of function testWhichAccess() is high (> 15) (gocyclo)
    • upspin/dir/inprocess/all_test.go
    • Line 813: warning: cyclomatic complexity 23 of function TestLinkToFile() is high (> 15) (gocyclo)
    • Line 746: warning: cyclomatic complexity 17 of function TestWhichAccess() is high (> 15) (gocyclo)
    • Line 279: warning: cyclomatic complexity 16 of function TestCreateDirectoriesAndAFile() is high (> 15) (gocyclo)
    • Line 468: warning: cyclomatic complexity 16 of function TestSequencing() is high (> 15) (gocyclo)
    • upspin/cmd/upspin/share.go
    • Line 111: warning: cyclomatic complexity 25 of function (*State).shareCommand() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 19 of function (*Sharer).readers() is high (> 15) (gocyclo)
    • upspin/cmd/upspinfs/watch.go
    • Line 332: warning: cyclomatic complexity 17 of function (*watchedRoot).handleEvent() is high (> 15) (gocyclo)
    • Line 144: warning: cyclomatic complexity 16 of function (*watchedRoots).refresh() is high (> 15) (gocyclo)

golint86%

Golint is a linter for Go source code.

    • upspin/subcmd/state.go
    • Line 49: warning: exported method State.SetIO should have comment or be unexported (golint)
    • Line 55: warning: exported method State.DefaultIO should have comment or be unexported (golint)
    • upspin/cmd/upspinfs/fs.go
    • Line 488: 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 1029: warning: receiver name link should be consistent with previous receiver name n for node (golint)
    • Line 1146: warning: receiver name fs should be consistent with previous receiver name f for upspinFS (golint)
    • upspin/cmd/upspin/cp.go
    • Line 287: warning: receiver name cs should be consistent with previous receiver name c for copyState (golint)
    • Line 323: warning: receiver name cs should be consistent with previous receiver name c for copyState (golint)
    • upspin/dir/dircache/log.go
    • Line 455: warning: error should be the last type when returning multiple items (golint)
    • Line 494: warning: error should be the last type when returning multiple items (golint)
    • Line 602: warning: error should be the last type when returning multiple items (golint)
    • upspin/dir/inprocess/directory.go
    • Line 29: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 32: warning: exported function New should have comment or be unexported (golint)
    • upspin/subcmd/io.go
    • Line 259: warning: comment on exported method State.GlobOneUpspinPath should be of the form "GlobOneUpspinPath ..." (golint)
    • upspin/access/access_test.go
    • Line 939: warning: don't use underscores in Go names; var list_foo should be listFoo (golint)
    • Line 1007: warning: don't use underscores in Go names; var list_bar should be listBar (golint)
    • Line 1008: warning: don't use underscores in Go names; var list_bar_foo should be listBarFoo (golint)
    • Line 1099: warning: don't use underscores in Go names; var list_abc_foo should be listAbcFoo (golint)
    • Line 1100: warning: don't use underscores in Go names; var list_abc should be listAbc (golint)
    • upspin/cmd/upspin/main.go
    • Line 115: warning: exported type State should have comment or be unexported (golint)
    • Line 248: warning: receiver name s should be consistent with previous receiver name state for State (golint)
    • Line 265: warning: receiver name s should be consistent with previous receiver name state for State (golint)
    • Line 287: warning: receiver name s should be consistent with previous receiver name state for State (golint)
    • Line 323: warning: exported method State.Printf should have comment or be unexported (golint)
    • Line 323: warning: receiver name s should be consistent with previous receiver name state for State (golint)
    • Line 328: warning: receiver name s should be consistent with previous receiver name state for State (golint)
    • Line 355: warning: receiver name s should be consistent with previous receiver name state for State (golint)
    • upspin/cmd/upspinfs/internal/ose/ose.go
    • Line 19: warning: package comment is detached; there should be no blank lines between it and the package statement (golint)
    • Line 36: warning: exported const O_RDONLY should have comment (or a comment on this block) or be unexported (golint)
    • upspin/transports/transports.go
    • Line 18: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 21: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words