all: Unused parameter should be replaced by underscore (#8464)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
deepsource-autofix[bot]
2022-07-28 17:17:29 +02:00
committed by GitHub
co-authored by deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
parent 7bdb5faa9c
commit 5130c414da
32 changed files with 90 additions and 90 deletions
+1 -1
View File
@@ -265,7 +265,7 @@ func (f *BasicFilesystem) Create(name string) (File, error) {
return basicFile{fd, name}, err
}
func (f *BasicFilesystem) Walk(root string, walkFn WalkFunc) error {
func (f *BasicFilesystem) Walk(_ string, _ WalkFunc) error {
// implemented in WalkFilesystem
return errors.New("not implemented")
}
+24 -24
View File
@@ -19,42 +19,42 @@ type errorFilesystem struct {
uri string
}
func (fs *errorFilesystem) Chmod(name string, mode FileMode) error { return fs.err }
func (fs *errorFilesystem) Lchown(name, uid, gid string) error { return fs.err }
func (fs *errorFilesystem) Chtimes(name string, atime time.Time, mtime time.Time) error {
func (fs *errorFilesystem) Chmod(_ string, _ FileMode) error { return fs.err }
func (fs *errorFilesystem) Lchown(_, _, _ string) error { return fs.err }
func (fs *errorFilesystem) Chtimes(_ string, _ time.Time, _ time.Time) error {
return fs.err
}
func (fs *errorFilesystem) Create(name string) (File, error) { return nil, fs.err }
func (fs *errorFilesystem) CreateSymlink(target, name string) error { return fs.err }
func (fs *errorFilesystem) DirNames(name string) ([]string, error) { return nil, fs.err }
func (fs *errorFilesystem) Lstat(name string) (FileInfo, error) { return nil, fs.err }
func (fs *errorFilesystem) Mkdir(name string, perm FileMode) error { return fs.err }
func (fs *errorFilesystem) MkdirAll(name string, perm FileMode) error { return fs.err }
func (fs *errorFilesystem) Open(name string) (File, error) { return nil, fs.err }
func (fs *errorFilesystem) Create(_ string) (File, error) { return nil, fs.err }
func (fs *errorFilesystem) CreateSymlink(_, _ string) error { return fs.err }
func (fs *errorFilesystem) DirNames(_ string) ([]string, error) { return nil, fs.err }
func (fs *errorFilesystem) Lstat(_ string) (FileInfo, error) { return nil, fs.err }
func (fs *errorFilesystem) Mkdir(_ string, _ FileMode) error { return fs.err }
func (fs *errorFilesystem) MkdirAll(_ string, _ FileMode) error { return fs.err }
func (fs *errorFilesystem) Open(_ string) (File, error) { return nil, fs.err }
func (fs *errorFilesystem) OpenFile(string, int, FileMode) (File, error) { return nil, fs.err }
func (fs *errorFilesystem) ReadSymlink(name string) (string, error) { return "", fs.err }
func (fs *errorFilesystem) Remove(name string) error { return fs.err }
func (fs *errorFilesystem) RemoveAll(name string) error { return fs.err }
func (fs *errorFilesystem) Rename(oldname, newname string) error { return fs.err }
func (fs *errorFilesystem) Stat(name string) (FileInfo, error) { return nil, fs.err }
func (fs *errorFilesystem) ReadSymlink(_ string) (string, error) { return "", fs.err }
func (fs *errorFilesystem) Remove(_ string) error { return fs.err }
func (fs *errorFilesystem) RemoveAll(_ string) error { return fs.err }
func (fs *errorFilesystem) Rename(_, _ string) error { return fs.err }
func (fs *errorFilesystem) Stat(_ string) (FileInfo, error) { return nil, fs.err }
func (fs *errorFilesystem) SymlinksSupported() bool { return false }
func (fs *errorFilesystem) Walk(root string, walkFn WalkFunc) error { return fs.err }
func (fs *errorFilesystem) Unhide(name string) error { return fs.err }
func (fs *errorFilesystem) Hide(name string) error { return fs.err }
func (fs *errorFilesystem) Glob(pattern string) ([]string, error) { return nil, fs.err }
func (fs *errorFilesystem) SyncDir(name string) error { return fs.err }
func (fs *errorFilesystem) Walk(_ string, _ WalkFunc) error { return fs.err }
func (fs *errorFilesystem) Unhide(_ string) error { return fs.err }
func (fs *errorFilesystem) Hide(_ string) error { return fs.err }
func (fs *errorFilesystem) Glob(_ string) ([]string, error) { return nil, fs.err }
func (fs *errorFilesystem) SyncDir(_ string) error { return fs.err }
func (fs *errorFilesystem) Roots() ([]string, error) { return nil, fs.err }
func (fs *errorFilesystem) Usage(name string) (Usage, error) { return Usage{}, fs.err }
func (fs *errorFilesystem) Usage(_ string) (Usage, error) { return Usage{}, fs.err }
func (fs *errorFilesystem) Type() FilesystemType { return fs.fsType }
func (fs *errorFilesystem) URI() string { return fs.uri }
func (fs *errorFilesystem) Options() []Option {
return nil
}
func (fs *errorFilesystem) SameFile(fi1, fi2 FileInfo) bool { return false }
func (fs *errorFilesystem) Watch(path string, ignore Matcher, ctx context.Context, ignorePerms bool) (<-chan Event, <-chan error, error) {
func (fs *errorFilesystem) SameFile(_, _ FileInfo) bool { return false }
func (fs *errorFilesystem) Watch(_ string, _ Matcher, _ context.Context, _ bool) (<-chan Event, <-chan error, error) {
return nil, nil, fs.err
}
func (fs *errorFilesystem) PlatformData(name string) (protocol.PlatformData, error) {
func (fs *errorFilesystem) PlatformData(_ string) (protocol.PlatformData, error) {
return protocol.PlatformData{}, fs.err
}
+7 -7
View File
@@ -235,7 +235,7 @@ func (fs *fakeFS) Lchown(name, uid, gid string) error {
return nil
}
func (fs *fakeFS) Chtimes(name string, atime time.Time, mtime time.Time) error {
func (fs *fakeFS) Chtimes(name string, _ time.Time, mtime time.Time) error {
fs.mut.Lock()
defer fs.mut.Unlock()
fs.counters.Chtimes++
@@ -601,23 +601,23 @@ func (fs *fakeFS) SymlinksSupported() bool {
return false
}
func (fs *fakeFS) Walk(name string, walkFn WalkFunc) error {
func (fs *fakeFS) Walk(_ string, _ WalkFunc) error {
return errors.New("not implemented")
}
func (fs *fakeFS) Watch(path string, ignore Matcher, ctx context.Context, ignorePerms bool) (<-chan Event, <-chan error, error) {
func (fs *fakeFS) Watch(_ string, _ Matcher, _ context.Context, _ bool) (<-chan Event, <-chan error, error) {
return nil, nil, ErrWatchNotSupported
}
func (fs *fakeFS) Hide(name string) error {
func (fs *fakeFS) Hide(_ string) error {
return nil
}
func (fs *fakeFS) Unhide(name string) error {
func (fs *fakeFS) Unhide(_ string) error {
return nil
}
func (fs *fakeFS) Glob(pattern string) ([]string, error) {
func (fs *fakeFS) Glob(_ string) ([]string, error) {
// gnnh we don't seem to actually require this in practice
return nil, errors.New("not implemented")
}
@@ -626,7 +626,7 @@ func (fs *fakeFS) Roots() ([]string, error) {
return []string{"/"}, nil
}
func (fs *fakeFS) Usage(name string) (Usage, error) {
func (fs *fakeFS) Usage(_ string) (Usage, error) {
return Usage{}, errors.New("not implemented")
}
+1 -1
View File
@@ -245,7 +245,7 @@ func (s mapStore) Delete(key string) error {
}
// failChtimes does nothing, and fails
func failChtimes(name string, mtime, atime time.Time) error {
func failChtimes(_ string, _, _ time.Time) error {
return errors.New("no")
}