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

Update to golangci-lint 1.60.1 to support go 1.23 #3900

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

mstoykov
Copy link
Contributor

What?

Update golangci-lint to 1.60.1

Why?

Once again a new release of go makes golangci-lint use all available memory.

This also fixes some new linter issues, mostly:

  • staticheck dropping a bunch of checks
  • min/max overriding. They are now build-in in 1.21+, but I didn't want to replace them and bump to 1.21 in this commit already, given the whole toolchain thing.
  • printf not being error checked or not being used with format + arguments.

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make tests) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

Once again a new release of go makes golangci-lint use all available
memory.

This also fixes some new linter issues, mostly:
- staticheck dropping a bunch of checks
- min/max overriding. They are now build-in in 1.21+, but I didn't want
  to replace them and bump to 1.21 in this commit already, given the
  whole toolchain thing.
- printf not being error checked or not being used with format +
  arguments.
@mstoykov mstoykov added this to the v0.54.0 milestone Aug 16, 2024
@mstoykov mstoykov requested a review from a team as a code owner August 16, 2024 14:55
@mstoykov mstoykov requested review from codebien and olegbespalov and removed request for a team August 16, 2024 14:55
olegbespalov
olegbespalov previously approved these changes Aug 16, 2024
output/cloud/expv2/flush.go Outdated Show resolved Hide resolved
Co-authored-by: Oleg Bespalov <oleg.bespalov@grafana.com>
// This is copied from lib/util.go to avoid circular imports.
func Clampf(val, min, max float64) float64 {
// Clampf returns the given value, "clamped" to the range [floor, ceiling].
func Clampf(val, floor, ceiling float64) float64 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as an observation, it does sound like something we might unexport. We don't use it outside of the pb package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect we will do this in one big sweep one day ... soon ™️ ;)

@mstoykov mstoykov merged commit fd03ba6 into master Aug 16, 2024
23 checks passed
@mstoykov mstoykov deleted the updateGolancCIForGo1.23 branch August 16, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants