Improve naming: Change `boolean1` to `bool` and standardize fields
The boolean1 name looks kind of off to me because of the text chars and number mix matching.
Is it mandatory because there's the need for numerous fields, so the counting is necessary (which I'm not aware of at the moment)?
I'm assuming not, as the other fields don't have a counter as well.
So I would prefer, suggest, and expect something similar and precise with only alphabetic chars and not numbers - like bool or maybe even boolean_.
https://github.com/quarkusio/quarkus/pull/47303 Source/Reproduce: https://docs.openrewrite.org/recipes/java/migrate/upgradetojava17
Proposal: Adopt Kotlin-style it convention for single parameters
I suggest implementing a functional/generic it approach for single parameters, following Kotlin's implicit naming convention. While not identical, this shares the same core philosophy of concise (lambda) expressions.
Reference:
Kotlin Lambdas: it - implicit name of a single parameter
Benefits:
- More concise functional-style code
- Consistent with modern language conventions
- Reduces unnecessary parameter naming
- Maintains readability while being succinct
Prefer clazz or clazz1 over class1 as this is more common imho:
https://stackoverflow.com/questions/2529974/why-do-java-programmers-like-to-name-a-variable-clazz https://dpericich.medium.com/what-is-the-difference-between-class-klass-and-clazz-416b7d2736c1 https://commons.apache.org/dormant/clazz/userguide.html
hi! You've logged this as a bug, but I suppose it's a suggestion for a new recipe, correct?
Hi tim,
Yes imho its questionable behavior of a recepie we need to figure out yet as always like approached broadly via major migration: https://docs.openrewrite.org/recipes/java/migrate/upgradetojava17
So its no new stuff as the whole pr https://github.com/quarkusio/quarkus/pull/47303 is done by rewrite.
I've only adjusted the class name offset. from class1 to clazz like what we should adjust as well imho.
If we go fully rockstar with the generic it approach is an different much more invasive and a change (feature) but not a fix like the class naming.
Ah thanks for that context; I think that naming is defined here: https://github.com/openrewrite/rewrite/blob/cd4a37fcbf4ea33229cac6c868991ee2e0ef711e/rewrite-java/src/main/java/org/openrewrite/java/service/JavaNamingService.java#L28-L66
This issue is stale because it has not had any activity for 60 days. Remove question label or comment or this will be closed in two weeks. Issues may be reopened when there is renewed interest.