-
Notifications
You must be signed in to change notification settings - Fork 1.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
Makefile: use go1.22 semantics for gofumpt #5684
Conversation
gofumpt defaults to using the go version from go.mod, but as we don't have one, we need to set it explicitly. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5684 +/- ##
==========================================
- Coverage 59.53% 59.50% -0.03%
==========================================
Files 346 346
Lines 29371 29371
==========================================
- Hits 17486 17478 -8
- Misses 10914 10923 +9
+ Partials 971 970 -1 |
@@ -52,7 +52,7 @@ shellcheck: ## run shellcheck validation | |||
.PHONY: fmt | |||
fmt: ## run gofumpt (if present) or gofmt | |||
@if command -v gofumpt > /dev/null; then \ | |||
gofumpt -w -d -lang=1.21 . ; \ | |||
gofumpt -w -d -lang=1.23 . ; \ |
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.
nit: We could probably have a variable on the top of the file so it's more discoverable
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.
Hm. Yeah, I was considering a bit how we could improve this, and went a bit back-and-forth;
- It's not really critical (switching did not result in a diff, so looks like there were no version-specific changes)
- It should no longer be needed when we have a
go.mod
, so .. 🤞 should go away in the near future (so didn't want to add the extra code-churn) - but I think we should look if we can containerise this (add a
docker bake
target); that way we would remove the requirement to havegofumpt
installed, and make sure that we run it in a consistent environment (and expected version of go) - ☝️ similar to how we do vendoring
- Was actually asking @crazy-max Yesterday (i.e., should we have some templates for such things?); related to Gofumpt all the things compose#12392 (comment)
Let me bring this one in, but if I have some time, I may have a look if we can containerise this (per above) |
gofumpt defaults to using the go version from go.mod, but as we don't have one, we need to set it explicitly.
- A picture of a cute animal (not mandatory but encouraged)