-
Notifications
You must be signed in to change notification settings - Fork 3.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
lint: update staticcheck to 2021.1.1 #72313
Conversation
2604f9d
to
b087496
Compare
I don't feel particularly strongly about this. I was hoping the speedup would be a bit more dramatic. |
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.
Thanks for this! We should upgrade regardless - it will make it easier to stay up to date in the future.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @dt)
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
I also think this should be merged.
fc45cc1
to
e845007
Compare
We'll need to hold off merging this for a minute. It currently likely causes TestRoachVet to fail on macOS. It appears that one of the updates we pulled in means that we now see the build warning described in #70819 as part of the roachvet output. Unfortunately, that means that RoachVet fails since it assumes any output is a failure. |
e845007
to
1d69786
Compare
#72686 should resolve the warning |
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.
Reviewed 2 of 2 files at r1, 34 of 34 files at r21, 3 of 3 files at r22, 1 of 1 files at r23, 1 of 1 files at r24, 20 of 20 files at r25, 1 of 1 files at r26, 1 of 1 files at r27, 1 of 1 files at r28.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @dt, @srosenberg, @stevendanna, and @tbg)
pkg/spanconfig/spanconfigkvsubscriber/kvsubscriber.go, line 423 at r29 (raw file):
} func (h *handler) invoke(update roachpb.Span) {
Another bug...none of the below updates to h
were previously persisted, so why wasn't anything downstream affected?
pkg/sql/inverted/expression_test.go, line 84 at r27 (raw file):
func (u *UnknownExpression) IsTight() bool { return u.tight } func (u *UnknownExpression) SetNotTight() { u.tight = false }
Surprised nothing else was broken considering the previous setter was effectively no-op?
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.
Reviewable status: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @dt, @srosenberg, @stevendanna, and @tbg)
681ca46
to
cad791b
Compare
This lint checks for the use of context-aware APIs that aren't supported by DriverConn. Release note: None
This lint checks for unnecessary uses of Sprintf. I don't love this linter, but there were only a few violations of it. Release note: None
This lint checks for uses of regular expressions in a loop where the regular expresion compilation can be hoisted. Release note: None
Release note: None
This removes type assertions on variables that are already the type being asserted. This isn't a completely equivalent transformation, since in the case of nil interface types, these type assertions would have previously produced a panic. Release note: None
A comparison with the untyped nil here would never be true in this case because of the cast. Release note: None
The SetNotTight function modifies the receiver so needs a pointer receiver to be useful. Release note: None
strings.TrimSuffix does a HasSuffix check, so it can be called unconditionally. Release note: None
This method sets the `initialized` field, so needs a pointer receiver for the assignment to be effective. Release note: None
This version contains performance improvements according to the upstream changelog. The biggest downside is that the whole-program mode has been removed from the unused linter. For information about why it was removed see https://staticcheck.io/changes/2020.2/#unused-whole-program This PR also updates the following additional dependencies - [github.com/BurntSushi/toml v0.3.1...v0.4.1](BurntSushi/toml@v0.3.1...v0.4.1) - [golang.org/x/mod v0.4.2...v0.5.1](golang/mod@v0.4.2...v0.5.1) - [golang.org/x/sys 69cdffdb9359...a2f17f7b995](golang/sys@69cdffd...a2f17f7) - [golang.org/x/tools v0.1.5...v0.1.7](golang/tools@v0.1.5...v0.1.7) Release note: None
cad791b
to
acc0f8b
Compare
bors r=srosenberg,RaduBerinde,tbg |
Build succeeded: |
This version contains performance improvements according to the
upstream changelog.
The biggest downside is that the whole-program mode has been removed
from the unused linter. For information about why it was removed see
https://staticcheck.io/changes/2020.2/#unused-whole-program
See individual commits for fixes to new violations added by the new version.