-
Notifications
You must be signed in to change notification settings - Fork 473
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
Automatically download the golangci-lint if not exists #1491
Conversation
Signed-off-by: clundro <infdahai@outlook.com>
4dee6ca
to
c9a6f64
Compare
Signed-off-by: clundro <infdahai@outlook.com>
Signed-off-by: clundro <infdahai@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please check the path to golangci-lint in one step, and download in another step. You currently mix up all these logics.
- Please build the download URL with the predefined
GOLANGCI_LINT_REQUIRED_VERSION
so that we don't miss update multiple place.
Signed-off-by: clundro <infdahai@outlook.com>
Signed-off-by: clundro <infdahai@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. cc @tisonkun
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I use
dpkg
to install golanglint-ci packags in sys_path because the visit to raw.github.com for me is unstable. So I think we can support this way about system paths.If we find the package exists in system path, we will do check-version function and the program raises an error to tell users to update system packages if the check fails.
If we don't find it, we get the package from GoPATH or download it from github.
These two ways are from https://golangci-lint.run/usage/install/.