Preparing report...

Report for github.com/ddevault/afero

A    Great!    Found 27 issues across 35 files

Tweet

gofmt88%

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!


golint45%

Golint is a linter for Go source code.

    • afero/util.go
    • Line 32: warning: comment on exported const FilePathSeparator should be of the form "FilePathSeparator ..." (golint)
    • Line 35: warning: comment on exported method Afero.WriteReader should be of the form "WriteReader ..." (golint)
    • Line 40: warning: exported function WriteReader should have comment or be unexported (golint)
    • Line 63: warning: comment on exported method Afero.SafeWriteReader should be of the form "SafeWriteReader ..." (golint)
    • Line 68: warning: exported function SafeWriteReader should have comment or be unexported (golint)
    • Line 97: warning: exported method Afero.GetTempDir should have comment or be unexported (golint)
    • Line 135: warning: comment on exported function UnicodeSanitize should be of the form "UnicodeSanitize ..." (golint)
    • Line 159: warning: comment on exported function NeuterAccents should be of the form "NeuterAccents ..." (golint)
    • Line 171: warning: exported method Afero.FileContainsBytes should have comment or be unexported (golint)
    • Line 175: warning: comment on exported function FileContainsBytes should be of the form "FileContainsBytes ..." (golint)
    • Line 186: warning: exported method Afero.FileContainsAnyBytes should have comment or be unexported (golint)
    • Line 190: warning: comment on exported function FileContainsAnyBytes should be of the form "FileContainsAnyBytes ..." (golint)
    • Line 253: warning: exported method Afero.DirExists should have comment or be unexported (golint)
    • Line 269: warning: exported method Afero.IsDir should have comment or be unexported (golint)
    • Line 282: warning: exported method Afero.IsEmpty should have comment or be unexported (golint)
    • Line 307: warning: exported method Afero.Exists should have comment or be unexported (golint)
    • Line 311: warning: comment on exported function Exists should be of the form "Exists ..." (golint)
    • Line 323: warning: exported function FullBaseFsPath should have comment or be unexported (golint)
    • afero/sftpfs/file.go
    • Line 21: warning: exported type File should have comment or be unexported (golint)
    • Line 25: warning: exported function FileOpen should have comment or be unexported (golint)
    • Line 33: warning: exported function FileCreate should have comment or be unexported (golint)
    • Line 41: warning: exported method File.Close should have comment or be unexported (golint)
    • Line 45: warning: exported method File.Name should have comment or be unexported (golint)
    • Line 49: warning: exported method File.Stat should have comment or be unexported (golint)
    • Line 53: warning: exported method File.Sync should have comment or be unexported (golint)
    • Line 57: warning: exported method File.Truncate should have comment or be unexported (golint)
    • Line 65: warning: comment on exported method File.ReadAt should be of the form "ReadAt ..." (golint)
    • Line 70: warning: comment on exported method File.Readdir should be of the form "Readdir ..." (golint)
    • Line 75: warning: comment on exported method File.Readdirnames should be of the form "Readdirnames ..." (golint)
    • Line 80: warning: exported method File.Seek should have comment or be unexported (golint)
    • Line 88: warning: comment on exported method File.WriteAt should be of the form "WriteAt ..." (golint)
    • Line 93: warning: exported method File.WriteString should have comment or be unexported (golint)
    • afero/sftpfs/sftp.go
    • Line 32: warning: exported function New should have comment or be unexported (golint)
    • Line 36: warning: exported method Fs.Name should have comment or be unexported (golint)
    • Line 38: warning: exported method Fs.Create should have comment or be unexported (golint)
    • Line 42: warning: exported method Fs.Mkdir should have comment or be unexported (golint)
    • Line 50: warning: exported method Fs.MkdirAll should have comment or be unexported (golint)
    • Line 93: warning: exported method Fs.Open should have comment or be unexported (golint)
    • Line 97: warning: exported method Fs.OpenFile should have comment or be unexported (golint)
    • Line 101: warning: exported method Fs.Remove should have comment or be unexported (golint)
    • Line 105: warning: exported method Fs.RemoveAll should have comment or be unexported (golint)
    • Line 111: warning: exported method Fs.Rename should have comment or be unexported (golint)
    • Line 115: warning: exported method Fs.Stat should have comment or be unexported (golint)
    • Line 119: warning: exported method Fs.Lstat should have comment or be unexported (golint)
    • Line 123: warning: exported method Fs.Chmod should have comment or be unexported (golint)
    • Line 127: warning: exported method Fs.Chtimes should have comment or be unexported (golint)
    • afero/unionFile.go
    • Line 31: warning: exported method UnionFile.Close should have comment or be unexported (golint)
    • Line 64: warning: exported method UnionFile.ReadAt should have comment or be unexported (golint)
    • Line 78: warning: exported method UnionFile.Seek should have comment or be unexported (golint)
    • Line 106: warning: exported method UnionFile.WriteAt should have comment or be unexported (golint)
    • Line 120: warning: exported method UnionFile.Name should have comment or be unexported (golint)
    • Line 210: warning: exported method UnionFile.Readdirnames should have comment or be unexported (golint)
    • Line 222: warning: exported method UnionFile.Stat should have comment or be unexported (golint)
    • Line 232: warning: exported method UnionFile.Sync should have comment or be unexported (golint)
    • Line 246: warning: exported method UnionFile.Truncate should have comment or be unexported (golint)
    • Line 260: warning: exported method UnionFile.WriteString should have comment or be unexported (golint)
    • afero/cacheOnReadFs.go
    • Line 9: warning: comment on exported type CacheOnReadFs should be of the form "CacheOnReadFs ..." (with optional leading article) (golint)
    • Line 28: warning: exported function NewCacheOnReadFs should have comment or be unexported (golint)
    • Line 78: warning: exported method CacheOnReadFs.Chtimes should have comment or be unexported (golint)
    • Line 99: warning: exported method CacheOnReadFs.Chmod should have comment or be unexported (golint)
    • Line 120: warning: exported method CacheOnReadFs.Stat should have comment or be unexported (golint)
    • Line 133: warning: exported method CacheOnReadFs.Rename should have comment or be unexported (golint)
    • Line 154: warning: exported method CacheOnReadFs.Remove should have comment or be unexported (golint)
    • Line 170: warning: exported method CacheOnReadFs.RemoveAll should have comment or be unexported (golint)
    • Line 186: warning: exported method CacheOnReadFs.OpenFile should have comment or be unexported (golint)
    • Line 213: warning: exported method CacheOnReadFs.Open should have comment or be unexported (golint)
    • Line 257: warning: exported method CacheOnReadFs.Mkdir should have comment or be unexported (golint)
    • Line 265: warning: exported method CacheOnReadFs.Name should have comment or be unexported (golint)
    • Line 269: warning: exported method CacheOnReadFs.MkdirAll should have comment or be unexported (golint)
    • Line 277: warning: exported method CacheOnReadFs.Create should have comment or be unexported (golint)
    • afero/os.go
    • Line 30: warning: exported function NewOsFs should have comment or be unexported (golint)
    • Line 34: warning: exported method OsFs.Name should have comment or be unexported (golint)
    • Line 36: warning: exported method OsFs.Create should have comment or be unexported (golint)
    • Line 46: warning: exported method OsFs.Mkdir should have comment or be unexported (golint)
    • Line 50: warning: exported method OsFs.MkdirAll should have comment or be unexported (golint)
    • Line 54: warning: exported method OsFs.Open should have comment or be unexported (golint)
    • Line 64: warning: exported method OsFs.OpenFile should have comment or be unexported (golint)
    • Line 74: warning: exported method OsFs.Remove should have comment or be unexported (golint)
    • Line 78: warning: exported method OsFs.RemoveAll should have comment or be unexported (golint)
    • Line 82: warning: exported method OsFs.Rename should have comment or be unexported (golint)
    • Line 86: warning: exported method OsFs.Stat should have comment or be unexported (golint)
    • Line 90: warning: exported method OsFs.Chmod should have comment or be unexported (golint)
    • Line 94: warning: exported method OsFs.Chtimes should have comment or be unexported (golint)
    • Line 98: warning: exported method OsFs.LstatIfPossible should have comment or be unexported (golint)
    • afero/basepath.go
    • Line 26: warning: exported type BasePathFile should have comment or be unexported (golint)
    • Line 31: warning: exported method BasePathFile.Name should have comment or be unexported (golint)
    • Line 36: warning: exported function NewBasePathFs should have comment or be unexported (golint)
    • Line 40: warning: comment on exported method BasePathFs.RealPath should be of the form "RealPath ..." (golint)
    • Line 72: warning: exported method BasePathFs.Chtimes should have comment or be unexported (golint)
    • Line 79: warning: exported method BasePathFs.Chmod should have comment or be unexported (golint)
    • Line 86: warning: exported method BasePathFs.Name should have comment or be unexported (golint)
    • Line 90: warning: exported method BasePathFs.Stat should have comment or be unexported (golint)
    • Line 97: warning: exported method BasePathFs.Rename should have comment or be unexported (golint)
    • Line 107: warning: exported method BasePathFs.RemoveAll should have comment or be unexported (golint)
    • Line 114: warning: exported method BasePathFs.Remove should have comment or be unexported (golint)
    • Line 121: warning: exported method BasePathFs.OpenFile should have comment or be unexported (golint)
    • Line 132: warning: exported method BasePathFs.Open should have comment or be unexported (golint)
    • Line 143: warning: exported method BasePathFs.Mkdir should have comment or be unexported (golint)
    • Line 150: warning: exported method BasePathFs.MkdirAll should have comment or be unexported (golint)
    • Line 157: warning: exported method BasePathFs.Create should have comment or be unexported (golint)
    • Line 168: warning: exported method BasePathFs.LstatIfPossible should have comment or be unexported (golint)
    • afero/path.go
    • Line 96: warning: exported method Afero.Walk should have comment or be unexported (golint)
    • Line 100: warning: exported function Walk should have comment or be unexported (golint)
    • afero/regexpfs.go
    • Line 19: warning: exported function NewRegexpFs should have comment or be unexported (golint)
    • Line 23: warning: exported type RegexpFile should have comment or be unexported (golint)
    • Line 49: warning: exported method RegexpFs.Chtimes should have comment or be unexported (golint)
    • Line 56: warning: exported method RegexpFs.Chmod should have comment or be unexported (golint)
    • Line 63: warning: exported method RegexpFs.Name should have comment or be unexported (golint)
    • Line 67: warning: exported method RegexpFs.Stat should have comment or be unexported (golint)
    • Line 74: warning: exported method RegexpFs.Rename should have comment or be unexported (golint)
    • Line 91: warning: exported method RegexpFs.RemoveAll should have comment or be unexported (golint)
    • Line 104: warning: exported method RegexpFs.Remove should have comment or be unexported (golint)
    • Line 111: warning: exported method RegexpFs.OpenFile should have comment or be unexported (golint)
    • Line 118: warning: exported method RegexpFs.Open should have comment or be unexported (golint)
    • Line 132: warning: exported method RegexpFs.Mkdir should have comment or be unexported (golint)
    • Line 136: warning: exported method RegexpFs.MkdirAll should have comment or be unexported (golint)
    • Line 140: warning: exported method RegexpFs.Create should have comment or be unexported (golint)
    • Line 147: warning: exported method RegexpFile.Close should have comment or be unexported (golint)
    • Line 155: warning: exported method RegexpFile.ReadAt should have comment or be unexported (golint)
    • Line 159: warning: exported method RegexpFile.Seek should have comment or be unexported (golint)
    • Line 167: warning: exported method RegexpFile.WriteAt should have comment or be unexported (golint)
    • Line 171: warning: exported method RegexpFile.Name should have comment or be unexported (golint)
    • Line 175: warning: exported method RegexpFile.Readdir should have comment or be unexported (golint)
    • Line 189: warning: exported method RegexpFile.Readdirnames should have comment or be unexported (golint)
    • Line 200: warning: exported method RegexpFile.Stat should have comment or be unexported (golint)
    • Line 204: warning: exported method RegexpFile.Sync should have comment or be unexported (golint)
    • Line 208: warning: exported method RegexpFile.Truncate should have comment or be unexported (golint)
    • Line 212: warning: exported method RegexpFile.WriteString should have comment or be unexported (golint)
    • afero/mem/file.go
    • Line 29: warning: exported const FilePathSeparator should have comment or be unexported (golint)
    • Line 31: warning: exported type File should have comment or be unexported (golint)
    • Line 40: warning: exported function NewFileHandle should have comment or be unexported (golint)
    • Line 44: warning: exported function NewReadOnlyFileHandle should have comment or be unexported (golint)
    • Line 48: warning: exported method File.Data should have comment or be unexported (golint)
    • Line 52: warning: exported type FileData should have comment or be unexported (golint)
    • Line 62: warning: exported method FileData.Name should have comment or be unexported (golint)
    • Line 68: warning: exported function CreateFile should have comment or be unexported (golint)
    • Line 72: warning: exported function CreateDir should have comment or be unexported (golint)
    • Line 76: warning: exported function ChangeFileName should have comment or be unexported (golint)
    • Line 82: warning: exported function SetMode should have comment or be unexported (golint)
    • Line 88: warning: exported function SetModTime should have comment or be unexported (golint)
    • Line 98: warning: exported function GetFileInfo should have comment or be unexported (golint)
    • Line 102: warning: exported method File.Open should have comment or be unexported (golint)
    • Line 111: warning: exported method File.Close should have comment or be unexported (golint)
    • Line 121: warning: exported method File.Name should have comment or be unexported (golint)
    • Line 125: warning: exported method File.Stat should have comment or be unexported (golint)
    • Line 129: warning: exported method File.Sync should have comment or be unexported (golint)
    • Line 133: warning: exported method File.Readdir should have comment or be unexported (golint)
    • Line 164: warning: exported method File.Readdirnames should have comment or be unexported (golint)
    • Line 195: warning: exported method File.ReadAt should have comment or be unexported (golint)
    • Line 200: warning: exported method File.Truncate should have comment or be unexported (golint)
    • Line 220: warning: exported method File.Seek should have comment or be unexported (golint)
    • Line 261: warning: exported method File.WriteAt should have comment or be unexported (golint)
    • Line 266: warning: exported method File.WriteString should have comment or be unexported (golint)
    • Line 270: warning: exported method File.Info should have comment or be unexported (golint)
    • Line 274: warning: exported type FileInfo should have comment or be unexported (golint)
    • Line 278: warning: comment on exported method FileInfo.Name should be of the form "Name ..." (golint)
    • Line 285: warning: exported method FileInfo.Mode should have comment or be unexported (golint)
    • Line 290: warning: exported method FileInfo.ModTime should have comment or be unexported (golint)
    • Line 295: warning: exported method FileInfo.IsDir should have comment or be unexported (golint)
    • Line 300: warning: exported method FileInfo.Sys should have comment or be unexported (golint)
    • Line 301: warning: exported method FileInfo.Size should have comment or be unexported (golint)
    • Line 311: warning: exported var ErrFileClosed should have comment or be unexported (golint)
    • afero/afero.go
    • Line 32: warning: exported type Afero should have comment or be unexported (golint)
    • Line 102: warning: exported var ErrFileClosed should have comment or be unexported (golint)
    • afero/copyOnWriteFs.go
    • Line 25: warning: exported function NewCopyOnWriteFs should have comment or be unexported (golint)
    • Line 52: warning: exported method CopyOnWriteFs.Chtimes should have comment or be unexported (golint)
    • Line 65: warning: exported method CopyOnWriteFs.Chmod should have comment or be unexported (golint)
    • Line 78: warning: exported method CopyOnWriteFs.Stat should have comment or be unexported (golint)
    • Line 90: warning: exported method CopyOnWriteFs.LstatIfPossible should have comment or be unexported (golint)
    • Line 130: warning: comment on exported method CopyOnWriteFs.Rename should be of the form "Rename ..." (golint)
    • Line 142: warning: comment on exported method CopyOnWriteFs.Remove should be of the form "Remove ..." (golint)
    • Line 159: warning: exported method CopyOnWriteFs.RemoveAll should have comment or be unexported (golint)
    • Line 173: warning: exported method CopyOnWriteFs.OpenFile should have comment or be unexported (golint)
    • Line 215: warning: comment on exported method CopyOnWriteFs.Open should be of the form "Open ..." (golint)
    • Line 264: warning: exported method CopyOnWriteFs.Mkdir should have comment or be unexported (golint)
    • Line 275: warning: exported method CopyOnWriteFs.Name should have comment or be unexported (golint)
    • Line 279: warning: exported method CopyOnWriteFs.MkdirAll should have comment or be unexported (golint)
    • Line 291: warning: exported method CopyOnWriteFs.Create should have comment or be unexported (golint)
    • afero/httpFs.go
    • Line 48: warning: exported type HttpFs should have comment or be unexported (golint)
    • Line 52: warning: exported function NewHttpFs should have comment or be unexported (golint)
    • Line 56: warning: exported method HttpFs.Dir should have comment or be unexported (golint)
    • Line 60: warning: exported method HttpFs.Name should have comment or be unexported (golint)
    • Line 62: warning: exported method HttpFs.Create should have comment or be unexported (golint)
    • Line 66: warning: exported method HttpFs.Chmod should have comment or be unexported (golint)
    • Line 70: warning: exported method HttpFs.Chtimes should have comment or be unexported (golint)
    • Line 74: warning: exported method HttpFs.Mkdir should have comment or be unexported (golint)
    • Line 78: warning: exported method HttpFs.MkdirAll should have comment or be unexported (golint)
    • Line 82: warning: exported method HttpFs.Open should have comment or be unexported (golint)
    • Line 92: warning: exported method HttpFs.OpenFile should have comment or be unexported (golint)
    • Line 96: warning: exported method HttpFs.Remove should have comment or be unexported (golint)
    • Line 100: warning: exported method HttpFs.RemoveAll should have comment or be unexported (golint)
    • Line 104: warning: exported method HttpFs.Rename should have comment or be unexported (golint)
    • Line 108: warning: exported method HttpFs.Stat should have comment or be unexported (golint)
    • afero/ioutil.go
    • Line 42: warning: exported function ReadDir should have comment or be unexported (golint)
    • Line 64: warning: exported function ReadFile should have comment or be unexported (golint)
    • Line 124: warning: exported function WriteFile should have comment or be unexported (golint)
    • Line 175: warning: exported function TempFile should have comment or be unexported (golint)
    • Line 207: warning: exported function TempDir should have comment or be unexported (golint)
    • afero/memmap.go
    • Line 28: warning: exported type MemMapFs should have comment or be unexported (golint)
    • Line 34: warning: exported function NewMemMapFs should have comment or be unexported (golint)
    • Line 48: warning: exported method MemMapFs.Name should have comment or be unexported (golint)
    • Line 50: warning: exported method MemMapFs.Create should have comment or be unexported (golint)
    • Line 128: warning: exported method MemMapFs.Mkdir should have comment or be unexported (golint)
    • Line 149: warning: exported method MemMapFs.MkdirAll should have comment or be unexported (golint)
    • Line 174: warning: exported method MemMapFs.Open should have comment or be unexported (golint)
    • Line 207: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 212: warning: exported method MemMapFs.OpenFile should have comment or be unexported (golint)
    • Line 245: warning: exported method MemMapFs.Remove should have comment or be unexported (golint)
    • Line 263: warning: exported method MemMapFs.RemoveAll should have comment or be unexported (golint)
    • Line 272: warning: should omit 2nd value from range; this loop is equivalent to `for p := range ...` (golint)
    • Line 284: warning: exported method MemMapFs.Rename should have comment or be unexported (golint)
    • Line 311: warning: exported method MemMapFs.Stat should have comment or be unexported (golint)
    • Line 320: warning: exported method MemMapFs.Chmod should have comment or be unexported (golint)
    • Line 337: warning: exported method MemMapFs.Chtimes should have comment or be unexported (golint)
    • Line 354: warning: exported method MemMapFs.List should have comment or be unexported (golint)
    • afero/readonlyfs.go
    • Line 11: warning: exported type ReadOnlyFs should have comment or be unexported (golint)
    • Line 15: warning: exported function NewReadOnlyFs should have comment or be unexported (golint)
    • Line 19: warning: exported method ReadOnlyFs.ReadDir should have comment or be unexported (golint)
    • Line 23: warning: exported method ReadOnlyFs.Chtimes should have comment or be unexported (golint)
    • Line 27: warning: exported method ReadOnlyFs.Chmod should have comment or be unexported (golint)
    • Line 31: warning: exported method ReadOnlyFs.Name should have comment or be unexported (golint)
    • Line 35: warning: exported method ReadOnlyFs.Stat should have comment or be unexported (golint)
    • Line 39: warning: exported method ReadOnlyFs.LstatIfPossible should have comment or be unexported (golint)
    • Line 47: warning: exported method ReadOnlyFs.Rename should have comment or be unexported (golint)
    • Line 51: warning: exported method ReadOnlyFs.RemoveAll should have comment or be unexported (golint)
    • Line 55: warning: exported method ReadOnlyFs.Remove should have comment or be unexported (golint)
    • Line 59: warning: exported method ReadOnlyFs.OpenFile should have comment or be unexported (golint)
    • Line 66: warning: exported method ReadOnlyFs.Open should have comment or be unexported (golint)
    • Line 70: warning: exported method ReadOnlyFs.Mkdir should have comment or be unexported (golint)
    • Line 74: warning: exported method ReadOnlyFs.MkdirAll should have comment or be unexported (golint)
    • Line 78: warning: exported method ReadOnlyFs.Create should have comment or be unexported (golint)
    • afero/mem/dir.go
    • Line 16: warning: exported type Dir should have comment or be unexported (golint)
    • Line 24: warning: exported function RemoveFromMemDir should have comment or be unexported (golint)
    • Line 28: warning: exported function AddToMemDir should have comment or be unexported (golint)
    • Line 32: warning: exported function InitializeDir should have comment or be unexported (golint)
    • afero/mem/dirmap.go
    • Line 18: warning: exported type DirMap should have comment or be unexported (golint)
    • Line 20: warning: exported method DirMap.Len should have comment or be unexported (golint)
    • Line 21: warning: exported method DirMap.Add should have comment or be unexported (golint)
    • Line 22: warning: exported method DirMap.Remove should have comment or be unexported (golint)
    • Line 23: warning: exported method DirMap.Files should have comment or be unexported (golint)
    • Line 38: warning: exported method DirMap.Names should have comment or be unexported (golint)

gocyclo97%

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.


ineffassign82%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell94%

Misspell Finds commonly misspelled English words