-
Notifications
You must be signed in to change notification settings - Fork 54
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
chore(i): Bump golangci-lint to v1.64 #3446
chore(i): Bump golangci-lint to v1.64 #3446
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3446 +/- ##
===========================================
+ Coverage 78.48% 78.51% +0.03%
===========================================
Files 397 397
Lines 37574 37574
===========================================
+ Hits 29487 29499 +12
+ Misses 6395 6385 -10
+ Partials 1692 1690 -2
Flags with carried forward coverage won't be shown. Click here to find out more. see 19 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
6c42d33
to
0c4a1cb
Compare
@@ -123,8 +123,12 @@ func (ucid *UniqueCid) Validate(s *state, actualValue any, msgAndArgs ...any) { | |||
|
|||
if isNew { | |||
require.IsType(s.t, "", actualValue) | |||
value, ok := actualValue.(string) | |||
if !ok { | |||
require.Fail(s.t, "UniqueCid actualValue string cast failed") |
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.
suggestion: I think I prefer a nolint
to this, this is dead code and makes reading the func more complicated than it needs to be. Even if it turns out to not be dead, a panic is more useful than the require.Fail
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.
And if you really really don't want a no lint, please remove the require.IsType
call on the line above (maybe remove it either way, as IMO the panic is nicer than the require
)
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.
One can argue reading any go if err != nil {
makes the code unreadable (which i agree it does, but we don't stop using it). I don't like the linter suppressing suggestion keeping as is.
- Remove
require.IsType
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, and I have no problem with this sneaking in the release (no prod code changes). Minor suggestion for you first if you dont mind looking before merge :)
6bf8c0a
to
afe68e0
Compare
afe68e0
to
b1e7e39
Compare
Relevant issue(s)
Resolves #3445
Description