Skip to content

Makefile: don't look for golint and godep in specific places - #1588

Merged
dmp42 merged 1 commit into
distribution:masterfrom
aaronlehmann:golint-godep-location
Mar 31, 2016
Merged

dmp42 merged 1 commit into
distribution:masterfrom
aaronlehmann:golint-godep-location

Conversation

@aaronlehmann

Copy link
Copy Markdown

Using $GOPATH/bin/godep or $GOPATH/bin/golint is problematic because
$GOPATH can contain multiple colon-separated paths.

We should just run these like normal binaries. The user should make sure
their $PATH contains $GOPATH/bin, if necessary. This is part of normal
Go setup.

Using $GOPATH/bin/godep or $GOPATH/bin/golint is problematic because
$GOPATH can contain multiple colon-separated paths.

We should just run these like normal binaries. The user should make sure
their $PATH contains $GOPATH/bin, if necessary. This is part of normal
Go setup.

Signed-off-by: Aaron Lehmann <[email protected]>
@codecov-io

Copy link
Copy Markdown

Current coverage is 51.19%

Merging #1588 into master will decrease coverage by -6.68% as of 20525e3

@@            master   #1588   diff @@
======================================
  Files          122     122       
  Stmts        10659   10637    -22
  Branches       841     747    -94
  Methods          0       0       
======================================
- Hit           6169    5446   -723
+ Partial        841     747    -94
- Missed        3649    4444   +795

Review entire Coverage Diff as of 20525e3


Uncovered Suggestions

  1. +0.30% via .../driver/s3-aws/s3.go#730...761
  2. +0.29% via .../driver/s3-aws/s3.go#266...295
  3. +0.22% via .../driver/s3-aws/s3.go#882...904
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

@RichardScothern

Copy link
Copy Markdown

LGTM

@dmp42
dmp42 merged commit ff6f38c into distribution:master Mar 31, 2016
Comment thread Makefile

GODEP_BIN := $(GOPATH)/bin/godep
GODEP := $(shell [ -x $(GODEP_BIN) ] && echo $(GODEP_BIN) || echo '')
GOLINT := $(shell which golint || echo '')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just rely on $PATH? No reason to fix these outright using which, when that will be done automatically. How did this get in here in the first place?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevvooe: I left this in to preserve the

    $(if $(GOLINT), , \
        $(error Please install golint: `go get -u github.com/golang/lint/golint`))              ```

I'm not sure how to do that without calling `which` or doing something similar to search $PATH. If you have any suggestions, let me know.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronlehmann Would that statement work like this:

$(if $(which golint), , \ ...

If golint isn't available, which should return non-zero.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so (with $(shell which golint)). That's what I was going for in this PR. Do you think it would be cleaner to move the which golint from GODEP := to the conditional?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I just don't think we should be doing which lookups like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants