Rule to convert string arguments to enum case #7779
gisostallenberg
started this conversation in
Ideas
Replies: 1 comment
-
|
I think this can be done using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have this idea to create a rule that collects all arguments passed to a certain function and creates an enum to represent that value.
Example
Before:
After:
Or alternatively leave the argument type
string, and get the value of the enum, as in:The rule of course needs configuration:
I have no idea where to start with such a rule, or if this is already possible with other rules.
Beta Was this translation helpful? Give feedback.
All reactions