{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/6502","labels_url":"https://api.github.com/repos/apache/spark/issues/6502/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/6502/comments","events_url":"https://api.github.com/repos/apache/spark/issues/6502/events","html_url":"https://github.com/apache/spark/pull/6502","id":82505930,"number":6502,"title":"[SPARK-3873] [build] Add style checker to enforce import ordering.","user":{"login":"vanzin","id":1694083,"avatar_url":"https://avatars.githubusercontent.com/u/1694083?v=3","gravatar_id":"","url":"https://api.github.com/users/vanzin","html_url":"https://github.com/vanzin","followers_url":"https://api.github.com/users/vanzin/followers","following_url":"https://api.github.com/users/vanzin/following{/other_user}","gists_url":"https://api.github.com/users/vanzin/gists{/gist_id}","starred_url":"https://api.github.com/users/vanzin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanzin/subscriptions","organizations_url":"https://api.github.com/users/vanzin/orgs","repos_url":"https://api.github.com/users/vanzin/repos","events_url":"https://api.github.com/users/vanzin/events{/privacy}","received_events_url":"https://api.github.com/users/vanzin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-05-29T17:03:59Z","updated_at":"2015-09-16T19:06:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/6502","html_url":"https://github.com/apache/spark/pull/6502","diff_url":"https://github.com/apache/spark/pull/6502.diff","patch_url":"https://github.com/apache/spark/pull/6502.patch"},"body":"The checker tries to follow as closely as possible the guidelines of\r\nthe code style document, and makes some decisions where the guide is\r\nnot clear. In particular:\r\n\r\n- wildcard imports come first when there are other imports in the\r\n  same package\r\n- multi-import blocks come before single imports\r\n- lower-case names inside multi-import blocks come before others\r\n\r\nIn some projects, such as graphx, there seems to be a convention to\r\nseparate o.a.s imports from the project's own; to simplify the\r\nchecker, I chose not to allow that, which is a strict interpretation\r\nof the code style guide, even though I think it makes sense.\r\n\r\nSince the checks are based on syntax only, some edge cases may\r\ngenerate spurious warnings; for example, when class names start\r\nwith a lower case letter (and are thus treated as a package name\r\nby the checker).\r\n\r\nThe checker is currently only generating warnings, and since there\r\nare many of those, the build output does get a little noisy. The\r\nidea is to fix the code (and the checker, as needed) little by little\r\ninstead of having a huge change that touches everywhere."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/140845453","html_url":"https://github.com/apache/spark/pull/6502#issuecomment-140845453","issue_url":"https://api.github.com/repos/apache/spark/issues/6502","id":140845453,"user":{"login":"JoshRosen","id":50748,"avatar_url":"https://avatars.githubusercontent.com/u/50748?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshRosen","html_url":"https://github.com/JoshRosen","followers_url":"https://api.github.com/users/JoshRosen/followers","following_url":"https://api.github.com/users/JoshRosen/following{/other_user}","gists_url":"https://api.github.com/users/JoshRosen/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshRosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshRosen/subscriptions","organizations_url":"https://api.github.com/users/JoshRosen/orgs","repos_url":"https://api.github.com/users/JoshRosen/repos","events_url":"https://api.github.com/users/JoshRosen/events{/privacy}","received_events_url":"https://api.github.com/users/JoshRosen/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T19:06:42Z","updated_at":"2015-09-16T19:06:42Z","body":"Can you comment on https://github.com/scalastyle/scalastyle/pull/154 to voice your support for a new Scalastyle release? The delays in getting new Scalastyle and Scalastyle-SBT versions published are causing a lot of pain for folks running Scala 2.10.5+, since the current master also contains bugfixes for a Scalariform parser issue."}}