浏览代码

DriverBenchDiffApplyN: ignore empty branch (staticcheck)

suppressing the "SA9003: empty branch (staticcheck)" instead of commenting-out
or removing these lines because removing/commenting these lines causes a ripple
effect of changes, and there's still a to-do below.

```
13:06:14 daemon/graphdriver/graphtest/graphbench_unix.go:175:3: SA9003: empty branch (staticcheck)
13:06:14 		if applyDiffSize != diffSize {
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 5 年之前
父节点
当前提交
41cfcac7fc
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      daemon/graphdriver/graphtest/graphbench_unix.go

+ 4 - 0
daemon/graphdriver/graphtest/graphbench_unix.go

@@ -172,6 +172,10 @@ func DriverBenchDiffApplyN(b *testing.B, fileCount int, drivername string, drive
 		b.StopTimer()
 		b.StopTimer()
 		arch.Close()
 		arch.Close()
 
 
+		// 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
 		if applyDiffSize != diffSize {
 		if applyDiffSize != diffSize {
 			// TODO: enforce this
 			// 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)