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
ImportOrder: tokens property should be not customizable, move STATIC_IMPORT to required tokens #12145
Comments
This is looking similar to #3955 (comment) ,
kens 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 Basically not adding Example.
Behavior with
Notice the validation of the file with the STATIC_IMPORT changed one of the violations. However, if I remove statics imports completely, which one would assume should be the same as removing the token, then the violations that come up are not the same as the one with the token removed.
|
Similar to #3955 , I also feel allowing |
Behavior without |
fix is merged. I changed label to be bug, as user can continue to use his config. |
Identified at #3955 ,
https://checkstyle.org/config_imports.html#ImportOrder_Properties
There are no examples or explanation from what STATIC_IMPORT 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.
User Migration
As all tokens were made required, users can either remove the
tokens
property for the check. Leaving it alone will also have no side effects as there is no way to override required tokens.The text was updated successfully, but these errors were encountered: