diff --git a/check_test.go b/check_test.go index 1b10d9e..594fa63 100644 --- a/check_test.go +++ b/check_test.go @@ -273,6 +273,9 @@ func TestIgnoreComments(t *testing.T) { .. ` dh, err = ParseSpec(bytes.NewBufferString(spec)) + if err != nil { + t.Error(err) + } res, err = Check(dir, dh, nil, nil) if err != nil { diff --git a/cmd/gomtree/main.go b/cmd/gomtree/main.go index 42bc286..6e8a058 100644 --- a/cmd/gomtree/main.go +++ b/cmd/gomtree/main.go @@ -258,7 +258,7 @@ func app() error { if err != nil { return err } - if result != nil && len(result) > 0 { + if len(result) > 0 { fmt.Printf("%#v\n", result) } diff --git a/compare_test.go b/compare_test.go index 8953c1e..5a13961 100644 --- a/compare_test.go +++ b/compare_test.go @@ -90,8 +90,6 @@ func TestCompareModified(t *testing.T) { } // These cannot fail. - tmpfile, _ = filepath.Rel(dir, tmpfile) - tmpdir, _ = filepath.Rel(dir, tmpdir) tmpsubfile, _ = filepath.Rel(dir, tmpsubfile) for _, diff := range diffs { diff --git a/keywords_test.go b/keywords_test.go index 3dac002..a1e7890 100644 --- a/keywords_test.go +++ b/keywords_test.go @@ -39,7 +39,6 @@ func TestKeyValRoundtrip(t *testing.T) { t.Errorf("expected %q; got %q", expected, got) } - expected = "xattr.security.selinux=farts" kv1 := KeyVal(got) kv2 := kv.NewValue("farts") if !kv2.Equal(kv1) {