Preparing report...

Report for github.com/sahib/brig

A+    Excellent!    Found 31 issues across 285 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.

    • brig/catfs/vcs/mapper.go
    • Line 456: warning: cyclomatic complexity 20 of function (*Mapper).extractGhostDirs() is high (> 15) (gocyclo)
    • Line 284: warning: cyclomatic complexity 18 of function (*Mapper).mapDirectory() is high (> 15) (gocyclo)
    • Line 656: warning: cyclomatic complexity 18 of function (*Mapper).extractLeftovers() is high (> 15) (gocyclo)
    • brig/catfs/core/linker.go
    • Line 531: warning: cyclomatic complexity 20 of function (*Linker).makeCommit() is high (> 15) (gocyclo)
    • Line 702: warning: cyclomatic complexity 18 of function (*Linker).ResolveRef() is high (> 15) (gocyclo)
    • brig/server/vcs_handler.go
    • Line 170: warning: cyclomatic complexity 16 of function (*vcsHandler).History() is high (> 15) (gocyclo)
    • Line 304: warning: cyclomatic complexity 16 of function diffToCapnpDiff() is high (> 15) (gocyclo)
    • brig/catfs/vcs/resolve.go
    • Line 238: warning: cyclomatic complexity 18 of function (*resolver).hasConflicts() is high (> 15) (gocyclo)
    • Line 319: warning: cyclomatic complexity 16 of function (*resolver).decide() is high (> 15) (gocyclo)
    • brig/catfs/vcs/sync.go
    • Line 90: warning: cyclomatic complexity 17 of function (*syncer).add() is high (> 15) (gocyclo)
    • Line 326: warning: cyclomatic complexity 17 of function (*syncer).handleMerge() is high (> 15) (gocyclo)
    • brig/catfs/core/linker_test.go
    • Line 272: warning: cyclomatic complexity 20 of function TestCollideSameObjectHash() is high (> 15) (gocyclo)
    • Line 137: warning: cyclomatic complexity 19 of function TestLinkerNested() is high (> 15) (gocyclo)

golint99%

Golint is a linter for Go source code.

    • brig/catfs/db/database_badger.go
    • Line 147: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 159: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 191: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 223: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 232: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 240: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 271: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 278: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 288: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 305: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 324: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 365: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 382: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 410: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 431: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)
    • Line 439: warning: receiver name db should be consistent with previous receiver name bdb for BadgerDatabase (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!