{"action":"created","issue":{"url":"https://api.github.com/repos/scalastyle/scalastyle-sbt-plugin/issues/11","repository_url":"https://api.github.com/repos/scalastyle/scalastyle-sbt-plugin","labels_url":"https://api.github.com/repos/scalastyle/scalastyle-sbt-plugin/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/scalastyle/scalastyle-sbt-plugin/issues/11/comments","events_url":"https://api.github.com/repos/scalastyle/scalastyle-sbt-plugin/issues/11/events","html_url":"https://github.com/scalastyle/scalastyle-sbt-plugin/issues/11","id":22282239,"node_id":"MDU6SXNzdWUyMjI4MjIzOQ==","number":11,"title":"How to run scalastyle automatically on compile?","user":{"login":"velvia","id":1062875,"node_id":"MDQ6VXNlcjEwNjI4NzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1062875?v=4","gravatar_id":"","url":"https://api.github.com/users/velvia","html_url":"https://github.com/velvia","followers_url":"https://api.github.com/users/velvia/followers","following_url":"https://api.github.com/users/velvia/following{/other_user}","gists_url":"https://api.github.com/users/velvia/gists{/gist_id}","starred_url":"https://api.github.com/users/velvia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/velvia/subscriptions","organizations_url":"https://api.github.com/users/velvia/orgs","repos_url":"https://api.github.com/users/velvia/repos","events_url":"https://api.github.com/users/velvia/events{/privacy}","received_events_url":"https://api.github.com/users/velvia/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2013-11-07T17:31:37Z","updated_at":"2018-07-30T01:45:38Z","closed_at":"2014-04-18T06:51:51Z","author_association":"NONE","body":"Sorry this is more of a question.   How do I modify my build file so that I can get scalastyle on run on every compile?  I tried this, but it doesn't work:\n\n```\n  compile in Compile <<= (compile in Compile) dependsOn(\n     org.scalastyle.sbt.Tasks.scalastyle)\n```\n\nIt throws this:\n\n```\n<console>:65: error: type mismatch;\n found   : sbt.Project.Initialize[sbt.InputTask[Unit]]\n required: sbt.Scoped.AnyInitTask\n              compile in Compile <<= (compile in Compile) dependsOn(Tasks.scalastyle)\n```\n\nI tried to get around this by casting scalastyle task to `sbt.Scoped.AnyInitTask` but this fails with a CastException.\n\nAny other ideas?\n"},"comment":{"url":"https://api.github.com/repos/scalastyle/scalastyle-sbt-plugin/issues/comments/408724260","html_url":"https://github.com/scalastyle/scalastyle-sbt-plugin/issues/11#issuecomment-408724260","issue_url":"https://api.github.com/repos/scalastyle/scalastyle-sbt-plugin/issues/11","id":408724260,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODcyNDI2MA==","user":{"login":"asarkar","id":1302775,"node_id":"MDQ6VXNlcjEzMDI3NzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1302775?v=4","gravatar_id":"","url":"https://api.github.com/users/asarkar","html_url":"https://github.com/asarkar","followers_url":"https://api.github.com/users/asarkar/followers","following_url":"https://api.github.com/users/asarkar/following{/other_user}","gists_url":"https://api.github.com/users/asarkar/gists{/gist_id}","starred_url":"https://api.github.com/users/asarkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asarkar/subscriptions","organizations_url":"https://api.github.com/users/asarkar/orgs","repos_url":"https://api.github.com/users/asarkar/repos","events_url":"https://api.github.com/users/asarkar/events{/privacy}","received_events_url":"https://api.github.com/users/asarkar/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T01:45:37Z","updated_at":"2018-07-30T01:45:37Z","author_association":"NONE","body":"How to make scalastyle depend on test (or compile), not the other way round? Syntax shown by @yongjunj doesn't work with SBT 1.x"}}
{"actor":{"display_login":"asarkar"}}