Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
config: Remove redundant and incorrect rules from import control configuration #3736
The import control configuration has become a bit out of sync and has to be updated in several places. I will list the issues here as I go through the configuration and find more.
Please comment on how to handle these individual issues.
approved. no violations with
global level should be lowered, not all need this imports, fix is
referenced this issue
Jan 21, 2017
We need to make some rules about the import control file and clean it up.
I am willing to go over all the rules and make them consistent, but I am not completely familiar with how they should be done.
I would love to clean up this, you can start work by any means, I will share my thoughts and guide you.
One more issue that will help is ability to enforce import control for certain files not whole package , we already have issue on this somewhere. It will help to make a fence around Classes that are unusual and allow certain imports only in them. Example: allowance of reflection in our code, it is allowed only in certain classes. But not enforced :( .
Some more issues, most of them are rules that I think can be made more restrictive:
line 20: this rule makes many other allowances of checkstyle subpackages unnecessary (e.g line 62 - 73 is redundant) since it simply allows everything from
For example, with line 20 changed to only allow
It seems that there is a problem with nested classes, they raise a violation even if they come from the same package. Is this a bug?
@jochenvdv , sorry for delay.
:) , ok to remove.
in api in mandatory to be as strict as possible.
has to be limited as much as possible. should not be present in API, but we will address this in checkstyle8.
lets keep it, math package has some good utils that might be useful. I do not see design harm from usage of this package. Do you see problems ?
yes, please remove. I removed Utils from API a while ago, this is old stuff.
yes, please report it.
Please comment on this, I think you forgot. It is a problem irrelevant of that bug.
Thanks for your input, I will fix these issues this weekend, as well as investigate/report that bug.
we need to remove that global allowance. Even