Skip to content

Commit

Permalink
daemon/graphdriver: fix empty-lines (revive)
Browse files Browse the repository at this point in the history
    daemon/graphdriver/aufs/aufs.go:239:80: empty-lines: extra empty line at the start of a block (revive)
    daemon/graphdriver/graphtest/graphbench_unix.go:249:27: empty-lines: extra empty line at the start of a block (revive)
    daemon/graphdriver/graphtest/testutil.go:271:30: empty-lines: extra empty line at the end of a block (revive)
    daemon/graphdriver/graphtest/graphbench_unix.go:179:32: empty-block: this block is empty, you can remove it (revive)
    daemon/graphdriver/zfs/zfs.go:375:48: empty-lines: extra empty line at the end of a block (revive)
    daemon/graphdriver/overlay/overlay.go:248:89: empty-lines: extra empty line at the start of a block (revive)
    daemon/graphdriver/devmapper/deviceset.go:636:21: empty-lines: extra empty line at the end of a block (revive)
    daemon/graphdriver/devmapper/deviceset.go:1150:70: empty-lines: extra empty line at the start of a block (revive)
    daemon/graphdriver/devmapper/deviceset.go:1613:30: empty-lines: extra empty line at the end of a block (revive)
    daemon/graphdriver/devmapper/deviceset.go:1645:65: empty-lines: extra empty line at the start of a block (revive)
    daemon/graphdriver/btrfs/btrfs.go:53:101: empty-lines: extra empty line at the start of a block (revive)
    daemon/graphdriver/devmapper/deviceset.go:1944:89: empty-lines: extra empty line at the start of a block (revive)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Sep 27, 2022
1 parent 0c7b930 commit 9d9cca4
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion daemon/graphdriver/aufs/aufs.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ func (a *Driver) CreateReadWrite(id, parent string, opts *graphdriver.CreateOpts
// Create three folders for each id
// mnt, layers, and diff
func (a *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) error {

if opts != nil && len(opts.StorageOpt) != 0 {
return fmt.Errorf("--storage-opt is not supported for aufs")
}
Expand Down
1 change: 0 additions & 1 deletion daemon/graphdriver/btrfs/btrfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type btrfsOptions struct {
// Init returns a new BTRFS driver.
// An error is returned if BTRFS is not supported.
func Init(home string, options []string, idMap idtools.IdentityMapping) (graphdriver.Driver, error) {

// Perform feature detection on /var/lib/docker/btrfs if it's an existing directory.
// This covers situations where /var/lib/docker/btrfs is a mount, and on a different
// filesystem than /var/lib/docker.
Expand Down
5 changes: 0 additions & 5 deletions daemon/graphdriver/devmapper/deviceset.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@ func (devices *DeviceSet) migrateOldMetaData() error {
if err := os.Rename(devices.oldMetadataFile(), devices.oldMetadataFile()+".migrated"); err != nil {
return err
}

}

return nil
Expand Down Expand Up @@ -1148,7 +1147,6 @@ func (devices *DeviceSet) setupVerifyBaseImageUUIDFS(baseInfo *devInfo) error {
}

func (devices *DeviceSet) checkGrowBaseDeviceFS(info *devInfo) error {

if !userBaseSize {
return nil
}
Expand Down Expand Up @@ -1622,7 +1620,6 @@ func (devices *DeviceSet) loadThinPoolLoopBackInfo() error {
devices.dataDevice = dataLoopDevice
devices.dataLoopFile = datafilename
}

}

// metadata device has not been passed in. So there should be a
Expand All @@ -1643,7 +1640,6 @@ func (devices *DeviceSet) loadThinPoolLoopBackInfo() error {
}

func (devices *DeviceSet) enableDeferredRemovalDeletion() error {

// If user asked for deferred removal then check both libdm library
// and kernel driver support deferred removal otherwise error out.
if enableDeferredRemoval {
Expand Down Expand Up @@ -1946,7 +1942,6 @@ func (devices *DeviceSet) AddDevice(hash, baseHash string, storageOpt map[string
}

func (devices *DeviceSet) parseStorageOpt(storageOpt map[string]string) (uint64, error) {

// Read size to change the block device size per container.
for key, val := range storageOpt {
key := strings.ToLower(key)
Expand Down
5 changes: 2 additions & 3 deletions daemon/graphdriver/graphtest/graphbench_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ func DriverBenchDiffApplyN(b *testing.B, fileCount int, drivername string, drive
// suppressing "SA9003: empty branch (staticcheck)" instead of commenting-out/removing
// these lines because removing/commenting these lines causes a ripple effect
// of changes, and there's still a to-do below
//nolint:staticcheck
//nolint:staticcheck,revive
if applyDiffSize != diffSize {
// TODO: enforce this
//b.Fatalf("Apply diff size different, got %d, expected %s", applyDiffSize, diffSize)
// b.Fatalf("Apply diff size different, got %d, expected %s", applyDiffSize, diffSize)
}
if err := checkManyFiles(driver, diff, fileCount, 6); err != nil {
b.Fatal(err)
Expand Down Expand Up @@ -248,7 +248,6 @@ func DriverBenchDeepLayerRead(b *testing.B, layerCount int, drivername string, d

b.ResetTimer()
for i := 0; i < b.N; i++ {

// Read content
c, err := os.ReadFile(filepath.Join(root, "testfile.txt"))
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion daemon/graphdriver/graphtest/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ func addManyLayers(drv graphdriver.Driver, baseLayer string, count int) (string,
}

lastLayer = nextLayer

}
return lastLayer, nil
}
Expand Down
1 change: 0 additions & 1 deletion daemon/graphdriver/overlay/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ func (d *Driver) CreateReadWrite(id, parent string, opts *graphdriver.CreateOpts
// Create is used to create the upper, lower, and merge directories required for overlay fs for a given id.
// The parent filesystem is used to configure these directories for the overlay.
func (d *Driver) Create(id, parent string, opts *graphdriver.CreateOpts) (retErr error) {

if opts != nil && len(opts.StorageOpt) != 0 {
return fmt.Errorf("--storage-opt is not supported for overlay")
}
Expand Down
1 change: 0 additions & 1 deletion daemon/graphdriver/zfs/zfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ func (d *Driver) Get(id, mountLabel string) (_ string, retErr error) {
if rmErr := unix.Rmdir(mountpoint); rmErr != nil && !os.IsNotExist(rmErr) {
logrus.WithField("storage-driver", "zfs").Debugf("Failed to remove %s: %v", id, rmErr)
}

}
}
}()
Expand Down

0 comments on commit 9d9cca4

Please sign in to comment.