From 5a97f68a49e571ce8e4ef85d4b63a4acd1b8b735 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Sun, 24 Sep 2017 07:45:33 -0500 Subject: [PATCH 1/2] gps: lint - just return error --- internal/gps/vcs_source.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/internal/gps/vcs_source.go b/internal/gps/vcs_source.go index d71941ee1c..ea76f0ff63 100644 --- a/internal/gps/vcs_source.go +++ b/internal/gps/vcs_source.go @@ -376,11 +376,7 @@ func (s *bzrSource) exportRevisionTo(ctx context.Context, rev Revision, to strin return err } - if err := os.RemoveAll(filepath.Join(to, ".bzr")); err != nil { - return err - } - - return nil + return os.RemoveAll(filepath.Join(to, ".bzr")) } func (s *bzrSource) listVersions(ctx context.Context) ([]PairedVersion, error) { @@ -457,11 +453,7 @@ func (s *hgSource) exportRevisionTo(ctx context.Context, rev Revision, to string return err } - if err := os.RemoveAll(filepath.Join(to, ".hg")); err != nil { - return err - } - - return nil + return os.RemoveAll(filepath.Join(to, ".hg")) } func (s *hgSource) listVersions(ctx context.Context) ([]PairedVersion, error) { From 132b9deb55fdc831ed969d99ad77d19472fb12f5 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Sun, 24 Sep 2017 08:18:24 -0500 Subject: [PATCH 2/2] gps: lint - ignore unused from prune.go --- hack/lint.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/lint.bash b/hack/lint.bash index 811f2d4d7e..2dc1d6e8ad 100755 --- a/hack/lint.bash +++ b/hack/lint.bash @@ -9,4 +9,4 @@ set -e PKGS=$(go list ./... | grep -vF /vendor/) go vet $PKGS golint $PKGS -megacheck -unused.exported -ignore github.com/golang/dep/internal/test/test.go:U1000 $PKGS +megacheck -unused.exported -ignore "github.com/golang/dep/internal/test/test.go:U1000 github.com/golang/dep/internal/gps/prune.go:U1000" $PKGS