-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Makefile: Replace Gometalinter to Golangci-lint #13405
Changes from all commits
d59d3aa
7d6f3a4
b575ef3
d782a3c
955f66e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,13 +83,10 @@ goword:tools/bin/goword | |
gosec:tools/bin/gosec | ||
tools/bin/gosec $$($(PACKAGE_DIRECTORIES)) | ||
|
||
check-static:tools/bin/gometalinter tools/bin/misspell tools/bin/ineffassign | ||
@ # TODO: enable megacheck. | ||
@ # TODO: gometalinter has been DEPRECATED. | ||
@ # https://github.com/alecthomas/gometalinter/issues/590 | ||
tools/bin/gometalinter --disable-all --deadline 120s \ | ||
--enable misspell \ | ||
--enable ineffassign \ | ||
check-static: tools/bin/golangci-lint | ||
tools/bin/golangci-lint run -v --disable-all --deadline=3m \ | ||
--enable=misspell \ | ||
--enable=ineffassign \ | ||
$$($(PACKAGE_DIRECTORIES)) | ||
|
||
check-slow:tools/bin/gometalinter tools/bin/gosec | ||
|
@@ -277,6 +274,8 @@ tools/bin/misspell:tools/check/go.mod | |
tools/bin/ineffassign:tools/check/go.mod | ||
cd tools/check; \ | ||
$(GO) build -o ../bin/ineffassign github.com/gordonklaus/ineffassign | ||
tools/bin/golangci-lint: | ||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b ./tools/bin v1.21.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will the binary from this URL change? Is there any version control for tools? We use go.mod to control the version of other tools here: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, version control for tool is at last ( |
||
|
||
# Usage: | ||
# | ||
|
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.
why changed to 3m ?
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.
Indeed, golangci-lint is faster than gometalinter.
But it cannot support like
--deadline 120s
, therefore I changed it to--deadline=3m
.The reason for 3m rather than 2m , beacuse I think we should give more time for the new tool.
And changed it back when it stable enough.