Preparing report...

Report for github.com/projectatomic/buildah

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

    • buildah/chroot/run.go
    • Line 1019: warning: cyclomatic complexity 117 of function setupChrootBindMounts() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 72 of function runUsingChrootMain() is high (> 15) (gocyclo)
    • Line 636: warning: cyclomatic complexity 36 of function runUsingChrootExecMain() is high (> 15) (gocyclo)
    • Line 509: warning: cyclomatic complexity 25 of function runUsingChroot() is high (> 15) (gocyclo)
    • Line 820: warning: cyclomatic complexity 19 of function logNamespaceDiagnostics() is high (> 15) (gocyclo)
    • Line 90: warning: cyclomatic complexity 17 of function RunUsingChroot() is high (> 15) (gocyclo)
    • buildah/pkg/blobcache/blobcache.go
    • Line 283: warning: cyclomatic complexity 20 of function (*blobCacheSource).LayerInfosForCopy() is high (> 15) (gocyclo)
    • Line 444: warning: cyclomatic complexity 16 of function (*blobCacheDestination).PutBlob() is high (> 15) (gocyclo)
    • buildah/pkg/parse/parse.go
    • Line 579: warning: cyclomatic complexity 34 of function SystemContextFromOptions() is high (> 15) (gocyclo)
    • Line 759: warning: cyclomatic complexity 31 of function IDMappingOptions() is high (> 15) (gocyclo)
    • Line 48: warning: cyclomatic complexity 23 of function CommonBuildOptions() is high (> 15) (gocyclo)
    • Line 491: warning: cyclomatic complexity 20 of function ValidateVolumeOpts() is high (> 15) (gocyclo)
    • Line 332: warning: cyclomatic complexity 19 of function GetBindMount() is high (> 15) (gocyclo)
    • buildah/copier/copier.go
    • Line 1454: warning: cyclomatic complexity 112 of function copierHandlerPut() is high (> 15) (gocyclo)
    • Line 1104: warning: cyclomatic complexity 49 of function copierHandlerGet() is high (> 15) (gocyclo)
    • Line 1318: warning: cyclomatic complexity 36 of function copierHandlerGetOne() is high (> 15) (gocyclo)
    • Line 573: warning: cyclomatic complexity 26 of function copierWithSubprocess() is high (> 15) (gocyclo)
    • Line 704: warning: cyclomatic complexity 24 of function copierMain() is high (> 15) (gocyclo)
    • Line 979: warning: cyclomatic complexity 23 of function copierHandlerStat() is high (> 15) (gocyclo)
    • buildah/copier/copier_test.go
    • Line 421: warning: cyclomatic complexity 29 of function testPut() is high (> 15) (gocyclo)
    • Line 692: warning: cyclomatic complexity 26 of function testGetSingle() is high (> 15) (gocyclo)
    • Line 604: warning: cyclomatic complexity 17 of function testStat() is high (> 15) (gocyclo)
    • buildah/bind/mount.go
    • Line 25: warning: cyclomatic complexity 35 of function SetupIntermediateMountNamespace() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 23 of function UnmountMountpoints() is high (> 15) (gocyclo)
    • buildah/tests/conformance/conformance_test.go
    • Line 331: warning: cyclomatic complexity 41 of function testConformanceInternalBuild() is high (> 15) (gocyclo)
    • Line 158: warning: cyclomatic complexity 31 of function testConformanceInternal() is high (> 15) (gocyclo)
    • Line 1031: warning: cyclomatic complexity 25 of function compareJSON() is high (> 15) (gocyclo)
    • Line 874: warning: cyclomatic complexity 17 of function applyLayerToFSTree() is high (> 15) (gocyclo)

golint87%

Golint is a linter for Go source code.

    • buildah/pkg/cli/common.go
    • Line 89: warning: comment on exported type FromAndBudResults should be of the form "FromAndBudResults ..." (with optional leading article) (golint)
    • Line 390: warning: exported function VerifyFlagsArgsOrder should have comment or be unexported (golint)
    • Line 399: warning: comment on exported function AliasFlags should be of the form "AliasFlags ..." (golint)
    • buildah/util/util_unix.go
    • Line 15: warning: exported type HardlinkChecker should have comment or be unexported (golint)
    • Line 19: warning: exported method HardlinkChecker.Check should have comment or be unexported (golint)
    • Line 27: warning: exported method HardlinkChecker.Add should have comment or be unexported (golint)
    • Line 33: warning: exported function UID should have comment or be unexported (golint)
    • Line 37: warning: exported function GID should have comment or be unexported (golint)
    • buildah/docker/types.go
    • Line 14: warning: comment on exported const TypeLayers should be of the form "TypeLayers ..." (golint)
    • Line 17: warning: comment on exported const V2S2MediaTypeUncompressedLayer should be of the form "V2S2MediaTypeUncompressedLayer ..." (golint)
    • Line 20: warning: comment on exported type V2S2RootFS should be of the form "V2S2RootFS ..." (with optional leading article) (golint)
    • Line 29: warning: comment on exported type V2S2History should be of the form "V2S2History ..." (with optional leading article) (golint)
    • Line 46: warning: comment on exported type ID should be of the form "ID ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported type HealthConfig should be of the form "HealthConfig ..." (with optional leading article) (golint)
    • Line 72: warning: comment on exported type PortSet should be of the form "PortSet ..." (with optional leading article) (golint)
    • Line 76: warning: comment on exported type Port should be of the form "Port ..." (with optional leading article) (golint)
    • Line 80: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 115: warning: comment on exported type V1Compatibility should be of the form "V1Compatibility ..." (with optional leading article) (golint)
    • Line 131: warning: comment on exported type V1Image should be of the form "V1Image ..." (with optional leading article) (golint)
    • Line 160: warning: comment on exported type V2Image should be of the form "V2Image ..." (with optional leading article) (golint)
    • Line 171: warning: comment on exported type V2Versioned should be of the form "V2Versioned ..." (with optional leading article) (golint)
    • Line 183: warning: comment on exported type V2S1FSLayer should be of the form "V2S1FSLayer ..." (with optional leading article) (golint)
    • Line 190: warning: comment on exported type V2S1History should be of the form "V2S1History ..." (with optional leading article) (golint)
    • Line 197: warning: comment on exported type V2S1Manifest should be of the form "V2S1Manifest ..." (with optional leading article) (golint)
    • Line 220: warning: comment on exported type V2S2Descriptor should be of the form "V2S2Descriptor ..." (with optional leading article) (golint)
    • Line 245: warning: comment on exported type V2S2Manifest should be of the form "V2S2Manifest ..." (with optional leading article) (golint)
    • buildah/pkg/umask/umask.go
    • Line 7: warning: exported function CheckUmask should have comment or be unexported (golint)
    • Line 11: warning: exported function SetUmask should have comment or be unexported (golint)
    • buildah/define/types.go
    • Line 36: warning: exported const DefaultCNIPluginPath should have comment (or a comment on this block) or be unexported (golint)
    • Line 79: warning: exported var Gzip should have comment or be unexported (golint)
    • buildah/util/util.go
    • Line 184: warning: comment on exported function ResolveNameToReferences should be of the form "ResolveNameToReferences ..." (golint)
    • Line 481: warning: exported function SortMounts should have comment or be unexported (golint)
    • Line 486: warning: exported function VerifyTagName should have comment or be unexported (golint)
    • buildah/imagebuildah/build.go
    • Line 29: warning: exported const PullIfMissing should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: exported type BuildOptions 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!