updates and fixes to linters#4828
Merged
Merged
Conversation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
tonistiigi
commented
Apr 9, 2024
| - unusedwrite | ||
| # enable-all: true | ||
| # disable: | ||
| # - fieldalignment |
Member
Author
There was a problem hiding this comment.
fieldalignment is also somewhat interesting. Enabling it would mean 100+ updates to current structs. How many of these cases actually have practical benefits is not fully clear to me yet. This could be considered but needs more analysis before.
Shadow could catch some issues, but currently there are quite a lot of places where we intentionally use the same variable name, and changing it could hurt readability.
Member
There was a problem hiding this comment.
With fieldalignment, wouldn't that mean we couldn't keep our structs ordered for readability? Unless the memory usage is incredibly dramatic, I'd prefer to allow ordering/grouping of struct fields to be done to keep readability of the code.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
70b3c0f to
61f4c90
Compare
profnandaa
approved these changes
Apr 9, 2024
crazy-max
approved these changes
Apr 9, 2024
jedevc
approved these changes
Apr 9, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable new nilness and unusedwrite linters that seem to be quite useful and did point to some actual issues.