From 50fafa2808aa993da70cb55069cace15bb72014d Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 2 Mar 2017 21:03:05 -0800 Subject: [PATCH] Fix lint errors --- GNUmakefile | 1 + client/allocdir/alloc_dir_test.go | 6 +++--- client/allocdir/fs_linux_test.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index c44cec98a..1f849836c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -49,6 +49,7 @@ vet: echo ""; \ echo "[LINT] Vet found suspicious constructs. Please check the reported constructs"; \ echo "and fix them if necessary before submitting the code for review."; \ + exit 1; \ fi @git grep -n `echo "log"".Print"` | grep -v 'vendor/' ; if [ $$? -eq 0 ]; then \ diff --git a/client/allocdir/alloc_dir_test.go b/client/allocdir/alloc_dir_test.go index bc4b24284..efd480501 100644 --- a/client/allocdir/alloc_dir_test.go +++ b/client/allocdir/alloc_dir_test.go @@ -408,10 +408,10 @@ func TestPathFuncs(t *testing.T) { } if empty, err := pathEmpty(dir); err != nil || !empty { - t.Errorf("%q is empty and exists. empty=%v error=%v", empty, err) + t.Errorf("%q is empty and exists. empty=%v error=%v", dir, empty, err) } if empty, err := pathEmpty(missingDir); err == nil || empty { - t.Errorf("%q is missing. empty=%v error=%v", empty, err) + t.Errorf("%q is missing. empty=%v error=%v", missingDir, empty, err) } filename := filepath.Join(dir, "just-some-file") @@ -422,6 +422,6 @@ func TestPathFuncs(t *testing.T) { f.Close() if empty, err := pathEmpty(dir); err != nil || empty { - t.Errorf("%q is not empty. empty=%v error=%v", empty, err) + t.Errorf("%q is not empty. empty=%v error=%v", dir, empty, err) } } diff --git a/client/allocdir/fs_linux_test.go b/client/allocdir/fs_linux_test.go index d328755e4..fd51400a4 100644 --- a/client/allocdir/fs_linux_test.go +++ b/client/allocdir/fs_linux_test.go @@ -87,7 +87,7 @@ func TestLinuxRootSecretDir(t *testing.T) { t.Fatalf("secrets dir %q is not a directory and should be", secretsDir) } if err := isMount(secretsDir); err != nil { - t.Fatalf("secrets dir %q is not a mount: %v", err) + t.Fatalf("secrets dir %q is not a mount: %v", secretsDir, err) } // now remove it