-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Switch checks to use retool. Fix goword and errcheck #7240
Conversation
Also fix goword and errcheck which were not being run correctly. These are now under the check-fail task.
CI failed by:
|
That's odd: this is the same as PD which is building just fine. Let me know if you understand this error. Otherwise I will just remove it for now: there are plenty of other checks to deal with right now. |
It seems |
Makefile
Outdated
# check spelling | ||
# misspell works with gometalinter | ||
retool add github.com/client9/misspell/cmd/misspell v0.3.4 | ||
# goword adds additional capability to checking comments |
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.
s/checking/check/?
check: check-setup fmt lint vet | ||
|
||
# These need to be fixed before they can be ran regularly | ||
check-fail: goword check-static check-slow |
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.
Could you file a github issue for these failed checks? Maybe we can make these checks happy again with the help of the community. 😄
Makefile
Outdated
# linter | ||
retool add github.com/mgechev/revive 7773f47324c2bf1c8f7a5500aff2b6c01d3ed73b | ||
|
||
check-setup: |
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.
Should we add tol-install
into this section?
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.
retool sync installs everything from tools.json. tool-install is the record of how that was generated. Its probably better to put tool-install into a hack/scripts/config folder rather than clutter the Makefile.
7af6b29
to
11e4444
Compare
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
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. Close #7247
What have you changed? (mandatory)
Switch checks to use retool. retool vendors check tools local to the project.
Note that you can also add other tools such as code generators to the retool setup.
Fix goword and errcheck: these were not being run correctly.These are now under the
check-fail
task.I would recommend creating an issue to fix the check-fail task. This can be time boxed to some amount of time per week, but will probably take more than one day total.
errcheck
in particular is of great importance: unhandled errors are almost guaranteed to result in bugs. I can show you how I handle collecting errors in defer statements.What is the type of the changes? (mandatory)
Improvement/New Feature for static analysis
How has this PR been tested? (mandatory)
make check
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
no
Does this PR affect tidb-ansible update? (mandatory)
no
Does this PR need to be added to the release notes? (mandatory)
Switch static checks to use retool.