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

Use betteralign for struct alignment #1132

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Use betteralign for struct alignment #1132

merged 1 commit into from
Sep 24, 2024

Conversation

anderseknert
Copy link
Member

Saving us some bytes ;) A few things had to be fixed, but nothing I'd consider breaking.

Not too important though, so happy to close if someone else is concerned :P

@@ -255,6 +255,16 @@ func TestJSONReporterPublish(t *testing.T) {
expect := `{
"violations": [
{
"location": {
Copy link
Member Author

Choose a reason for hiding this comment

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

If we don't like the JSON output changed, we can easily create a custom serializer with jsoniter

Copy link
Member

@charlieegan3 charlieegan3 left a comment

Choose a reason for hiding this comment

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

LGTM, more concerned about keeping these orders correct. Is this something that we can lint for?

@anderseknert
Copy link
Member Author

@charlieegan3 there used to be an malign linter to do this, but it seems dead. Frankly though, for anything that isn't in an absolute hot path where millions of objects are created... this is mostly just of academic interest / benefit. I would not want to have external contributor PRs fail for this, for example. If we run this check ourselves once a year or so, that's fine with me :)

Saving us some bytes ;) A few things had to be fixed, but nothing
I'd consider breaking.

Signed-off-by: Anders Eknert <anders@styra.com>

# Conflicts:
#	internal/lsp/completions/providers/options.go
#	internal/lsp/server.go
@anderseknert anderseknert merged commit b424eb6 into main Sep 24, 2024
4 checks passed
@anderseknert anderseknert deleted the betteralign branch September 24, 2024 18:00
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
Saving us some bytes ;) A few things had to be fixed, but nothing I'd consider breaking.

Signed-off-by: Anders Eknert <anders@styra.com>
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.

2 participants