{"action":"created","issue":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3736","repository_url":"https://api.github.com/repos/checkstyle/checkstyle","labels_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3736/labels{/name}","comments_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3736/comments","events_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3736/events","html_url":"https://github.com/checkstyle/checkstyle/issues/3736","id":201602663,"number":3736,"title":"config: Remove redundant and incorrect rules from import control configuration","user":{"login":"jochenvdv","id":6173051,"avatar_url":"https://avatars.githubusercontent.com/u/6173051?v=3","gravatar_id":"","url":"https://api.github.com/users/jochenvdv","html_url":"https://github.com/jochenvdv","followers_url":"https://api.github.com/users/jochenvdv/followers","following_url":"https://api.github.com/users/jochenvdv/following{/other_user}","gists_url":"https://api.github.com/users/jochenvdv/gists{/gist_id}","starred_url":"https://api.github.com/users/jochenvdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jochenvdv/subscriptions","organizations_url":"https://api.github.com/users/jochenvdv/orgs","repos_url":"https://api.github.com/users/jochenvdv/repos","events_url":"https://api.github.com/users/jochenvdv/events{/privacy}","received_events_url":"https://api.github.com/users/jochenvdv/received_events","type":"User","site_admin":false},"labels":[{"id":59160289,"url":"https://api.github.com/repos/checkstyle/checkstyle/labels/approved","name":"approved","color":"009800","default":false},{"id":283458388,"url":"https://api.github.com/repos/checkstyle/checkstyle/labels/miscellaneous","name":"miscellaneous","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-01-18T15:18:51Z","updated_at":"2017-02-08T23:26:36Z","closed_at":null,"body":"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.\r\n\r\nPlease comment on how to handle these individual issues.\r\n\r\n- `java.lang.reflect` is redundantly allowed: it is listed non-locally in the top package but also under the `checks.indentation` package. Should `java.lang.reflect` be allowed anywhere? I think not, so I suggest we make it local-only in the top package (it is used in `PackageObjectFactory`) and add other local-only allowance only where needed.\r\n\r\n- `java.nio.charset.Charset` is redundantly allowed in `checks.header`: `java.nio `is already globally allowed in the top package. I assume we want to allow `java.nio` everywhere and can simply remove the redundant allow?\r\n\r\n- Thanks to #3724 we can remove allowances for imports only used in test code. This will be done in #3724 for Guava, but other unnecessary rules might also be left over. I will find them all and remove them if possible."},"comment":{"url":"https://api.github.com/repos/checkstyle/checkstyle/issues/comments/278496711","html_url":"https://github.com/checkstyle/checkstyle/issues/3736#issuecomment-278496711","issue_url":"https://api.github.com/repos/checkstyle/checkstyle/issues/3736","id":278496711,"user":{"login":"romani","id":812984,"avatar_url":"https://avatars.githubusercontent.com/u/812984?v=3","gravatar_id":"","url":"https://api.github.com/users/romani","html_url":"https://github.com/romani","followers_url":"https://api.github.com/users/romani/followers","following_url":"https://api.github.com/users/romani/following{/other_user}","gists_url":"https://api.github.com/users/romani/gists{/gist_id}","starred_url":"https://api.github.com/users/romani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romani/subscriptions","organizations_url":"https://api.github.com/users/romani/orgs","repos_url":"https://api.github.com/users/romani/repos","events_url":"https://api.github.com/users/romani/events{/privacy}","received_events_url":"https://api.github.com/users/romani/received_events","type":"User","site_admin":false},"created_at":"2017-02-08T23:26:35Z","updated_at":"2017-02-08T23:26:35Z","body":"@jochenvdv , sorry for delay.\r\n\r\n> line 81: checks package allowed in checks package :dizzy_face:, let's remove this useless rule\r\n\r\n:) , ok to remove.\r\n\r\n> line 61:java.text allowed in api package, maybe this should be limited to the MessageFormat class (only one used) and made local-only?\r\n\r\nin api in mandatory to be as strict as possible.\r\n\r\n> line 60: java.beans is only used in AutomaticBean (only java.beans.PropertyDescriptor), I suggest to only allow this class locally\r\n\r\nyes.\r\n\r\n> line 9: org.antlr.v4.runtime is only required in checkstyle and api packages (in one class each), maybe this allowance can be made more specific instead of global?\r\n\r\nhas to be limited as much as possible. should not be present in API, but we will address this in checkstyle8.\r\n\r\n> line 82: Definitions only used once locally, can be made local-only\r\n\r\nplease do\r\n\r\n> line 80: java.math only used in checks.metrics but allowed in all checks, let's limit it to metrics?\r\n\r\nlets 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 ?\r\n\r\n> line 117: only WeakReference is used, we can limit it to this class only\r\n\r\nyes\r\n\r\n\r\n> line 70-71: Utils class no longer exists?\r\n\r\nyes, please remove. I removed Utils from API a while ago, this is old stuff.\r\n\r\n> 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?\r\n\r\nyes, please report it."}}
{"actor":{"display_login":"romani"}}