Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump golangci-lint to v1.62.0 #265

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
fetch-depth: 25

- name: Dependencies
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.0

- name: Lint
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions devices/devices_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ func DeviceInfo(fi os.FileInfo) (uint64, uint64, error) {
}

// mknod provides a shortcut for syscall.Mknod
func Mknod(p string, mode os.FileMode, maj, min int) error {
func Mknod(p string, mode os.FileMode, major, minor int) error {
var (
m = syscallMode(mode.Perm())
dev uint64
)

if mode&os.ModeDevice != 0 {
dev = unix.Mkdev(uint32(maj), uint32(min))
dev = unix.Mkdev(uint32(major), uint32(minor))

if mode&os.ModeCharDevice != 0 {
m |= unix.S_IFCHR
Expand Down
2 changes: 1 addition & 1 deletion driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ type LXAttrDriver interface {
}

type DeviceInfoDriver interface {
DeviceInfo(fi os.FileInfo) (maj uint64, min uint64, err error)
DeviceInfo(fi os.FileInfo) (major uint64, minor uint64, err error)
}

// driver is a simple default implementation that sends calls out to the "os"
Expand Down
2 changes: 1 addition & 1 deletion driver/driver_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ func (d *driver) LSetxattr(path string, attrMap map[string][]byte) error {
return nil
}

func (d *driver) DeviceInfo(fi os.FileInfo) (maj uint64, min uint64, err error) {
func (d *driver) DeviceInfo(fi os.FileInfo) (major uint64, minor uint64, err error) {
return devices.DeviceInfo(fi)
}
4 changes: 2 additions & 2 deletions fs/diff_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ func overlayFSWhiteoutConvert(diffDir, path string, f os.FileInfo, changeFn Chan
return false, nil
}

maj, min, err := devices.DeviceInfo(f)
major, minor, err := devices.DeviceInfo(f)
if err != nil {
return false, err
}
return (maj == 0 && min == 0), nil
return (major == 0 && minor == 0), nil
}

if f.IsDir() {
Expand Down
4 changes: 2 additions & 2 deletions fs/fstest/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ func CreateDir(name string, perm os.FileMode) Applier {
}

// Rename returns a file applier which renames a file
func Rename(old, new string) Applier {
func Rename(oldpath, newpath string) Applier {
return applyFn(func(root string) error {
return os.Rename(filepath.Join(root, old), filepath.Join(root, new))
return os.Rename(filepath.Join(root, oldpath), filepath.Join(root, newpath))
})
}

Expand Down
4 changes: 2 additions & 2 deletions fs/fstest/file_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ func Lchtimes(name string, atime, mtime time.Time) Applier {
}

// CreateDeviceFile provides creates devices Applier.
func CreateDeviceFile(name string, mode os.FileMode, maj, min int) Applier {
func CreateDeviceFile(name string, mode os.FileMode, major, minor int) Applier {
return applyFn(func(root string) error {
fullPath := filepath.Join(root, name)
return devices.Mknod(fullPath, mode, maj, min)
return devices.Mknod(fullPath, mode, major, minor)
})
}

Expand Down
2 changes: 1 addition & 1 deletion fs/fstest/file_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func Lchtimes(name string, atime, mtime time.Time) Applier {
}

// CreateDeviceFile provides creates devices Applier.
func CreateDeviceFile(name string, mode os.FileMode, maj, min int) Applier {
func CreateDeviceFile(name string, mode os.FileMode, major, minor int) Applier {
return applyFn(func(root string) error {
return errors.New("Not implemented")
})
Expand Down
Loading