Skip to content
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

Open
PhilippWendler opened this issue Jan 17, 2025 · 0 comments · May be fixed by #4842
Open

Allow MXBean in IdentifierName #4776

PhilippWendler opened this issue Jan 17, 2025 · 0 comments · May be fixed by #4842

Comments

@PhilippWendler
Copy link

Naming an interface with the suffix MXBean marks it as being an MXBean. This should be allowed by the IdentifierName 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.

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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant