-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow MXBean in IdentifierName #4776
Comments
commonquail
added a commit
to commonquail/error-prone
that referenced
this issue
Feb 25, 2025
Occasionally, type names need to follow conventions that violate the styleguide without being able to rely on inheritance or annotations for exemption. For example, JMX MBean and MXBean definitions will routinely violate the styleguide, and outside the JDK, `maven-failsafe-plugin` 3.5.2's default filter is a set of 3 violating patterns. Suppressing these violations quickly becomes tedious. Rather than Whac-A-Mole'ing tolerated violations, define a new option whose value is a regex such that, if a possibly-violating type name matches that regex, the type name is allowed anyway. References: google#4776 References: google#4832
commonquail
added a commit
to commonquail/error-prone
that referenced
this issue
Feb 25, 2025
Occasionally, type names need to follow conventions that violate the styleguide without being able to rely on inheritance or annotations for exemption. For example, JMX MBean and MXBean definitions will routinely violate the styleguide, and outside the JDK, `maven-failsafe-plugin` 3.5.2's default filter is a set of 3 violating patterns. Suppressing these violations quickly becomes tedious. Rather than Whac-A-Mole'ing tolerated violations, define a new option whose value is a regex such that, if a possibly-violating type name matches that regex, the type name is allowed anyway. References: google#4776 References: google#4832
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Naming an interface with the suffix
MXBean
marks it as being an MXBean. This should be allowed by theIdentifierName
check such that one does not have to add a suppression to every MXBean interface.There is also an
@MXBean
annotation that can be used as an alternative for the name suffix, but MXBeans are basically always a public API (they can be accessed via the JVM management interface), so probably many users will not want to rename existing types.The text was updated successfully, but these errors were encountered: