Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Support gometalinter 2.0 #1393

Closed
derekperkins opened this issue Dec 5, 2017 · 14 comments
Closed

Support gometalinter 2.0 #1393

derekperkins opened this issue Dec 5, 2017 · 14 comments

Comments

@derekperkins
Copy link

"The configuration format has also changed, but should be mostly backwards compatible.

Another major change is that from now on we will be releasing binary packages. gometalinter's management of linter installation will soon be deprecated, and eventually removed."

https://github.com/alecthomas/gometalinter/releases/tag/v2.0.0

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Dec 6, 2017

PRs are welcome. I can answer any questions on where to get started from the extension's perspective

@ramya-rao-a
Copy link
Contributor

I am confused a bit here. What changes are needed from the Go extension's side to use gometalinter 2.0?
Doesnt it suffice that the user updates their version locally?

cc'ing everyone who upvoted this feature request: @atishpatel, @zmb3, @taketori, @SNieroda, @fishhead108

@zerkms
Copy link

zerkms commented Jun 2, 2018

@ramya-rao-a in the config gometalinter v2 is underlined as a wrong value

@ramya-rao-a
Copy link
Contributor

@zerkms You mean setting go.lintTool to gometalinter.v2? Doesn't running a go get -u github.com/alecthomas/gometalinter update the tool to use v2 ?

@zerkms
Copy link

zerkms commented Jun 2, 2018

@ramya-rao-a that's right - if you set go.lintTool to gometalinter.v2 underlines it as not a valid value.

It still works, but in the config it is marked as an invalid value.

@ramya-rao-a
Copy link
Contributor

@zerkms Why do we need to set go.lintTool to gometalinter.v2?

Doesn't updating your local gometalinter by running a go get -u github.com/alecthomas/gometalinter give you all the features of gometalinter.v2 ?

@zmb3
Copy link
Contributor

zmb3 commented Jun 3, 2018

I don’t think you should need to update the name of the tool. I think the change behind v2 is that it is no longer go-gettable - you’ll need to install binaries instead.

@ramya-rao-a
Copy link
Contributor

@zmb3 I just did a go get on gometalinter and was able to get the latest and the binary is built. This surely has all the new features.

cc @alecthomas for clarification

@zerkms
Copy link

zerkms commented Jun 4, 2018

@ramya-rao-a if I set it to "go.lintTool": "gometalinter", no validation happens at all.

➜ which gometalinter
gometalinter not found

I'm not sure how it's supposed to work

Doesn't updating your local gometalinter by running a go get -u github.com/alecthomas/gometalinter give you all the features of gometalinter.v2 ?

The stable version is installed using the go get -u gopkg.in/alecthomas/gometalinter.v2 command

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jun 4, 2018

@zerkms Please run go get -u github.com/alecthomas/gometalinter and try again

@zerkms
Copy link

zerkms commented Jun 4, 2018

@ramya-rao-a as it is stated on the gometalinter readme it would install the unstable version. I'm sure it would work, I'm not sure I'm ready to run unstable version of devtools though.

@ramya-rao-a
Copy link
Contributor

@zerkms Every tool that this Go extension uses comes from the master branch of the corresponding repo. We dont use the one from gopkg.in for the exact issue that we then have to support all the versions as the binary name would be different.

#1297 is tracking a feature where you can map a tool used by this extension to the path where it needs to find the tool. Once that feature is in, you can add a mapping like "gometalinter": "gometalinter.v2" and that should help your case.

@zerkms
Copy link

zerkms commented Jun 4, 2018

Thanks for the detailed response, now I see. Thanks a lot.

@ramya-rao-a
Copy link
Contributor

To use goemtalinter.v2

  • Update to the latest version of the Go extension (0.6.83)
  • Install gometalinter.v2 independently
  • Add the below in your settings
"go.alternateTools": {
     "gometalinter": "gometalinter.v2"
}

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants