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
JavadocVariableCheck: explain token in documentation #12134
Comments
This was not handled/discussed in #7602 (documentation update) . Since the check first introduced in 5922229 , Acceptable tokens was added at abe2b20 and both tokens were specified as default and acceptable. However, there was no definition of required at the time. Truthfully, there was never any required tokens by default as seen at:
It wasn't until Issue #655 where The 2 tokens control validating fields and validating enumeration constants respectively. Tokens like this, where a single token is listed in the acceptable and default required documentation tables can be "removed". The only way to do this is to define properties as the list of required tokens. The required tokens for this check is |
IMO, I think this check has expanded such that it should be customizable to disable/enable either one of the tokens or both. It is like JavadocMethod where multiple token combinations can be used depending on what you want to validate. In addition, our table documentation doesn't make it clear what the other token to add is to disable the other. We specifically have to add documentation stating how because it is not intuitive. I think we should revert this back to no tokens are required. All tokens should be acceptable and default. @romani Let me know if this can be approved. I don't see this as breaking compatibility. |
Yes. To let user create one instance for class fields and another for enum fields. Can you describe this by CLI ? Edit from rnveach: If approved, romani considers this breaking compatibility. |
As shown above, default validates both fields and enum constants. It is possibly to validate only fields, if I wish to ignore enum constants. However, when attempting to only validate enum constants, it is still validating fields showing it is not possible to only validate enum constants. |
Identified at #3955 ,
https://checkstyle.org/config_javadoc.html#JavadocVariable_Properties
There are no examples or explanation from what ENUM_CONSTANT_DEF gives you in this check.
It is enabled by default, but what happens if you disable it, if its possible. It is also not clear how it can be disabled in configuration, which I assume involves setting the property to an empty string.
We should examine what this token does, if it should remain optional, and update the xdoc based on the findings.
The text was updated successfully, but these errors were encountered: