motif
motif copied to clipboard
proposal to update generated function names
Note for reviewers: I have NOT tested this against Uber's apps at the time of this writing - this pull request is more of a "is this even a problem worth changing" type of deal - if this seems agreeable, I'll test out the code generation in buck/bazel.
The main behavioral change in this pull request is in the function name generation in Names.kt, one can run into the following problems:
- If one create a type named
Null, it would break the keyword check since it's not in the keyword- Normally people probably won't do this - so this is probably not a real problem
- We can also just add
nullto the keyword list as alternative
- A name that ends with
2such asFunction2will pass through the uniqueness check and be converted asfunction22- This is not technically wrong or break anything, but feels like it reads worse than
function2_2
- This is not technically wrong or break anything, but feels like it reads worse than