-
Notifications
You must be signed in to change notification settings - Fork 959
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
enable govet fieldalignment #2856
Conversation
current warnings
|
funnily enough @Wondertan, the first PR i made @distractedm1nd said "oh, lint is failing on some alignment issue" and i thought it was this check and thought "damn, that is cool to run that as a CI check", and well...here we are. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2856 +/- ##
==========================================
- Coverage 50.99% 50.79% -0.20%
==========================================
Files 176 176
Lines 11172 11172
==========================================
- Hits 5697 5675 -22
- Misses 4974 4993 +19
- Partials 501 504 +3 ☔ View full report in Codecov by Sentry. |
i had a nightmare about this open PR so came and figured i'd come and do all the alignment work so its simple and ready to go for you @Wondertan noisy yes, but its exactly 69 files changed so "noice" too 😆 I found a good tool betteralignment that would make suggested alignment/padding fixes and preserve comments etc so we don't lose readability, i set it to ignore test files too as it would particularly flip out on named table driven tests. |
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.
Your first massive PR ❤️
They grow so fast 🥲 😄
Would you want to make a similar PR to go-header? |
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.
I believe this is config breaking, since it changes the serialization order in nodebuilder/config.go. Can you verify and mark it as such?
…core/listener.go,header/headertest/testing.go,nodebuilder/blobl/cmd/blob.go and share/p2p/peers/manager.go
this one has lingered, is pretty monumental, disruptive, and the overall experience of both the linter pointing out these vet/field alignment issues and then trying to fix them kinda sucks. Rather than blanket requiring field alignment EVERYWHERE then marking as |
digging through old issues found the request for integrating "structslop" with ci. The tool of which does some struct memory alignment checks. I was surprised this wasn't already present in golangci-lint and voila they do have some of these checks as part of govet
fieldalignment
govet check@Wondertan i think this satisfies the original request in the old issue, if you want to proceed, maybe we impart the fixes as part of this PR too
fixes #893