daemon/graphdriver: fix empty-lines (revive)
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>
(cherry picked from commit 9d9cca49b4
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
79caa2f955
commit
aea1aa0daa
7 changed files with 2 additions and 13 deletions
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -647,7 +647,6 @@ func (devices *DeviceSet) migrateOldMetaData() error {
|
|||
if err := os.Rename(devices.oldMetadataFile(), devices.oldMetadataFile()+".migrated"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -1148,7 +1147,6 @@ func (devices *DeviceSet) setupVerifyBaseImageUUIDFS(baseInfo *devInfo) error {
|
|||
}
|
||||
|
||||
func (devices *DeviceSet) checkGrowBaseDeviceFS(info *devInfo) error {
|
||||
|
||||
if !userBaseSize {
|
||||
return nil
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
|
|
@ -175,10 +175,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)
|
||||
|
@ -247,7 +247,6 @@ func DriverBenchDeepLayerRead(b *testing.B, layerCount int, drivername string, d
|
|||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
|
||||
// Read content
|
||||
c, err := contdriver.ReadFile(root, root.Join(root.Path(), "testfile.txt"))
|
||||
if err != nil {
|
||||
|
|
|
@ -278,7 +278,6 @@ func addManyLayers(drv graphdriver.Driver, baseLayer string, count int) (string,
|
|||
}
|
||||
|
||||
lastLayer = nextLayer
|
||||
|
||||
}
|
||||
return lastLayer, nil
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -379,7 +379,6 @@ func (d *Driver) Get(id, mountLabel string) (_ containerfs.ContainerFS, retErr e
|
|||
if rmErr := unix.Rmdir(mountpoint); rmErr != nil && !os.IsNotExist(rmErr) {
|
||||
logrus.WithField("storage-driver", "zfs").Debugf("Failed to remove %s: %v", id, rmErr)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in a new issue