-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: enum name consisting of symbols lead to conflicting enum values (#…
…1261) Characters like, `!=, ==, =~, !~` etc would result in `VALUE_` enum values since we are not able to code generate these characters to something valid. This PR is adding an allowlist with some known characters to provide valid enum values if such a case occurs. Fixes cdk8s-team/cdk8s-cli#578 --------- Signed-off-by: Vinayak Kukreja <vinakuk@amazon.com>
- Loading branch information
1 parent
9b125cc
commit 1285288
Showing
4 changed files
with
219 additions
and
4 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export const NAMED_SYMBOLS = { | ||
EXCLAMATION: '!', | ||
AT_SIGN: '@', | ||
BACKTICK: '`', | ||
AMPERSAND: '&', | ||
APOSTROPHE: '\'', | ||
ASTERISK: '*', | ||
HYPHEN: '-', | ||
UNDERSCORE: '_', | ||
DOLLAR_SIGN: '$', | ||
POUND_SIGN: '#', | ||
TILDE: '~', | ||
PERCENT: '%', | ||
CARAT: '^', | ||
PIPE: '|', | ||
QUESTION_MARK: '?', | ||
COMMA: ',', | ||
PERIOD: '.', | ||
LESS_THAN: '<', | ||
GREATER_THAN: '>', | ||
OPEN_BRACKET: '(', | ||
CLOSE_BRACKET: ')', | ||
OPEN_BRACE: '{', | ||
CLOSE_BRACE: '}', | ||
SEMI_COLON: ';', | ||
QUOTATION_MARK: '"', | ||
FORWARD_SLASH: '/', | ||
BACKWARD_SLASH: '\\', | ||
NOT_EQUALS_TO: '!=', | ||
EQUALS_TO: '==', | ||
DEEP_EQUALS: '===', | ||
EQUAL_TILDE: '=~', | ||
NEGATION_TILDE: '!~', | ||
ROUND_BRACKETS: '()', | ||
CURLY_BRACES: '{}', | ||
ANGLE_BRACKETS: '<>', | ||
GREATER_THAN_EQUAL_TO: '>=', | ||
LESSER_THAN_EQUAL_TO: '<=', | ||
}; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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