Preparing report...

Report for github.com/prologic/box

A+    Excellent!    Found 22 issues across 52 files

Tweet

gofmt94%

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!


gocyclo96%

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.


golint63%

Golint is a linter for Go source code.

    • box/cmd/root.go
    • Line 17: warning: exported var ErrNotPermitted should have comment or be unexported (golint)
    • box/container/container.go
    • Line 20: warning: exported const DigestStdLen should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported type Container should have comment or be unexported (golint)
    • Line 40: warning: comment on exported function NewContainer should be of the form "NewContainer ..." (golint)
    • box/internal/rmi.go
    • Line 31: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • box/image/download.go
    • Line 13: warning: exported type Repository should have comment or be unexported (golint)
    • Line 14: warning: exported type Repositories should have comment or be unexported (golint)
    • box/nat/iptables.go
    • Line 17: warning: exported var Iptables should have comment or be unexported (golint)
    • Line 19: warning: exported type Unmapper should have comment or be unexported (golint)
    • Line 21: warning: exported function SetPortmap should have comment or be unexported (golint)
    • Line 39: warning: exported function UnsetPortmap should have comment or be unexported (golint)
    • box/filesystem/mount.go
    • Line 12: warning: exported type MountOption should have comment or be unexported (golint)
    • Line 20: warning: exported type Unmounter should have comment or be unexported (golint)
    • box/container/network.go
    • Line 32: warning: exported method Container.SetupNetwork should have comment or be unexported (golint)
    • Line 89: warning: exported method Container.SetNetworkNamespace should have comment or be unexported (golint)
    • Line 94: warning: exported method Container.GetIP should have comment or be unexported (golint)
    • box/container/portmap.go
    • Line 11: warning: exported method Container.SetPorts should have comment or be unexported (golint)
    • Line 18: warning: exported method Container.SetupPortmap should have comment or be unexported (golint)
    • box/network/ipam.go
    • Line 5: warning: package comment should be of the form "Package network ..." (golint)
    • Line 41: warning: comment on exported function NewIPAM should be of the form "NewIPAM ..." (golint)
    • Line 80: warning: exported method IPAM.MarshalJSON should have comment or be unexported (golint)
    • Line 96: warning: exported method IPAM.UnmarshalJSON should have comment or be unexported (golint)
    • box/network/netns.go
    • Line 13: warning: exported type Unsetter should have comment or be unexported (golint)
    • Line 14: warning: exported type Releaser should have comment or be unexported (golint)
    • Line 16: warning: exported function MountNewNetworkNamespace should have comment or be unexported (golint)
    • Line 51: warning: exported function SetNetNSByFile should have comment or be unexported (golint)
    • Line 72: warning: exported function LinkSetNsByFile should have comment or be unexported (golint)
    • box/network/network.go
    • Line 10: warning: exported function SetupBridge should have comment or be unexported (golint)
    • Line 45: warning: exported function SetupVirtualEthernet should have comment or be unexported (golint)
    • Line 58: warning: exported function LinkSetMaster should have comment or be unexported (golint)
    • Line 73: warning: exported function LinkAddGateway should have comment or be unexported (golint)
    • Line 87: warning: exported function LinkAddAddr should have comment or be unexported (golint)
    • Line 99: warning: exported function LinkSetup should have comment or be unexported (golint)
    • Line 107: warning: exported function LinkRename should have comment or be unexported (golint)
    • Line 115: warning: exported function IPExists should have comment or be unexported (golint)
    • box/image/image.go
    • Line 16: warning: exported const RepoFile should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type Image should have comment or be unexported (golint)
    • Line 83: warning: exported function GetAll should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!