Replace dashes with underscore for member var names#3291
Merged
SergeyRyabinin merged 1 commit intomainfrom Feb 11, 2025
Merged
Conversation
sbiscigl
approved these changes
Feb 10, 2025
|
|
||
| public static String computeVariableName(String memberName) { | ||
| return memberName.substring(0, 1).toLowerCase() + memberName.substring(1); | ||
| return lowercasesFirstChar(memberName).replace("-", "_"); |
Collaborator
There was a problem hiding this comment.
instead of underscores/string manipulation should we just copy what we do for upper camel case, but make it for lower camel case? since its only variable names shouldn't be publicly impacting, but it could make a nasty delta.
Contributor
Author
There was a problem hiding this comment.
well, the issue with CaseFormat is that we need to know the source case convention, but we don't know it.
Collaborator
There was a problem hiding this comment.
wouldn't it always be lower camelcase with variables?
Contributor
Author
There was a problem hiding this comment.
we don't control it, it comes from the model file.
sbera87
approved these changes
Feb 10, 2025
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.
Issue #, if available:
n/a
Description of changes:
Replace - with _
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.