Introduce staticcheck for stricter builds (#7035)

This commit is contained in:
Harshavardhana
2019-02-13 04:59:36 -08:00
committed by Nitish Tiwari
parent 4ba77a916d
commit df35d7db9d
71 changed files with 274 additions and 777 deletions
+3 -3
View File
@@ -188,7 +188,7 @@ func TestPosixIsDirEmpty(t *testing.T) {
// Should give false on non-existent directory.
dir1 := slashpath.Join(tmp, "non-existent-directory")
if isDirEmpty(dir1) != false {
if isDirEmpty(dir1) {
t.Error("expected false for non-existent directory, got true")
}
@@ -199,7 +199,7 @@ func TestPosixIsDirEmpty(t *testing.T) {
t.Fatal(err)
}
if isDirEmpty(dir2) != false {
if isDirEmpty(dir2) {
t.Error("expected false for a file, got true")
}
@@ -210,7 +210,7 @@ func TestPosixIsDirEmpty(t *testing.T) {
t.Fatal(err)
}
if isDirEmpty(dir3) != true {
if !isDirEmpty(dir3) {
t.Error("expected true for empty dir, got false")
}
}