Preparing report...

Report for github.com/oracle/smith

A    Great!    Found 12 issues across 19 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!


golint52%

Golint is a linter for Go source code.

    • smith/execute/execute.go
    • Line 56: warning: exported function Execute should have comment or be unexported (golint)
    • Line 60: warning: exported function AttrExecute should have comment or be unexported (golint)
    • Line 64: warning: exported function EnvExecute should have comment or be unexported (golint)
    • Line 68: warning: exported function TimedExecute should have comment or be unexported (golint)
    • Line 72: warning: exported function ExecuteQuiet should have comment or be unexported (golint)
    • Line 76: warning: exported function AttrExecuteQuiet should have comment or be unexported (golint)
    • Line 80: warning: exported function EnvExecuteQuiet should have comment or be unexported (golint)
    • Line 84: warning: exported function TimedExecuteQuiet should have comment or be unexported (golint)
    • smith/gzip.go
    • Line 20: warning: exported function HasPigz should have comment or be unexported (golint)
    • Line 33: warning: exported type ReadSeekCloser should have comment or be unexported (golint)
    • Line 44: warning: exported function NopCloser should have comment or be unexported (golint)
    • Line 56: warning: exported function DisabledSeeker should have comment or be unexported (golint)
    • Line 60: warning: exported function MaybeGzipReader should have comment or be unexported (golint)
    • Line 80: warning: exported type PigzReader should have comment or be unexported (golint)
    • Line 88: warning: exported function NewPigzReader should have comment or be unexported (golint)
    • Line 120: warning: exported method PigzReader.Close should have comment or be unexported (golint)
    • Line 138: warning: exported type PigzWriter should have comment or be unexported (golint)
    • Line 146: warning: exported function MaybeGzipWriter should have comment or be unexported (golint)
    • Line 162: warning: exported function NewPigzWriter should have comment or be unexported (golint)
    • Line 194: warning: exported method PigzWriter.Close should have comment or be unexported (golint)
    • smith/build.go
    • Line 366: warning: don't use underscores in Go names; var ld_library_path should be ldLibraryPath (golint)
    • smith/config.go
    • Line 10: warning: exported type MockDef should have comment or be unexported (golint)
    • Line 20: warning: exported type ConfigDef should have comment or be unexported (golint)
    • Line 40: warning: exported function ReadConfig should have comment or be unexported (golint)
    • Line 55: warning: exported method ConfigDef.WriteConfig should have comment or be unexported (golint)
    • smith/copy.go
    • Line 12: warning: exported function CopyTree should have comment or be unexported (golint)
    • Line 81: warning: exported function Copy should have comment or be unexported (golint)
    • Line 103: warning: exported function Rchown should have comment or be unexported (golint)
    • smith/deps.go
    • Line 66: warning: exported function FindLibrary should have comment or be unexported (golint)
    • smith/manifest.go
    • Line 34: warning: exported type RPMManifest should have comment or be unexported (golint)
    • Line 42: warning: exported function NewRPMManifest should have comment or be unexported (golint)
    • Line 57: warning: exported method RPMManifest.DebugCandidates should have comment or be unexported (golint)
    • Line 87: warning: exported method RPMManifest.EmitPackages should have comment or be unexported (golint)
    • Line 101: warning: exported method RPMManifest.FindDebugInfo should have comment or be unexported (golint)
    • smith/mock.go
    • Line 15: warning: exported const MOCK should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported function MockBuildDebuginfo should have comment or be unexported (golint)
    • Line 46: warning: exported function MockExecuteQuiet should have comment or be unexported (golint)
    • Line 59: warning: exported function MockCopy should have comment or be unexported (golint)
    • Line 74: warning: exported function MockBuild should have comment or be unexported (golint)
    • smith/pack.go
    • Line 24: warning: don't use underscores in Go names; const c_ISDIR should be cISDIR (golint)
    • Line 25: warning: don't use underscores in Go names; const c_ISREG should be cISREG (golint)
    • Line 26: warning: don't use underscores in Go names; const c_ISLNK should be cISLNK (golint)
    • Line 297: warning: exported type Extractor should have comment or be unexported (golint)
    • Line 351: warning: exported type Layer should have comment or be unexported (golint)
    • Line 366: warning: exported type Image should have comment or be unexported (golint)
    • Line 460: warning: exported function WriteOciFromBuild should have comment or be unexported (golint)
    • Line 475: warning: exported function WriteOciTarGz should have comment or be unexported (golint)
    • Line 675: warning: exported function ExtractOci should have comment or be unexported (golint)

gocyclo68%

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.

    • smith/copy.go
    • Line 155: warning: cyclomatic complexity 27 of function copier() is high (> 15) (gocyclo)
    • Line 12: warning: cyclomatic complexity 16 of function CopyTree() is high (> 15) (gocyclo)
    • smith/remote.go
    • Line 291: warning: cyclomatic complexity 25 of function (*RegistryClient).PutObject() is high (> 15) (gocyclo)
    • Line 394: warning: cyclomatic complexity 16 of function (*RegistryClient).GetObject() is high (> 15) (gocyclo)
    • smith/build.go
    • Line 96: warning: cyclomatic complexity 24 of function buildContainer() is high (> 15) (gocyclo)
    • Line 332: warning: cyclomatic complexity 23 of function buildOci() is high (> 15) (gocyclo)
    • smith/manifest.go
    • Line 157: warning: cyclomatic complexity 19 of function (*RPMManifest).updateData() is high (> 15) (gocyclo)
    • smith/pack.go
    • Line 610: warning: cyclomatic complexity 19 of function extractLayer() is high (> 15) (gocyclo)
    • smith/symlink.go
    • Line 21: warning: cyclomatic complexity 19 of function walkAndCopySymlinks() is high (> 15) (gocyclo)

ineffassign73%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell89%

Misspell Finds commonly misspelled English words