-
Notifications
You must be signed in to change notification settings - Fork 246
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
feat(jsii): enforce enum names to be UPPER_CASE #541
Merged
+259
−239
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
11f3aba
feat(jsii): enforce enum names to be UPPER_CASE
shivlaks 13f7604
validate enum members to use TRUMP_CASE and not enum names
shivlaks 4690725
fix jsii-calc-lib
shivlaks 08510f9
fix enum members to be TRUMP_CASE in jsii-calc
shivlaks 17813c6
fix jsii-dotnet-runtime-test
shivlaks e8cd402
fix test & fingerprint in jsii-calc
shivlaks 69e1934
fix test & fingerprint
shivlaks 075fa5f
fix tests in jsii-kernel
shivlaks 73e131f
fix tests in jsii-reflect
shivlaks 110333d
fix tests in jsii-diff
shivlaks abcd79b
Merge branch 'master' into shivlaks/upper-case-all-enums
shivlaks b7331d4
add negative test for testing enum members
shivlaks b343d4a
update fingerprints after merge
shivlaks 5a857fc
jsii-pacmak UPDATE_DIFF when running test
shivlaks d86eab6
update enum members in jsii-java-runtime-test
shivlaks 0b1613e
update enum members in jsii-python-runtime
shivlaks 7a20567
missed a file in jsii-python-runtime
shivlaks ec44403
updating error messaging to use ALL_CAPS as terminology
shivlaks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
///!MATCH_ERROR: Type names must use PascalCase: My_Enum | ||
///!MATCH_ERROR: Enum names must use TRUMP_CASE: My_Enum | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope! Just the member names should be TRUMP_CASE There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think my Java disposition's are showing - enum names vs enum values. I'll get it updated! |
||
|
||
export enum My_Enum { | ||
Foo, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
///!MATCH_ERROR: Enum names must use TRUMP_CASE: MyEnum | ||
|
||
export enum MyEnum { | ||
Foo, | ||
Goo | ||
} |
This file contains 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
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.
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.
The enum /type/ should be pascal case, just members should be capital
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.
ah i see, totally misread that - so enum values then?
i'll get on it.
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.
Enum members:
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.
updated