-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Version string different between go install and using the install.sh script #5069
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
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, When using the install script, you download a golangci-lint binary from the releases. When using So the difference in the version details is expected.
Duplicate of #3789 |
Thank you for the explanation. However, I’m still unsure why there is a difference in the output, specifically why one installation method includes the v prefix in the version number (i.e., v1.61.0), while the other doesn’t (i.e., 1.61.0). I would expect the version formatting to remain consistent regardless of whether it’s installed from a release or compiled locally. Could you clarify if this is intentional behavior or if I’m missing something? |
The version comes from a value sets during the compilation:
As the documentation explains, local compilation is not recommended because it has side effects. Based on that, I don't see this difference as a "bug". We cannot just strip the letter If we want to change this, there are only 2 possibilities:
The possibility 1 can be seen as a breaking change, so it's not an acceptable approach. The possibility 2 seems overkill to just handle a version when using a not recommended way to install golangci-lint. And this may also be seen as a breaking change. |
Thank you for the explanation. Makes sense. Appreciate it. |
Welcome
typecheck
section of the FAQ.Description of the problem
Installing golangci-lint using two different methods leads to different results when doing
golangci-lint version
.Here is my little script showing the issue:
Notice that one returns
1.61.0
and the other returnsv1.61.0
Version of golangci-lint
n/a
Configuration
n/a
Go environment
Verbose output of running
n/a
A minimal reproducible example or link to a public repository
I think my description should be enough
Validation
Supporter
The text was updated successfully, but these errors were encountered: