Preparing report...

Report for github.com/opencontainers/runtime-tools

(v0.9.0)

A+    Excellent!    Found 21 issues across 115 files

Tweet

gofmt93%

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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo87%

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.

    • cmd/runtimetest/main.go
    • Line 660: warning: cyclomatic complexity 22 of function (*complianceTester).validateDevice() is high (> 15) (gocyclo)
    • Line 1124: warning: cyclomatic complexity 17 of function (*complianceTester).validatePosixMounts() is high (> 15) (gocyclo)
    • Line 536: warning: cyclomatic complexity 16 of function (*complianceTester).validateRootfsPropagation() is high (> 15) (gocyclo)
    • validate/validate.go
    • Line 599: warning: cyclomatic complexity 24 of function (*Validator).CheckLinuxResources() is high (> 15) (gocyclo)
    • Line 171: warning: cyclomatic complexity 20 of function (*Validator).CheckRoot() is high (> 15) (gocyclo)
    • Line 392: warning: cyclomatic complexity 19 of function (*Validator).CheckCapabilities() is high (> 15) (gocyclo)
    • Line 319: warning: cyclomatic complexity 19 of function (*Validator).CheckProcess() is high (> 15) (gocyclo)
    • Line 763: warning: cyclomatic complexity 19 of function checkMandatoryUnit() is high (> 15) (gocyclo)
    • cgroups/cgroups_v1.go
    • Line 35: warning: cyclomatic complexity 42 of function (*CgroupV1).GetBlockIOData() is high (> 15) (gocyclo)
    • Line 210: warning: cyclomatic complexity 27 of function (*CgroupV1).GetCPUData() is high (> 15) (gocyclo)
    • Line 475: warning: cyclomatic complexity 25 of function (*CgroupV1).GetMemoryData() is high (> 15) (gocyclo)
    • Line 570: warning: cyclomatic complexity 16 of function (*CgroupV1).GetNetworkData() is high (> 15) (gocyclo)
    • validation/util/test.go
    • Line 307: warning: cyclomatic complexity 29 of function RuntimeLifecycleValidate() is high (> 15) (gocyclo)
    • Line 180: warning: cyclomatic complexity 20 of function RuntimeInsideValidate() is high (> 15) (gocyclo)
    • generate/generate.go
    • Line 1491: warning: cyclomatic complexity 22 of function (*Generator).RemoveLinuxResourcesDevice() is high (> 15) (gocyclo)
    • Line 1075: warning: cyclomatic complexity 17 of function (*Generator).AddProcessCapability() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words