{"action":"created","issue":{"url":"https://api.github.com/repos/scalacenter/scalafix/issues/248","repository_url":"https://api.github.com/repos/scalacenter/scalafix","labels_url":"https://api.github.com/repos/scalacenter/scalafix/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/scalacenter/scalafix/issues/248/comments","events_url":"https://api.github.com/repos/scalacenter/scalafix/issues/248/events","html_url":"https://github.com/scalacenter/scalafix/pull/248","id":242697921,"number":248,"title":"Implement crude MoveSymbol patch.","user":{"login":"olafurpg","id":1408093,"avatar_url":"https://avatars3.githubusercontent.com/u/1408093?v=3","gravatar_id":"","url":"https://api.github.com/users/olafurpg","html_url":"https://github.com/olafurpg","followers_url":"https://api.github.com/users/olafurpg/followers","following_url":"https://api.github.com/users/olafurpg/following{/other_user}","gists_url":"https://api.github.com/users/olafurpg/gists{/gist_id}","starred_url":"https://api.github.com/users/olafurpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olafurpg/subscriptions","organizations_url":"https://api.github.com/users/olafurpg/orgs","repos_url":"https://api.github.com/users/olafurpg/repos","events_url":"https://api.github.com/users/olafurpg/events{/privacy}","received_events_url":"https://api.github.com/users/olafurpg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-13T13:18:05Z","updated_at":"2017-07-13T13:35:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scalacenter/scalafix/pulls/248","html_url":"https://github.com/scalacenter/scalafix/pull/248","diff_url":"https://github.com/scalacenter/scalafix/pull/248.diff","patch_url":"https://github.com/scalacenter/scalafix/pull/248.patch"},"body":"This patch can be used to move or rename call-sites of a global\r\ndefinition like a class, trait, object or static def. This\r\nimplementation is crude, it is likely produce invalid code in many\r\ncases. The patch tries to preserve the prefix when possible. For\r\nexample:\r\n\r\n```\r\n// config\r\nfrom = a.b.c\r\nto = d.b.x\r\n// code before\r\nimport a.b.c\r\nimport a.b\r\nb.c\r\nc\r\n// code after\r\nimport a.b\r\nimport d.b\r\nimport d.b.x\r\nb.x\r\nx\r\n```\r\n\r\nRoom for improvement:\r\n\r\n- Observe that `import a.b` is not removed as it may be used to prefix\r\n  other identifiers from the `a.b.` package. It should be possible to\r\n  remove the imports if its not used elsewhere.\r\n- It's possible that duplicate imports are added, for example if\r\n  the source contains `import a.b_` then scalafix may still add\r\n  redundant `import a.b.c`.\r\n- Imports are always inserted fully qualified at the bottom of the\r\n  global imports list. It might be nice if it handled\r\n  - imports grouped by curly braces\r\n  - import sorting\r\n  - local imports"},"comment":{"url":"https://api.github.com/repos/scalacenter/scalafix/issues/comments/315079345","html_url":"https://github.com/scalacenter/scalafix/pull/248#issuecomment-315079345","issue_url":"https://api.github.com/repos/scalacenter/scalafix/issues/248","id":315079345,"user":{"login":"olafurpg","id":1408093,"avatar_url":"https://avatars3.githubusercontent.com/u/1408093?v=3","gravatar_id":"","url":"https://api.github.com/users/olafurpg","html_url":"https://github.com/olafurpg","followers_url":"https://api.github.com/users/olafurpg/followers","following_url":"https://api.github.com/users/olafurpg/following{/other_user}","gists_url":"https://api.github.com/users/olafurpg/gists{/gist_id}","starred_url":"https://api.github.com/users/olafurpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olafurpg/subscriptions","organizations_url":"https://api.github.com/users/olafurpg/orgs","repos_url":"https://api.github.com/users/olafurpg/repos","events_url":"https://api.github.com/users/olafurpg/events{/privacy}","received_events_url":"https://api.github.com/users/olafurpg/received_events","type":"User","site_admin":false},"created_at":"2017-07-13T13:35:02Z","updated_at":"2017-07-13T13:35:02Z","body":"This implementation needs more battle testing, but I'm gonna go ahead and merge it to unblock v0.5."}}
{"actor":{"display_login":"olafurpg"}}