Skip to content

Install golangci-lint locally using Windows #830

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

Closed
1 of 3 tasks
fgagneten opened this issue Oct 20, 2019 · 9 comments
Closed
1 of 3 tasks

Install golangci-lint locally using Windows #830

fgagneten opened this issue Oct 20, 2019 · 9 comments
Labels
area: docs platform: windows Issue that is related to Windows stale No recent correspondence or work activity

Comments

@fgagneten
Copy link

Thank you for creating the issue!

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc).

I couldn't find a way to install golang-ci-lint in my Windows PC. The only issue I found so far was: #14

Reading the README.md I could only find Linux and MacOS installation: https://github.com/golangci/golangci-lint#install

Is there any possibility to update the README explaining how to install and run locally golangci-lint for Windows?
Thanks

@jirfag
Copy link
Contributor

jirfag commented Oct 22, 2019

Hi!
Can't you run curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0 in terminal?

@ernado
Copy link
Member

ernado commented Oct 22, 2019

I'm not sure that there are curl and sh by default on Windows.
Probably, the best current way is to download binary from releases page and put it in PATH.

We can refer to hugo as example of providing installation instructions for Windows.

@fgagneten
Copy link
Author

We can't run curl and sh in Windows. Please add a solution with chocolatey. Thanks

@k-yle
Copy link

k-yle commented Nov 8, 2019

It works on windows if you run the install script curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0 using Git Bash or the windows subsystem for linux (WSL)

Maybe this should go in the readme?

@tpounds tpounds added the help wanted Issue that needs help from a contributor label Nov 8, 2019
@tpounds
Copy link
Contributor

tpounds commented Nov 8, 2019

@fgagneten I think the easiest method right now is to just manually download one of the Windows archives from the releases page and extract the binary somewhere on the PATH. That said, I do think adding support for chocolatey.org or similar might make sense. Patches are welcome if someone with experience would like to add support.

@jc-lathander
Copy link

It works on windows if you run the install script curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0 using Git Bash or the windows subsystem for linux (WSL)

Maybe this should go in the readme?

this works on windows with git bash, excepted that if your user directory has space( ex: c:\users\foo bar\ ) .
you should quote the "$(go env GOPATH)/bin" in this case.

janisz added a commit to dcos/dcos-core-cli that referenced this issue Apr 23, 2020
* Fix appveyor build

Download specific version of golangci-lint to prevent failures.
Refs: golangci/golangci-lint#830 (comment)

* Skip flaky test

Refs: https://jira.d2iq.com/browse/D2IQ-67286
@hxzhouh
Copy link

hxzhouh commented Jul 14, 2020

please run in git bash

@ldez ldez added the platform: windows Issue that is related to Windows label Feb 13, 2021
@ldez ldez added stale No recent correspondence or work activity and removed help wanted Issue that needs help from a contributor labels Apr 8, 2021
@stale stale bot removed the stale No recent correspondence or work activity label Apr 8, 2021
@ldez ldez added the stale No recent correspondence or work activity label Apr 8, 2021
@stale stale bot closed this as completed Jun 2, 2021
@RasmusKW
Copy link

RasmusKW commented Oct 8, 2021

It works on windows if you run the install script curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0 using Git Bash or the windows subsystem for linux (WSL)
Maybe this should go in the readme?

this works on windows with git bash, excepted that if your user directory has space( ex: c:\users\foo bar\ ) . you should quote the "$(go env GOPATH)/bin" in this case.

You are the man!

@ChristoWolf
Copy link

Hi @ernado!

Probably, the best current way is to download binary from releases page and put it in PATH.

Is this still the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs platform: windows Issue that is related to Windows stale No recent correspondence or work activity
Projects
None yet
Development

No branches or pull requests

10 participants