payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mwz/sonar-scala/pulls/comments/270026599","pull_request_review_id":220051140,"id":270026599,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3MDAyNjU5OQ==","diff_hunk":"@@ -20,7 +20,7 @@ package scapegoat\n \n import org.sonar.api.batch.rule.Severity\n \n-private[scapegoat] sealed trait Level {\n+private[scapegoat] sealed trait Level extends Product with Serializable {","path":"project/src/main/resources/ScapegoatInspections.scala","position":5,"original_position":5,"commit_id":"b48960690b9ffbdb1f647b743783a73b73be3b1e","original_commit_id":"b48960690b9ffbdb1f647b743783a73b73be3b1e","user":{"login":"mwz","id":1190768,"node_id":"MDQ6VXNlcjExOTA3Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/1190768?v=4","gravatar_id":"","url":"https://api.github.com/users/mwz","html_url":"https://github.com/mwz","followers_url":"https://api.github.com/users/mwz/followers","following_url":"https://api.github.com/users/mwz/following{/other_user}","gists_url":"https://api.github.com/users/mwz/gists{/gist_id}","starred_url":"https://api.github.com/users/mwz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwz/subscriptions","organizations_url":"https://api.github.com/users/mwz/orgs","repos_url":"https://api.github.com/users/mwz/repos","events_url":"https://api.github.com/users/mwz/events{/privacy}","received_events_url":"https://api.github.com/users/mwz/received_events","type":"User","site_admin":false},"body":"Tbh, I've never seen before anyone else do it and I think the problem goes away when you explicitly give types to your values, which is what I tend to do and that's probably why I've never run into this issue. But let's keep it if that's your preference.","created_at":"2019-03-28T14:21:30Z","updated_at":"2019-03-28T14:21:30Z","html_url":"https://github.com/mwz/sonar-scala/pull/172#discussion_r270026599","pull_request_url":"https://api.github.com/repos/mwz/sonar-scala/pulls/172","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/mwz/sonar-scala/pulls/comments/270026599"},"html":{"href":"https://github.com/mwz/sonar-scala/pull/172#discussion_r270026599"},"pull_request":{"href":"https://api.github.com/repos/mwz/sonar-scala/pulls/172"}},"in_reply_to_id":269780589},"pull_request":{"url":"https://api.github.com/repos/mwz/sonar-scala/pulls/172","id":259734643,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU5NzM0NjQz","html_url":"https://github.com/mwz/sonar-scala/pull/172","diff_url":"https://github.com/mwz/sonar-scala/pull/172.diff","patch_url":"https://github.com/mwz/sonar-scala/pull/172.patch","issue_url":"https://api.github.com/repos/mwz/sonar-scala/issues/172","number":172,"state":"open","locked":false,"title":"WIP: Adding cache to Scapegoat & Scalastyle Inspections Generator Tasks","user":{"login":"BalmungSan","id":11336950,"node_id":"MDQ6VXNlcjExMzM2OTUw","avatar_url":"https://avatars2.githubusercontent.com/u/11336950?v=4","gravatar_id":"","url":"https://api.github.com/users/BalmungSan","html_url":"https://github.com/BalmungSan","followers_url":"https://api.github.com/users/BalmungSan/followers","following_url":"https://api.github.com/users/BalmungSan/following{/other_user}","gists_url":"https://api.github.com/users/BalmungSan/gists{/gist_id}","starred_url":"https://api.github.com/users/BalmungSan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BalmungSan/subscriptions","organizations_url":"https://api.github.com/users/BalmungSan/orgs","repos_url":"https://api.github.com/users/BalmungSan/repos","events_url":"https://api.github.com/users/BalmungSan/events{/privacy}","received_events_url":"https://api.github.com/users/BalmungSan/received_events","type":"User","site_admin":false},"body":"Ok so, being honest I am doing this more like a PoC, because I think I will need this in my project at the office. Since it does not bring too much value to this project.\r\n\r\nNevertheless I rather doing it here to share it, than keeping it to myself.\r\nHope you _(and anybody checking the repo in the future)_ will find it useful 😉 \r\n\r\nFor now I had only done it for the **Scapegoat** _task_.\r\nI just tested it, and it works as intended: On consequent calls to `compile`  it does not re-run the task :D\r\n\r\nI think I can easily replicate the work for the **Scalastyle** _task_.\r\nHowever, I do not know if it will work as intended, since the template file is part of the main sources. Then, a change on such file should only had effect after a `reload` of **SBT**.\r\n\r\nSo this serves as the excuse to bring up and old discussion related with the generator tasks.\r\nI think that the template files should be on the resources folder, instead of on the scala folder. That way, we can mark all, but the `ScalastyleInspections` object, as `private[scalastyle]`.\r\nAlthough, having them in the source, allows to write more typesafe tests, instead of the _\"String checks\"_ I had for the `ScapegoatInspectionsGenerator`.\r\n\r\nThus, I do not know if there is a way _(maybe using scala-meta)_ to keep the templates as resources. But, having typesafe tests.\r\nOr, since the generated files become part of the main project, we may move those tests to the main project. And in the meta-project, just keep a couple of simple tests to verify the generation logic.","created_at":"2019-03-10T04:26:26Z","updated_at":"2019-03-28T14:21:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2a830a7cd998287b0ddb921b55a24d6841fe796","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mwz/sonar-scala/pulls/172/commits","review_comments_url":"https://api.github.com/repos/mwz/sonar-scala/pulls/172/comments","review_comment_url":"https://api.github.com/repos/mwz/sonar-scala/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mwz/sonar-scala/issues/172/comments","statuses_url":"https://api.github.com/repos/mwz/sonar-scala/statuses/b48960690b9ffbdb1f647b743783a73b73be3b1e","head":{"label":"BalmungSan:cache-source-generators","ref":"cache-source-generators","sha":"b48960690b9ffbdb1f647b743783a73b73be3b1e","user":{"login":"BalmungSan","id":11336950,"node_id":"MDQ6VXNlcjExMzM2OTUw","avatar_url":"https://avatars2.githubusercontent.com/u/11336950?v=4","gravatar_id":"","url":"https://api.github.com/users/BalmungSan","html_url":"https://github.com/BalmungSan","followers_url":"https://api.github.com/users/BalmungSan/followers","following_url":"https://api.github.com/users/BalmungSan/following{/other_user}","gists_url":"https://api.github.com/users/BalmungSan/gists{/gist_id}","starred_url":"https://api.github.com/users/BalmungSan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BalmungSan/subscriptions","organizations_url":"https://api.github.com/users/BalmungSan/orgs","repos_url":"https://api.github.com/users/BalmungSan/repos","events_url":"https://api.github.com/users/BalmungSan/events{/privacy}","received_events_url":"https://api.github.com/users/BalmungSan/received_events","type":"User","site_admin":false},"repo":{"id":122070729,"node_id":"MDEwOlJlcG9zaXRvcnkxMjIwNzA3Mjk=","name":"sonar-scala","full_name":"BalmungSan/sonar-scala","private":false,"owner":{"login":"BalmungSan","id":11336950,"node_id":"MDQ6VXNlcjExMzM2OTUw","avatar_url":"https://avatars2.githubusercontent.com/u/11336950?v=4","gravatar_id":"","url":"https://api.github.com/users/BalmungSan","html_url":"https://github.com/BalmungSan","followers_url":"https://api.github.com/users/BalmungSan/followers","following_url":"https://api.github.com/users/BalmungSan/following{/other_user}","gists_url":"https://api.github.com/users/BalmungSan/gists{/gist_id}","starred_url":"https://api.github.com/users/BalmungSan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BalmungSan/subscriptions","organizations_url":"https://api.github.com/users/BalmungSan/orgs","repos_url":"https://api.github.com/users/BalmungSan/repos","events_url":"https://api.github.com/users/BalmungSan/events{/privacy}","received_events_url":"https://api.github.com/users/BalmungSan/received_events","type":"User","site_admin":false},"html_url":"https://github.com/BalmungSan/sonar-scala","description":"SonarQube plugin for static code analysis of Scala projects.","fork":true,"url":"https://api.github.com/repos/BalmungSan/sonar-scala","forks_url":"https://api.github.com/repos/BalmungSan/sonar-scala/forks","keys_url":"https://api.github.com/repos/BalmungSan/sonar-scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BalmungSan/sonar-scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BalmungSan/sonar-scala/teams","hooks_url":"https://api.github.com/repos/BalmungSan/sonar-scala/hooks","issue_events_url":"https://api.github.com/repos/BalmungSan/sonar-scala/issues/events{/number}","events_url":"https://api.github.com/repos/BalmungSan/sonar-scala/events","assignees_url":"https://api.github.com/repos/BalmungSan/sonar-scala/assignees{/user}","branches_url":"https://api.github.com/repos/BalmungSan/sonar-scala/branches{/branch}","tags_url":"https://api.github.com/repos/BalmungSan/sonar-scala/tags","blobs_url":"https://api.github.com/repos/BalmungSan/sonar-scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BalmungSan/sonar-scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BalmungSan/sonar-scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/BalmungSan/sonar-scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BalmungSan/sonar-scala/statuses/{sha}","languages_url":"https://api.github.com/repos/BalmungSan/sonar-scala/languages","stargazers_url":"https://api.github.com/repos/BalmungSan/sonar-scala/stargazers","contributors_url":"https://api.github.com/repos/BalmungSan/sonar-scala/contributors","subscribers_url":"https://api.github.com/repos/BalmungSan/sonar-scala/subscribers","subscription_url":"https://api.github.com/repos/BalmungSan/sonar-scala/subscription","commits_url":"https://api.github.com/repos/BalmungSan/sonar-scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/BalmungSan/sonar-scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/BalmungSan/sonar-scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/BalmungSan/sonar-scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/BalmungSan/sonar-scala/contents/{+path}","compare_url":"https://api.github.com/repos/BalmungSan/sonar-scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BalmungSan/sonar-scala/merges","archive_url":"https://api.github.com/repos/BalmungSan/sonar-scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BalmungSan/sonar-scala/downloads","issues_url":"https://api.github.com/repos/BalmungSan/sonar-scala/issues{/number}","pulls_url":"https://api.github.com/repos/BalmungSan/sonar-scala/pulls{/number}","milestones_url":"https://api.github.com/repos/BalmungSan/sonar-scala/milestones{/number}","notifications_url":"https://api.github.com/repos/BalmungSan/sonar-scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BalmungSan/sonar-scala/labels{/name}","releases_url":"https://api.github.com/repos/BalmungSan/sonar-scala/releases{/id}","deployments_url":"https://api.github.com/repos/BalmungSan/sonar-scala/deployments","created_at":"2018-02-19T14:03:19Z","updated_at":"2019-03-26T21:50:26Z","pushed_at":"2019-03-27T20:02:02Z","git_url":"git://github.com/BalmungSan/sonar-scala.git","ssh_url":"git@github.com:BalmungSan/sonar-scala.git","clone_url":"https://github.com/BalmungSan/sonar-scala.git","svn_url":"https://github.com/BalmungSan/sonar-scala","homepage":"","size":1303,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mwz:master","ref":"master","sha":"5d605600ffc2c00c7b24ceab5ad6deddba836451","user":{"login":"mwz","id":1190768,"node_id":"MDQ6VXNlcjExOTA3Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/1190768?v=4","gravatar_id":"","url":"https://api.github.com/users/mwz","html_url":"https://github.com/mwz","followers_url":"https://api.github.com/users/mwz/followers","following_url":"https://api.github.com/users/mwz/following{/other_user}","gists_url":"https://api.github.com/users/mwz/gists{/gist_id}","starred_url":"https://api.github.com/users/mwz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwz/subscriptions","organizations_url":"https://api.github.com/users/mwz/orgs","repos_url":"https://api.github.com/users/mwz/repos","events_url":"https://api.github.com/users/mwz/events{/privacy}","received_events_url":"https://api.github.com/users/mwz/received_events","type":"User","site_admin":false},"repo":{"id":118381706,"node_id":"MDEwOlJlcG9zaXRvcnkxMTgzODE3MDY=","name":"sonar-scala","full_name":"mwz/sonar-scala","private":false,"owner":{"login":"mwz","id":1190768,"node_id":"MDQ6VXNlcjExOTA3Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/1190768?v=4","gravatar_id":"","url":"https://api.github.com/users/mwz","html_url":"https://github.com/mwz","followers_url":"https://api.github.com/users/mwz/followers","following_url":"https://api.github.com/users/mwz/following{/other_user}","gists_url":"https://api.github.com/users/mwz/gists{/gist_id}","starred_url":"https://api.github.com/users/mwz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwz/subscriptions","organizations_url":"https://api.github.com/users/mwz/orgs","repos_url":"https://api.github.com/users/mwz/repos","events_url":"https://api.github.com/users/mwz/events{/privacy}","received_events_url":"https://api.github.com/users/mwz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mwz/sonar-scala","description":"SonarQube plugin for static code analysis of Scala projects.","fork":false,"url":"https://api.github.com/repos/mwz/sonar-scala","forks_url":"https://api.github.com/repos/mwz/sonar-scala/forks","keys_url":"https://api.github.com/repos/mwz/sonar-scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwz/sonar-scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwz/sonar-scala/teams","hooks_url":"https://api.github.com/repos/mwz/sonar-scala/hooks","issue_events_url":"https://api.github.com/repos/mwz/sonar-scala/issues/events{/number}","events_url":"https://api.github.com/repos/mwz/sonar-scala/events","assignees_url":"https://api.github.com/repos/mwz/sonar-scala/assignees{/user}","branches_url":"https://api.github.com/repos/mwz/sonar-scala/branches{/branch}","tags_url":"https://api.github.com/repos/mwz/sonar-scala/tags","blobs_url":"https://api.github.com/repos/mwz/sonar-scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwz/sonar-scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwz/sonar-scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwz/sonar-scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwz/sonar-scala/statuses/{sha}","languages_url":"https://api.github.com/repos/mwz/sonar-scala/languages","stargazers_url":"https://api.github.com/repos/mwz/sonar-scala/stargazers","contributors_url":"https://api.github.com/repos/mwz/sonar-scala/contributors","subscribers_url":"https://api.github.com/repos/mwz/sonar-scala/subscribers","subscription_url":"https://api.github.com/repos/mwz/sonar-scala/subscription","commits_url":"https://api.github.com/repos/mwz/sonar-scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwz/sonar-scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwz/sonar-scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwz/sonar-scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/mwz/sonar-scala/contents/{+path}","compare_url":"https://api.github.com/repos/mwz/sonar-scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwz/sonar-scala/merges","archive_url":"https://api.github.com/repos/mwz/sonar-scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwz/sonar-scala/downloads","issues_url":"https://api.github.com/repos/mwz/sonar-scala/issues{/number}","pulls_url":"https://api.github.com/repos/mwz/sonar-scala/pulls{/number}","milestones_url":"https://api.github.com/repos/mwz/sonar-scala/milestones{/number}","notifications_url":"https://api.github.com/repos/mwz/sonar-scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwz/sonar-scala/labels{/name}","releases_url":"https://api.github.com/repos/mwz/sonar-scala/releases{/id}","deployments_url":"https://api.github.com/repos/mwz/sonar-scala/deployments","created_at":"2018-01-21T23:04:15Z","updated_at":"2019-03-25T22:39:56Z","pushed_at":"2019-03-27T20:02:03Z","git_url":"git://github.com/mwz/sonar-scala.git","ssh_url":"git@github.com:mwz/sonar-scala.git","clone_url":"https://github.com/mwz/sonar-scala.git","svn_url":"https://github.com/mwz/sonar-scala","homepage":"","size":1318,"stargazers_count":51,"watchers_count":51,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":16,"open_issues":27,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mwz/sonar-scala/pulls/172"},"html":{"href":"https://github.com/mwz/sonar-scala/pull/172"},"issue":{"href":"https://api.github.com/repos/mwz/sonar-scala/issues/172"},"comments":{"href":"https://api.github.com/repos/mwz/sonar-scala/issues/172/comments"},"review_comments":{"href":"https://api.github.com/repos/mwz/sonar-scala/pulls/172/comments"},"review_comment":{"href":"https://api.github.com/repos/mwz/sonar-scala/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mwz/sonar-scala/pulls/172/commits"},"statuses":{"href":"https://api.github.com/repos/mwz/sonar-scala/statuses/b48960690b9ffbdb1f647b743783a73b73be3b1e"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"mwz"}}