Preparing report...

Report for github.com/anchore/stereoscope

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


golint50%

Golint is a linter for Go source code.

    • stereoscope/pkg/tree/node/queue.go
    • Line 3: warning: exported type Queue should have comment or be unexported (golint)
    • Line 8: warning: exported method Queue.Size should have comment or be unexported (golint)
    • Line 12: warning: exported method Queue.Enqueue should have comment or be unexported (golint)
    • Line 23: warning: exported method Queue.Dequeue should have comment or be unexported (golint)
    • Line 40: warning: exported method Queue.Reset should have comment or be unexported (golint)
    • stereoscope/pkg/filetree/filenode/filenode.go
    • Line 10: warning: exported type FileNode should have comment or be unexported (golint)
    • Line 17: warning: exported function NewDir should have comment or be unexported (golint)
    • Line 25: warning: exported function NewFile should have comment or be unexported (golint)
    • Line 33: warning: exported function NewSymLink should have comment or be unexported (golint)
    • Line 42: warning: exported function NewHardLink should have comment or be unexported (golint)
    • Line 53: warning: exported method FileNode.ID should have comment or be unexported (golint)
    • Line 57: warning: exported method FileNode.Copy should have comment or be unexported (golint)
    • Line 66: warning: exported method FileNode.IsLink should have comment or be unexported (golint)
    • Line 70: warning: exported function IDByPath should have comment or be unexported (golint)
    • stereoscope/pkg/image/docker/pull_status.go
    • Line 10: warning: exported const UnknownPhase should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported type PullPhase should have comment or be unexported (golint)
    • Line 33: warning: exported type LayerID should have comment or be unexported (golint)
    • Line 46: warning: exported type LayerState should have comment or be unexported (golint)
    • Line 52: warning: exported type PullStatus should have comment or be unexported (golint)
    • Line 69: warning: exported method PullStatus.Complete should have comment or be unexported (golint)
    • Line 73: warning: exported method PullStatus.Layers should have comment or be unexported (golint)
    • Line 80: warning: exported method PullStatus.Current should have comment or be unexported (golint)
    • stereoscope/pkg/file/path.go
    • Line 11: warning: exported const WhiteoutPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported method Path.IsAbsolutePath should have comment or be unexported (golint)
    • Line 93: warning: exported type Paths should have comment or be unexported (golint)
    • stereoscope/pkg/file/type.go
    • Line 6: warning: exported const TypeReg should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported var AllTypes should have comment or be unexported (golint)
    • Line 25: warning: exported type Type should have comment or be unexported (golint)
    • stereoscope/internal/log/log.go
    • Line 5: warning: exported var Log should have comment or be unexported (golint)
    • Line 7: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 11: warning: exported function Error should have comment or be unexported (golint)
    • Line 15: warning: exported function Warn should have comment or be unexported (golint)
    • Line 19: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 23: warning: exported function Infof should have comment or be unexported (golint)
    • Line 27: warning: exported function Info should have comment or be unexported (golint)
    • Line 31: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 35: warning: exported function Debug should have comment or be unexported (golint)
    • stereoscope/pkg/image/image.go
    • Line 35: warning: exported type AdditionalMetadata should have comment or be unexported (golint)
    • Line 37: warning: exported function WithTags should have comment or be unexported (golint)
    • Line 52: warning: exported function WithManifest should have comment or be unexported (golint)
    • Line 60: warning: exported function WithManifestDigest should have comment or be unexported (golint)
    • Line 67: warning: exported function WithConfig should have comment or be unexported (golint)
    • Line 75: warning: exported function WithRepoDigests should have comment or be unexported (golint)
    • Line 97: warning: exported method Image.IDs should have comment or be unexported (golint)
    • Line 242: warning: comment on exported method Image.ResolveLinkByImageSquash should be of the form "ResolveLinkByImageSquash ..." (golint)
    • stereoscope/pkg/image/source.go
    • Line 21: warning: exported const UnknownSource should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported const SchemeSeparator should have comment or be unexported (golint)
    • Line 40: warning: exported var AllSources should have comment or be unexported (golint)
    • stereoscope/internal/stringset.go
    • Line 5: warning: exported type Set should have comment or be unexported (golint)
    • Line 7: warning: exported function NewStringSet should have comment or be unexported (golint)
    • Line 15: warning: exported method Set.Add should have comment or be unexported (golint)
    • Line 19: warning: exported method Set.Remove should have comment or be unexported (golint)
    • Line 23: warning: exported method Set.Contains should have comment or be unexported (golint)
    • stereoscope/pkg/tree/depth_first_walker.go
    • Line 9: warning: exported type NodeVisitor should have comment or be unexported (golint)
    • Line 11: warning: exported type WalkConditions should have comment or be unexported (golint)
    • Line 34: warning: exported function NewDepthFirstWalker should have comment or be unexported (golint)
    • Line 42: warning: exported function NewDepthFirstWalkerWithConditions should have comment or be unexported (golint)
    • Line 51: warning: exported method DepthFirstWalker.Walk should have comment or be unexported (golint)
    • Line 86: warning: exported method DepthFirstWalker.WalkAll should have comment or be unexported (golint)
    • Line 95: warning: exported method DepthFirstWalker.Visited should have comment or be unexported (golint)
    • stereoscope/pkg/file/path_set.go
    • Line 3: warning: exported type PathSet should have comment or be unexported (golint)
    • Line 5: warning: exported function NewPathSet should have comment or be unexported (golint)
    • Line 9: warning: exported method PathSet.Add should have comment or be unexported (golint)
    • Line 13: warning: exported method PathSet.Remove should have comment or be unexported (golint)
    • Line 17: warning: exported method PathSet.Contains should have comment or be unexported (golint)
    • stereoscope/pkg/filetree/filetree.go
    • Line 18: warning: exported var ErrRemovingRoot should have comment or be unexported (golint)
    • Line 19: warning: exported var ErrLinkCycleDetected should have comment or be unexported (golint)
    • Line 66: warning: exported method FileTree.AllRealPaths should have comment or be unexported (golint)
    • Line 77: warning: exported method FileTree.ListPaths should have comment or be unexported (golint)
    • Line 336: warning: comment on exported method FileTree.FilesByGlob should be of the form "FilesByGlob ..." (golint)
    • stereoscope/pkg/imagetest/image_fixtures.go
    • Line 18: warning: exported const CacheDir should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported function PrepareFixtureImage should have comment or be unexported (golint)
    • Line 54: warning: exported function GetFixtureImage should have comment or be unexported (golint)
    • Line 66: warning: exported function GetGoldenFixtureImage should have comment or be unexported (golint)
    • Line 73: warning: exported function UpdateGoldenFixtureImage should have comment or be unexported (golint)
    • Line 122: warning: exported function LoadFixtureImageIntoDocker should have comment or be unexported (golint)
    • Line 169: warning: exported function GetFixtureImageTarPath should have comment or be unexported (golint)
    • stereoscope/pkg/file/temp_dir_generator.go
    • Line 12: warning: exported type TempDirGenerator should have comment or be unexported (golint)
    • Line 17: warning: exported function NewTempDirGenerator should have comment or be unexported (golint)
    • Line 38: warning: exported method TempDirGenerator.Cleanup should have comment or be unexported (golint)
    • stereoscope/pkg/filetree/depth_first_path_walker.go
    • Line 18: warning: exported var ErrMaxTraversalDepth should have comment or be unexported (golint)
    • Line 20: warning: exported type FileNodeVisitor should have comment or be unexported (golint)
    • Line 22: warning: exported type WalkConditions should have comment or be unexported (golint)
    • Line 45: warning: exported function NewDepthFirstPathWalker should have comment or be unexported (golint)
    • Line 57: warning: comment on exported method DepthFirstPathWalker.Walk should be of the form "Walk ..." (golint)
    • Line 118: warning: exported method DepthFirstPathWalker.WalkAll should have comment or be unexported (golint)
    • Line 123: warning: exported method DepthFirstPathWalker.Visited should have comment or be unexported (golint)
    • stereoscope/pkg/filetree/union_filetree.go
    • Line 5: warning: exported type UnionFileTree should have comment or be unexported (golint)
    • Line 9: warning: exported function NewUnionFileTree should have comment or be unexported (golint)
    • Line 15: warning: exported method UnionFileTree.PushTree should have comment or be unexported (golint)
    • Line 19: warning: exported method UnionFileTree.Squash should have comment or be unexported (golint)
    • stereoscope/pkg/file/tar_index_entry.go
    • Line 8: warning: exported type TarIndexEntry should have comment or be unexported (golint)
    • Line 15: warning: exported method TarIndexEntry.ToTarFileEntry should have comment or be unexported (golint)
    • Line 23: warning: exported method TarIndexEntry.Open should have comment or be unexported (golint)
    • stereoscope/pkg/event/parsers/parsers.go
    • Line 14: warning: exported type ErrBadPayload should have comment or be unexported (golint)
    • Line 39: warning: exported function ParsePullDockerImage should have comment or be unexported (golint)
    • Line 57: warning: exported function ParseFetchImage should have comment or be unexported (golint)
    • Line 75: warning: exported function ParseReadImage should have comment or be unexported (golint)
    • Line 93: warning: exported function ParseReadLayer should have comment or be unexported (golint)
    • stereoscope/pkg/tree/node/id.go
    • Line 3: warning: exported type ID should have comment or be unexported (golint)
    • Line 5: warning: exported type Set should have comment or be unexported (golint)
    • Line 7: warning: exported function NewIDSet should have comment or be unexported (golint)
    • Line 11: warning: exported method Set.Add should have comment or be unexported (golint)
    • Line 15: warning: exported method Set.Remove should have comment or be unexported (golint)
    • Line 19: warning: exported method Set.Contains should have comment or be unexported (golint)
    • stereoscope/pkg/tree/node/stack.go
    • Line 3: warning: exported type Stack should have comment or be unexported (golint)
    • Line 5: warning: exported method Stack.Size should have comment or be unexported (golint)
    • Line 9: warning: exported method Stack.Pop should have comment or be unexported (golint)
    • Line 16: warning: exported method Stack.Push should have comment or be unexported (golint)
    • stereoscope/pkg/file/path_stack.go
    • Line 3: warning: exported type PathStack should have comment or be unexported (golint)
    • Line 5: warning: exported method PathStack.Size should have comment or be unexported (golint)
    • Line 9: warning: exported method PathStack.Pop should have comment or be unexported (golint)
    • Line 16: warning: exported method PathStack.Push should have comment or be unexported (golint)
    • stereoscope/client.go
    • Line 18: warning: comment on exported function GetImageFromSource should be of the form "GetImageFromSource ..." (golint)
    • Line 62: warning: exported function SetLogger should have comment or be unexported (golint)
    • Line 66: warning: exported function SetBus should have comment or be unexported (golint)
    • Line 70: warning: exported function Cleanup should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words