{"action":"opened","issue":{"url":"https://api.github.com/repos/scalameta/sbt-scalafmt/issues/2","repository_url":"https://api.github.com/repos/scalameta/sbt-scalafmt","labels_url":"https://api.github.com/repos/scalameta/sbt-scalafmt/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/scalameta/sbt-scalafmt/issues/2/comments","events_url":"https://api.github.com/repos/scalameta/sbt-scalafmt/issues/2/events","html_url":"https://github.com/scalameta/sbt-scalafmt/issues/2","id":331004626,"node_id":"MDU6SXNzdWUzMzEwMDQ2MjY=","number":2,"title":"Automatically run scalafmtSbt on reload","user":{"login":"olafurpg","id":1408093,"node_id":"MDQ6VXNlcjE0MDgwOTM=","avatar_url":"https://avatars0.githubusercontent.com/u/1408093?v=4","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":[{"id":960620717,"node_id":"MDU6TGFiZWw5NjA2MjA3MTc=","url":"https://api.github.com/repos/scalameta/sbt-scalafmt/labels/help%20wanted","name":"help wanted","color":"008672","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-10T21:36:33Z","updated_at":"2018-06-10T21:36:33Z","closed_at":null,"author_association":"MEMBER","body":"Originally reported by @ches in  https://github.com/scalameta/scalafmt/issues/1208\r\n\r\n- **Version**: 1.6.0-RC1\r\n- **Integration**: sbt-scalafmt\r\n\r\n## Problem\r\n\r\nsbt-scalafmt can keep project source formatted with `scalafmtOnCompile`, but needs a separate step of `scalafmtSbt` to maintain formatting of the build too.\r\n\r\nThrough [some tricks], neo-sbt-scalafmt made it possible to have automatic formatting of sbt build files when sbt (re)loaded, if `scalafmtOnCompile := true` was set in the root and the meta build e.g. `project/build.sbt`.\r\n\r\n## Expectation\r\n\r\nA means of keeping build files in compliance with project standards without need to remember a separate `scalafmtSbt`, or frustrating contributors with `scalafmtSbtCheck` failing CI.\r\n\r\n## Workaround\r\n\r\nI haven't played around with `onLoad` to try to get something working with the current plugin yet, I'll share if something pans out.\r\n\r\n## Notes\r\n\r\nI can understand if sbt-scalafmt maintainers don't feel this is worthwhile and want to close it. It's a nice-to-have after getting used to it with the neo plugin.\r\n\r\n[some tricks]: https://github.com/lucidsoftware/neo-sbt-scalafmt/blob/8f23d95322806c5fd7679b5a49a9c6b8e24416ac/sbt-scalafmt/src/main/scala/com/lucidchart/sbt/scalafmt/ScalafmtSbtPlugin.scala"}}
{"actor":{"display_login":"olafurpg"}}