Preparing report...

Report for github.com/mandelsoft/vfs

(v0.0.0-20220211163734-cf8ce9a309d5)

A+    Excellent!    Found 35 issues across 61 files

Tweet

gofmt96%

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!


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.


golint49%

Golint is a linter for Go source code.

    • pkg/yamlfs/yamlfs.go
    • Line 33: warning: exported type YamlFileSystem should have comment or be unexported (golint)
    • Line 38: warning: exported function New should have comment or be unexported (golint)
    • Line 47: warning: exported function NewByPath should have comment or be unexported (golint)
    • Line 62: warning: exported function NewByData should have comment or be unexported (golint)
    • Line 70: warning: exported method YamlFileSystem.Data should have comment or be unexported (golint)
    • pkg/composefs/compose.go
    • Line 30: warning: exported type ComposedFileSystem should have comment or be unexported (golint)
    • Line 62: warning: exported function New should have comment or be unexported (golint)
    • Line 77: warning: exported method ComposedFileSystem.Cleanup should have comment or be unexported (golint)
    • Line 88: warning: exported method ComposedFileSystem.Name should have comment or be unexported (golint)
    • Line 92: warning: exported method ComposedFileSystem.FSTempDir should have comment or be unexported (golint)
    • Line 96: warning: exported method ComposedFileSystem.MountTempDir should have comment or be unexported (golint)
    • Line 113: warning: exported method ComposedFileSystem.MountTempFileSysten should have comment or be unexported (golint)
    • Line 126: warning: exported method ComposedFileSystem.Mount should have comment or be unexported (golint)
    • cmd/vfs/main.go
    • Line 33: warning: exported function Error should have comment or be unexported (golint)
    • Line 38: warning: exported function Assert should have comment or be unexported (golint)
    • pkg/layerfs/filedata.go
    • Line 29: warning: don't use underscores in Go names; const opaque_del should be opaqueDel (golint)
    • Line 30: warning: don't use underscores in Go names; const del_prefix should be delPrefix (golint)
    • pkg/layerfs/layer.go
    • Line 33: warning: exported type LayerFileSystem should have comment or be unexported (golint)
    • Line 39: warning: exported function New should have comment or be unexported (golint)
    • Line 44: warning: exported method LayerFileSystem.Name should have comment or be unexported (golint)
    • Line 157: warning: exported method LayerFileSystem.Create should have comment or be unexported (golint)
    • Line 161: warning: exported method LayerFileSystem.Mkdir should have comment or be unexported (golint)
    • Line 179: warning: exported method LayerFileSystem.MkdirAll should have comment or be unexported (golint)
    • Line 194: warning: exported method LayerFileSystem.Open should have comment or be unexported (golint)
    • Line 209: warning: exported method LayerFileSystem.OpenFile should have comment or be unexported (golint)
    • Line 261: warning: exported method LayerFileSystem.Remove should have comment or be unexported (golint)
    • Line 321: warning: exported method LayerFileSystem.RemoveAll should have comment or be unexported (golint)
    • Line 351: warning: exported method LayerFileSystem.Rename should have comment or be unexported (golint)
    • Line 374: warning: exported method LayerFileSystem.Lstat should have comment or be unexported (golint)
    • Line 382: warning: exported method LayerFileSystem.Stat should have comment or be unexported (golint)
    • Line 393: warning: exported method LayerFileSystem.Chmod should have comment or be unexported (golint)
    • Line 415: warning: exported method LayerFileSystem.Chtimes should have comment or be unexported (golint)
    • Line 439: warning: exported method LayerFileSystem.Symlink should have comment or be unexported (golint)
    • Line 446: warning: exported method LayerFileSystem.Readlink should have comment or be unexported (golint)
    • pkg/utils/file.go
    • Line 32: warning: exported type FileData should have comment or be unexported (golint)
    • Line 45: warning: exported type File should have comment or be unexported (golint)
    • Line 61: warning: exported method File.Open should have comment or be unexported (golint)
    • Line 70: warning: exported method File.Close should have comment or be unexported (golint)
    • Line 77: warning: exported method File.Name should have comment or be unexported (golint)
    • Line 81: warning: exported method File.Stat should have comment or be unexported (golint)
    • Line 85: warning: exported method File.Sync should have comment or be unexported (golint)
    • Line 89: warning: exported method File.Readdir should have comment or be unexported (golint)
    • Line 122: warning: exported method File.Readdirnames should have comment or be unexported (golint)
    • Line 158: warning: exported method File.ReadAt should have comment or be unexported (golint)
    • Line 164: warning: exported method File.Truncate should have comment or be unexported (golint)
    • Line 187: warning: exported method File.Seek should have comment or be unexported (golint)
    • Line 237: warning: exported method File.WriteAt should have comment or be unexported (golint)
    • Line 243: warning: exported method File.WriteString should have comment or be unexported (golint)
    • Line 248: warning: exported var ErrNotDir should have comment or be unexported (golint)
    • cmd/yamlfs/main.go
    • Line 33: warning: exported type Config should have comment or be unexported (golint)
    • Line 40: warning: exported function ExitOnError should have comment or be unexported (golint)
    • pkg/utils/eval.go
    • Line 25: warning: exported type FileDataDirAccess should have comment or be unexported (golint)
    • Line 34: warning: exported function EvaluatePath should have comment or be unexported (golint)
    • pkg/vfs/errors.go
    • Line 27: warning: exported type ErrorMatcher should have comment or be unexported (golint)
    • Line 29: warning: exported function MatchErr should have comment or be unexported (golint)
    • Line 51: warning: exported function IsErrNotDir should have comment or be unexported (golint)
    • Line 55: warning: exported function IsErrNotExist should have comment or be unexported (golint)
    • Line 62: warning: exported function IsErrExist should have comment or be unexported (golint)
    • Line 69: warning: exported function IsErrReadOnly should have comment or be unexported (golint)
    • Line 73: warning: exported function NewPathError should have comment or be unexported (golint)
    • Line 77: warning: exported var ErrNotDir should have comment or be unexported (golint)
    • Line 78: warning: exported var ErrNotExist should have comment or be unexported (golint)
    • Line 79: warning: exported var ErrExist should have comment or be unexported (golint)
    • Line 81: warning: exported var ErrReadOnly should have comment or be unexported (golint)
    • Line 82: warning: exported var ErrNotEmpty should have comment or be unexported (golint)
    • pkg/utils/base.go
    • Line 25: warning: exported type FileSystemBase should have comment or be unexported (golint)
    • Line 27: warning: exported method FileSystemBase.VolumeName should have comment or be unexported (golint)
    • Line 31: warning: exported method FileSystemBase.FSTempDir should have comment or be unexported (golint)
    • Line 35: warning: exported method FileSystemBase.Normalize should have comment or be unexported (golint)
    • Line 39: warning: exported method FileSystemBase.Getwd should have comment or be unexported (golint)
    • Line 43: warning: exported method FileSystemBase.Cleanup should have comment or be unexported (golint)
    • pkg/yamlfs/filedata.go
    • Line 49: warning: exported var UseStandardYAMLBinary should have comment or be unexported (golint)
    • Line 60: warning: exported type DataMarshaller should have comment or be unexported (golint)
    • Line 317: warning: exported const BinaryStartMarker should have comment or be unexported (golint)
    • Line 318: warning: exported const BinaryEndMarker should have comment or be unexported (golint)
    • Line 320: warning: exported function ToBinary should have comment or be unexported (golint)
    • Line 357: warning: exported function FromBinary should have comment or be unexported (golint)
    • pkg/test/standard.go
    • Line 1: warning: package comment should be of the form "Package test ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: should not use dot imports (golint)
    • Line 25: warning: should not use dot imports (golint)
    • Line 30: warning: exported function StandardTest should have comment or be unexported (golint)
    • pkg/utils/fssupport.go
    • Line 30: warning: exported type SupportAdapter should have comment or be unexported (golint)
    • Line 36: warning: exported type FileSystemSupport should have comment or be unexported (golint)
    • Line 43: warning: exported function NewFSSupport should have comment or be unexported (golint)
    • Line 47: warning: exported method FileSystemSupport.Name should have comment or be unexported (golint)
    • Line 74: warning: exported method FileSystemSupport.Create should have comment or be unexported (golint)
    • Line 93: warning: exported method FileSystemSupport.Mkdir should have comment or be unexported (golint)
    • Line 106: warning: exported method FileSystemSupport.MkdirAll should have comment or be unexported (golint)
    • Line 130: warning: exported method FileSystemSupport.Open should have comment or be unexported (golint)
    • Line 138: warning: exported method FileSystemSupport.OpenFile should have comment or be unexported (golint)
    • Line 186: warning: exported method FileSystemSupport.Remove should have comment or be unexported (golint)
    • Line 210: warning: exported method FileSystemSupport.RemoveAll should have comment or be unexported (golint)
    • Line 223: warning: exported method FileSystemSupport.Rename should have comment or be unexported (golint)
    • Line 253: warning: exported method FileSystemSupport.Lstat should have comment or be unexported (golint)
    • Line 261: warning: exported method FileSystemSupport.Stat should have comment or be unexported (golint)
    • Line 272: warning: exported method FileSystemSupport.Chmod should have comment or be unexported (golint)
    • Line 283: warning: exported method FileSystemSupport.Chtimes should have comment or be unexported (golint)
    • Line 294: warning: exported method FileSystemSupport.Symlink should have comment or be unexported (golint)
    • Line 304: warning: exported method FileSystemSupport.Readlink should have comment or be unexported (golint)
    • pkg/utils/utils.go
    • Line 25: warning: exported type RenamedFile should have comment or be unexported (golint)
    • Line 30: warning: exported function NewRenamedFile should have comment or be unexported (golint)
    • Line 34: warning: exported method RenamedFile.Name should have comment or be unexported (golint)
    • pkg/vfs/interface.go
    • Line 27: warning: exported const PathSeparatorChar should have comment or be unexported (golint)
    • Line 28: warning: exported const PathSeparatorString should have comment or be unexported (golint)
    • Line 30: warning: exported type FileMode should have comment or be unexported (golint)
    • Line 32: warning: exported const ModePerm should have comment or be unexported (golint)
    • Line 58: warning: exported type FileSystem should have comment or be unexported (golint)
    • Line 132: warning: exported type FileSystemWithWorkingDirectory should have comment or be unexported (golint)
    • Line 137: warning: exported type FileSystemCleanup should have comment or be unexported (golint)
    • Line 145: warning: exported type File should have comment or be unexported (golint)
    • Line 164: warning: exported type VFS should have comment or be unexported (golint)
    • Line 195: warning: exported function Cleanup should have comment or be unexported (golint)
    • pkg/projectionfs/projectionfs.go
    • Line 28: warning: exported type ProjectionFileSystem should have comment or be unexported (golint)
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • Line 51: warning: exported method ProjectionFileSystem.Name should have comment or be unexported (golint)
    • pkg/memoryfs/dir.go
    • Line 27: warning: exported type DirectoryEntries should have comment or be unexported (golint)
    • Line 29: warning: exported method DirectoryEntries.Len should have comment or be unexported (golint)
    • Line 30: warning: exported method DirectoryEntries.Add should have comment or be unexported (golint)
    • Line 31: warning: exported method DirectoryEntries.Remove should have comment or be unexported (golint)
    • Line 32: warning: exported method DirectoryEntries.Files should have comment or be unexported (golint)
    • Line 39: warning: exported method DirectoryEntries.Names should have comment or be unexported (golint)
    • pkg/test/testutils.go
    • Line 27: warning: should not use dot imports (golint)
    • Line 32: warning: exported function List should have comment or be unexported (golint)
    • Line 41: warning: exported function ExpectFolders should have comment or be unexported (golint)
    • Line 55: warning: exported function ExpectRead should have comment or be unexported (golint)
    • Line 76: warning: exported function ExpectFileCreate should have comment or be unexported (golint)
    • Line 104: warning: exported function ExpectFileWrite should have comment or be unexported (golint)
    • Line 123: warning: exported function ExpectFileContent should have comment or be unexported (golint)
    • Line 130: warning: exported type ErrMatcher should have comment or be unexported (golint)
    • Line 132: warning: exported function ExpectMatchedErr should have comment or be unexported (golint)
    • Line 136: warning: exported function ExpectErr should have comment or be unexported (golint)
    • Line 140: warning: exported function ExpectSucceeded should have comment or be unexported (golint)
    • pkg/cwdfs/cwd.go
    • Line 30: warning: exported type WorkingDirectoryFileSystem should have comment or be unexported (golint)
    • Line 36: warning: exported function New should have comment or be unexported (golint)
    • Line 54: warning: exported method WorkingDirectoryFileSystem.Chdir should have comment or be unexported (golint)
    • Line 70: warning: exported method WorkingDirectoryFileSystem.Name should have comment or be unexported (golint)
    • Line 74: warning: exported method WorkingDirectoryFileSystem.VolumeName should have comment or be unexported (golint)
    • Line 78: warning: exported method WorkingDirectoryFileSystem.FSTempDir should have comment or be unexported (golint)
    • Line 82: warning: exported method WorkingDirectoryFileSystem.Normalize should have comment or be unexported (golint)
    • Line 86: warning: exported method WorkingDirectoryFileSystem.Getwd should have comment or be unexported (golint)
    • Line 102: warning: exported method WorkingDirectoryFileSystem.Create should have comment or be unexported (golint)
    • Line 110: warning: exported method WorkingDirectoryFileSystem.Mkdir should have comment or be unexported (golint)
    • Line 118: warning: exported method WorkingDirectoryFileSystem.MkdirAll should have comment or be unexported (golint)
    • Line 126: warning: exported method WorkingDirectoryFileSystem.Open should have comment or be unexported (golint)
    • Line 134: warning: exported method WorkingDirectoryFileSystem.OpenFile should have comment or be unexported (golint)
    • Line 142: warning: exported method WorkingDirectoryFileSystem.Remove should have comment or be unexported (golint)
    • Line 150: warning: exported method WorkingDirectoryFileSystem.RemoveAll should have comment or be unexported (golint)
    • Line 158: warning: exported method WorkingDirectoryFileSystem.Rename should have comment or be unexported (golint)
    • Line 170: warning: exported method WorkingDirectoryFileSystem.Stat should have comment or be unexported (golint)
    • Line 178: warning: exported method WorkingDirectoryFileSystem.Chmod should have comment or be unexported (golint)
    • Line 186: warning: exported method WorkingDirectoryFileSystem.Chtimes should have comment or be unexported (golint)
    • Line 194: warning: exported method WorkingDirectoryFileSystem.Lstat should have comment or be unexported (golint)
    • Line 202: warning: exported method WorkingDirectoryFileSystem.Symlink should have comment or be unexported (golint)
    • Line 210: warning: exported method WorkingDirectoryFileSystem.Readlink should have comment or be unexported (golint)
    • pkg/utils/mappedfs.go
    • Line 31: warning: exported type PathMapper should have comment or be unexported (golint)
    • Line 35: warning: exported type MappedFileSystem should have comment or be unexported (golint)
    • Line 41: warning: exported function NewMappedFileSystem should have comment or be unexported (golint)
    • Line 45: warning: exported method MappedFileSystem.Base should have comment or be unexported (golint)
    • Line 49: warning: exported method MappedFileSystem.VolumeName should have comment or be unexported (golint)
    • Line 53: warning: exported method MappedFileSystem.FSTempDir should have comment or be unexported (golint)
    • Line 57: warning: exported method MappedFileSystem.Normalize should have comment or be unexported (golint)
    • Line 61: warning: exported method MappedFileSystem.Getwd should have comment or be unexported (golint)
    • Line 143: warning: exported method MappedFileSystem.Chtimes should have comment or be unexported (golint)
    • Line 151: warning: exported method MappedFileSystem.Chmod should have comment or be unexported (golint)
    • Line 159: warning: exported method MappedFileSystem.Stat should have comment or be unexported (golint)
    • Line 167: warning: exported method MappedFileSystem.Rename should have comment or be unexported (golint)
    • Line 182: warning: exported method MappedFileSystem.RemoveAll should have comment or be unexported (golint)
    • Line 190: warning: exported method MappedFileSystem.Remove should have comment or be unexported (golint)
    • Line 198: warning: exported method MappedFileSystem.OpenFile should have comment or be unexported (golint)
    • Line 210: warning: exported method MappedFileSystem.Open should have comment or be unexported (golint)
    • Line 222: warning: exported method MappedFileSystem.Mkdir should have comment or be unexported (golint)
    • Line 230: warning: exported method MappedFileSystem.MkdirAll should have comment or be unexported (golint)
    • Line 260: warning: exported method MappedFileSystem.Create should have comment or be unexported (golint)
    • Line 272: warning: exported method MappedFileSystem.Lstat should have comment or be unexported (golint)
    • Line 280: warning: exported method MappedFileSystem.Symlink should have comment or be unexported (golint)
    • Line 288: warning: exported method MappedFileSystem.Readlink should have comment or be unexported (golint)
    • pkg/vfs/utils.go
    • Line 205: warning: exported function SplitVolume should have comment or be unexported (golint)
    • Line 308: warning: exported function Exists_ should have comment or be unexported (golint)
    • Line 308: warning: don't use underscores in Go names; func Exists_ should be Exists (golint)
    • Line 366: warning: exported function CopyFile should have comment or be unexported (golint)
    • Line 455: warning: exported function Touch should have comment or be unexported (golint)
    • pkg/vfs/walk.go
    • Line 81: warning: exported type WalkFunc should have comment or be unexported (golint)
    • Line 83: warning: exported var SkipDir should have comment or be unexported (golint)
    • Line 85: warning: exported function Walk should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words