Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make lint work without a $GOPATH. #1374

Merged
merged 1 commit into from
Mar 3, 2020
Merged

Make lint work without a $GOPATH. #1374

merged 1 commit into from
Mar 3, 2020

Conversation

porridge
Copy link
Member

@porridge porridge commented Mar 2, 2020

What this PR does / why we need it:

Make lint work without a $GOPATH.
Also document the need for $GOBIN to be in developer's $PATH.

Fixes #1373

Signed-off-by: Marcin Owsiany mowsiany@D2iQ.com

Also document the need for $GOBIN to be in developer's $PATH.

Signed-off-by: Marcin Owsiany <mowsiany@D2iQ.com>
@ANeumann82
Copy link
Member

This assumes that golang-lint is in the $PATH, which is isn't always. IntelliJ (not sure about GoLand) doesn't set that, and I didn't see any option to set it.
This is especially problematic as the commit hooks now use the make lint target... tbh, I don't really know a good way around this problem.

@kensipe
Copy link
Member

kensipe commented Mar 2, 2020

FWIW

  1. I use make lint from terminal.. not from IDE so I don't know that pain
  2. I use goland and have a global file watch that runs golangci-lint on changes (saved files). It basically runs our linter (without make) and honors the .golangci.yml of the project

Copy link
Member

@kensipe kensipe left a comment

Choose a reason for hiding this comment

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

/lgtm

@kensipe
Copy link
Member

kensipe commented Mar 2, 2020

make lint seems to work in goland terminal...

@ANeumann82
Copy link
Member

make lint seems to work in goland terminal...

It does work in the terminal, it doesn't work (for me) in the pre-commit-hook when committing from inside GoLand/IntelliJ. Still, I have to fix this on my side, i guess.

Copy link
Member

@ANeumann82 ANeumann82 left a comment

Choose a reason for hiding this comment

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

Fixed my paths, so now this works for me as well.

@ANeumann82 ANeumann82 merged commit d83fa72 into master Mar 3, 2020
@ANeumann82 ANeumann82 deleted the fix-lint branch March 3, 2020 10:15
runyontr pushed a commit that referenced this pull request Mar 11, 2020
Also document the need for $GOBIN to be in developer's $PATH.

Signed-off-by: Marcin Owsiany <mowsiany@D2iQ.com>
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
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.

lint target no longer works without $GOPATH
3 participants