Preparing report...

Report for github.com/containerd/go-cni

A+    Excellent!    Found 7 issues across 11 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!


gocyclo100%

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.

No problems detected. Good job!


golint36%

Golint is a linter for Go source code.

    • go-cni/namespace_opts.go
    • Line 19: warning: exported type NamespaceOpts should have comment or be unexported (golint)
    • Line 21: warning: comment on exported function WithCapabilityPortMap should be of the form "WithCapabilityPortMap ..." (golint)
    • Line 29: warning: exported function WithCapabilityIPRanges should have comment or be unexported (golint)
    • Line 36: warning: comment on exported function WithCapabilityBandWidth should be of the form "WithCapabilityBandWidth ..." (golint)
    • Line 53: warning: exported function WithCapability should have comment or be unexported (golint)
    • Line 60: warning: comment on exported function WithLabels should be of the form "WithLabels ..." (golint)
    • Line 70: warning: exported function WithArgs should have comment or be unexported (golint)
    • go-cni/result.go
    • Line 27: warning: exported type IPConfig should have comment or be unexported (golint)
    • Line 54: warning: exported type Config should have comment or be unexported (golint)
    • go-cni/types.go
    • Line 20: warning: exported const CNIPluginName should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported type PortMapping should have comment or be unexported (golint)
    • Line 42: warning: exported type IPRanges should have comment or be unexported (golint)
    • go-cni/cni.go
    • Line 30: warning: exported type CNI should have comment or be unexported (golint)
    • Line 43: warning: exported type ConfigResult should have comment or be unexported (golint)
    • Line 51: warning: exported type ConfNetwork should have comment or be unexported (golint)
    • go-cni/deprecated.go
    • Line 21: warning: comment on exported type CNIOpt should be of the form "CNIOpt ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported type CNIResult should be of the form "CNIResult ..." (with optional leading article) (golint)
    • go-cni/errors.go
    • Line 24: warning: exported var ErrCNINotInitialized should have comment or be unexported (golint)
    • go-cni/namespace.go
    • Line 26: warning: exported type Network should have comment or be unexported (golint)
    • Line 32: warning: exported method Network.Attach should have comment or be unexported (golint)
    • Line 40: warning: exported method Network.Remove should have comment or be unexported (golint)
    • Line 44: warning: exported type Namespace should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!