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

golangci-lint is using go v1.19 for gofmt linter inspite of using go v1.17 in the github action #3077

Closed
4 tasks done
nishantwrp opened this issue Aug 7, 2022 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@nishantwrp
Copy link

nishantwrp commented Aug 7, 2022

Welcome

  • 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).
  • Yes, I've tried with the standalone linter if available. (https://golangci-lint.run/usage/linters/)

Description of the problem

In our golangci-lint github workflow, we use go v1.17.x. The errors pointed out by the gofmt linter (see here) doesn't seem to get fixed when using gofmt -s . with the binary provided by go v.17.13 but they do get fixed with running the binary provided by go v1.19.

Here is our .golangci.yml config. How should I modify the config for it to use the go fmt linter corresponding to the go version that I'm using in the CI?

Version of golangci-lint

$ golangci-lint --version
# paste output here

Configuration file

$ cat .golangci.yml
# paste output here

Go environment

$ go version && go env
# paste output here

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
# paste output here

Code example or link to a public repository

// add your code here
@nishantwrp nishantwrp added the bug Something isn't working label Aug 7, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 7, 2022

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez
Copy link
Member

ldez commented Aug 7, 2022

duplicate of #3069 and golangci/golangci-lint-action#535

@ldez ldez closed this as completed Aug 7, 2022
@ldez ldez added duplicate This issue or pull request already exists and removed bug Something isn't working labels Aug 7, 2022
@ldez
Copy link
Member

ldez commented Aug 7, 2022

Offtopic

golangci-lint team as Go team supports only the 2 latest minor versions of Go.

https://golangci-lint.run/usage/faq/#which-go-versions-are-supported

Go v1.17 will not receive any security patch so it's recommended to update to at least go1.18.

@nishantwrp
Copy link
Author

Yup, but even gofmt that comes with go v1.18 doesn't fix the errors pointed out.

@ldez
Copy link
Member

ldez commented Aug 7, 2022

My remark is explicitly offtopic, so yes this will not change your problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants