Is your feature request related to a problem? Please describe.
https://openjdk.org/jeps/456 (Java 22) added unnamed variables denoted by _
(underscore)
Rule: FormalParameterNamingConventions
Describe the solution you'd like
FormalParameterNamingConventions should accept _
as a valid name by default. Currently it complains The lambda parameter name '_' doesn't match '[a-z][a-zA-Z0-9]*'.
Describe alternatives you've considered
I'm using the following workaround:
<rule ref="category/java/codestyle.xml/FormalParameterNamingConventions">
<properties>
<property name="methodParameterPattern" value="_|[a-z][a-zA-Z0-9]*"/>
<property name="finalMethodParameterPattern" value="_|[a-z][a-zA-Z0-9]*"/>
<property name="lambdaParameterPattern" value="_|[a-z][a-zA-Z0-9]*"/>
<property name="explicitLambdaParameterPattern" value="_|[a-z][a-zA-Z0-9]*"/>
</properties>
</rule>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4