Skip to content
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

Merged
merged 6 commits into from
Feb 21, 2025

Conversation

shahzadlone
Copy link
Member

Relevant issue(s)

Resolves #3445

Description

  • Bump golangci-lint
  • Fix deprecated warnings

@shahzadlone shahzadlone added the code quality Related to improving code quality label Feb 13, 2025
@shahzadlone shahzadlone added this to the DefraDB v0.16 milestone Feb 13, 2025
@shahzadlone shahzadlone self-assigned this Feb 13, 2025
@shahzadlone shahzadlone requested a review from a team February 13, 2025 15:47
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.51%. Comparing base (2dd5537) to head (b1e7e39).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
all-tests 78.51% <ø> (+0.03%) ⬆️

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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2dd5537...b1e7e39. Read the comment docs.

@shahzadlone shahzadlone added the bump Bumped version for something label Feb 13, 2025
@@ -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")
Copy link
Contributor

@AndrewSisley AndrewSisley Feb 20, 2025

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

Copy link
Contributor

@AndrewSisley AndrewSisley Feb 20, 2025

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)

Copy link
Member Author

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

Copy link
Contributor

@AndrewSisley AndrewSisley left a 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 :)

@shahzadlone shahzadlone merged commit 9302cff into sourcenetwork:develop Feb 21, 2025
43 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump Bumped version for something code quality Related to improving code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bump Linter to v1.64 and fix warnings
2 participants