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

Fix Go names case #142

Merged
merged 3 commits into from
Nov 29, 2024
Merged

Fix Go names case #142

merged 3 commits into from
Nov 29, 2024

Conversation

clement-heetch
Copy link
Contributor

@clement-heetch clement-heetch commented Nov 28, 2024

Version 0.4.5 introduced a regression where the case for generated Go code changed.

This PR restores the original behavior.

Tests

Non regression unit tests have been introduced, using golden files.
Sample test schema is an actual file taken from contract repo (billing_and_charging/entities/attempt/v1/attempt.avsc)

@clement-heetch clement-heetch marked this pull request as ready for review November 28, 2024 18:06
@clement-heetch clement-heetch requested review from a team and jpcosal November 28, 2024 18:06
@gyndav gyndav requested review from a team, Sharykhin and hchienjo November 29, 2024 10:01
@jpcosal jpcosal requested a review from mladenbl November 29, 2024 10:51
@skateinmars skateinmars changed the title fix go names case Fix Go names case Nov 29, 2024
@@ -0,0 +1,15 @@
module dummy
Copy link
Contributor

Choose a reason for hiding this comment

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

go.mod is to prevent generated code from being scanned as part of avro code

@gyndav gyndav requested a review from jpcosal November 29, 2024 15:44
Copy link
Contributor

@jpcosal jpcosal left a comment

Choose a reason for hiding this comment

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

Self approving 😁

@jpcosal jpcosal merged commit 2184516 into master Nov 29, 2024
1 check passed
@jpcosal jpcosal deleted the fix/go-names-case branch November 29, 2024 17:30
@@ -75,3 +78,17 @@ func TestShouldImportAvroTypeGen(t *testing.T) {
})
}
}

func TestGenerate(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

❤️

@@ -0,0 +1,135 @@

// Code generated by avrogen. DO NOT EDIT.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

indentation looks pretty weird :(

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.

4 participants