{"action":"created","comment":{"url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/comments/25700489","id":25700489,"diff_hunk":"@@ -80,4 +80,22 @@ object IOUtils {\n     }\n     acc\n   }\n+\n+  /**\n+   * Converts absolute path to relative one if any of the source directories is it's parent.\n+   * If there is no parent directory, the path is returned unchanged (absolute).\n+   * \n+   * @param src absolute file path in canonical form\n+   * @param sourcePaths absolute source paths in canonical form WITH trailing file separators\n+   */\n+  def relativeSource(src: String, sourcePaths: Seq[String]): String = {\n+    val sourceRoot: Option[String] = sourcePaths.find(\n+      sourcePath => src.startsWith(sourcePath)\n+    )\n+    sourceRoot match {\n+      case Some(path: String) => src.replace(path, \"\")\n+      case _ => throw new RuntimeException(s\"No source root found for '$src'\"); //TODO Change exception class","path":"scalac-scoverage-plugin/src/main/scala/scoverage/IOUtils.scala","position":18,"original_position":18,"commit_id":"88c35e294e032914cfba53a32c1dac67864a6e19","original_commit_id":"88c35e294e032914cfba53a32c1dac67864a6e19","user":{"login":"gslowikowski","id":219863,"avatar_url":"https://avatars.githubusercontent.com/u/219863?v=3","gravatar_id":"","url":"https://api.github.com/users/gslowikowski","html_url":"https://github.com/gslowikowski","followers_url":"https://api.github.com/users/gslowikowski/followers","following_url":"https://api.github.com/users/gslowikowski/following{/other_user}","gists_url":"https://api.github.com/users/gslowikowski/gists{/gist_id}","starred_url":"https://api.github.com/users/gslowikowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gslowikowski/subscriptions","organizations_url":"https://api.github.com/users/gslowikowski/orgs","repos_url":"https://api.github.com/users/gslowikowski/repos","events_url":"https://api.github.com/users/gslowikowski/events{/privacy}","received_events_url":"https://api.github.com/users/gslowikowski/received_events","type":"User","site_admin":false},"body":"I didn't want to decide what exception will be the best :)","created_at":"2015-03-03T16:17:15Z","updated_at":"2015-03-03T16:17:15Z","html_url":"https://github.com/scoverage/scalac-scoverage-plugin/pull/109#discussion_r25700489","pull_request_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/comments/25700489"},"html":{"href":"https://github.com/scoverage/scalac-scoverage-plugin/pull/109#discussion_r25700489"},"pull_request":{"href":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/109","id":30386150,"html_url":"https://github.com/scoverage/scalac-scoverage-plugin/pull/109","diff_url":"https://github.com/scoverage/scalac-scoverage-plugin/pull/109.diff","patch_url":"https://github.com/scoverage/scalac-scoverage-plugin/pull/109.patch","issue_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/issues/109","number":109,"state":"open","locked":false,"title":"Support multiple source roots in report generators (issue #104)","user":{"login":"gslowikowski","id":219863,"avatar_url":"https://avatars.githubusercontent.com/u/219863?v=3","gravatar_id":"","url":"https://api.github.com/users/gslowikowski","html_url":"https://github.com/gslowikowski","followers_url":"https://api.github.com/users/gslowikowski/followers","following_url":"https://api.github.com/users/gslowikowski/following{/other_user}","gists_url":"https://api.github.com/users/gslowikowski/gists{/gist_id}","starred_url":"https://api.github.com/users/gslowikowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gslowikowski/subscriptions","organizations_url":"https://api.github.com/users/gslowikowski/orgs","repos_url":"https://api.github.com/users/gslowikowski/repos","events_url":"https://api.github.com/users/gslowikowski/events{/privacy}","received_events_url":"https://api.github.com/users/gslowikowski/received_events","type":"User","site_admin":false},"body":"PR for https://github.com/scoverage/scalac-scoverage-plugin/issues/104","created_at":"2015-03-03T16:02:29Z","updated_at":"2015-03-03T16:17:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd81fe58527bbb690df5214024be00a1ff433a1f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/109/commits","review_comments_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/109/comments","review_comment_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/issues/109/comments","statuses_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/statuses/88c35e294e032914cfba53a32c1dac67864a6e19","head":{"label":"gslowikowski:issue104","ref":"issue104","sha":"88c35e294e032914cfba53a32c1dac67864a6e19","user":{"login":"gslowikowski","id":219863,"avatar_url":"https://avatars.githubusercontent.com/u/219863?v=3","gravatar_id":"","url":"https://api.github.com/users/gslowikowski","html_url":"https://github.com/gslowikowski","followers_url":"https://api.github.com/users/gslowikowski/followers","following_url":"https://api.github.com/users/gslowikowski/following{/other_user}","gists_url":"https://api.github.com/users/gslowikowski/gists{/gist_id}","starred_url":"https://api.github.com/users/gslowikowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gslowikowski/subscriptions","organizations_url":"https://api.github.com/users/gslowikowski/orgs","repos_url":"https://api.github.com/users/gslowikowski/repos","events_url":"https://api.github.com/users/gslowikowski/events{/privacy}","received_events_url":"https://api.github.com/users/gslowikowski/received_events","type":"User","site_admin":false},"repo":{"id":26631511,"name":"scalac-scoverage-plugin","full_name":"gslowikowski/scalac-scoverage-plugin","owner":{"login":"gslowikowski","id":219863,"avatar_url":"https://avatars.githubusercontent.com/u/219863?v=3","gravatar_id":"","url":"https://api.github.com/users/gslowikowski","html_url":"https://github.com/gslowikowski","followers_url":"https://api.github.com/users/gslowikowski/followers","following_url":"https://api.github.com/users/gslowikowski/following{/other_user}","gists_url":"https://api.github.com/users/gslowikowski/gists{/gist_id}","starred_url":"https://api.github.com/users/gslowikowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gslowikowski/subscriptions","organizations_url":"https://api.github.com/users/gslowikowski/orgs","repos_url":"https://api.github.com/users/gslowikowski/repos","events_url":"https://api.github.com/users/gslowikowski/events{/privacy}","received_events_url":"https://api.github.com/users/gslowikowski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gslowikowski/scalac-scoverage-plugin","description":"Scoverage Scala Code Coverage Core Libs","fork":true,"url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin","forks_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/forks","keys_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/teams","hooks_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/hooks","issue_events_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/events","assignees_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/tags","blobs_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/languages","stargazers_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/stargazers","contributors_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/contributors","subscribers_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/subscribers","subscription_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/subscription","commits_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/merges","archive_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/downloads","issues_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/labels{/name}","releases_url":"https://api.github.com/repos/gslowikowski/scalac-scoverage-plugin/releases{/id}","created_at":"2014-11-14T09:25:43Z","updated_at":"2015-02-24T17:52:20Z","pushed_at":"2015-03-03T15:37:30Z","git_url":"git://github.com/gslowikowski/scalac-scoverage-plugin.git","ssh_url":"git@github.com:gslowikowski/scalac-scoverage-plugin.git","clone_url":"https://github.com/gslowikowski/scalac-scoverage-plugin.git","svn_url":"https://github.com/gslowikowski/scalac-scoverage-plugin","homepage":"http://scoverage.org","size":5790,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scoverage:master","ref":"master","sha":"abb5ae1d669a7c2e20aa900d8bde49ca574a350b","user":{"login":"scoverage","id":5998302,"avatar_url":"https://avatars.githubusercontent.com/u/5998302?v=3","gravatar_id":"","url":"https://api.github.com/users/scoverage","html_url":"https://github.com/scoverage","followers_url":"https://api.github.com/users/scoverage/followers","following_url":"https://api.github.com/users/scoverage/following{/other_user}","gists_url":"https://api.github.com/users/scoverage/gists{/gist_id}","starred_url":"https://api.github.com/users/scoverage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scoverage/subscriptions","organizations_url":"https://api.github.com/users/scoverage/orgs","repos_url":"https://api.github.com/users/scoverage/repos","events_url":"https://api.github.com/users/scoverage/events{/privacy}","received_events_url":"https://api.github.com/users/scoverage/received_events","type":"Organization","site_admin":false},"repo":{"id":14709196,"name":"scalac-scoverage-plugin","full_name":"scoverage/scalac-scoverage-plugin","owner":{"login":"scoverage","id":5998302,"avatar_url":"https://avatars.githubusercontent.com/u/5998302?v=3","gravatar_id":"","url":"https://api.github.com/users/scoverage","html_url":"https://github.com/scoverage","followers_url":"https://api.github.com/users/scoverage/followers","following_url":"https://api.github.com/users/scoverage/following{/other_user}","gists_url":"https://api.github.com/users/scoverage/gists{/gist_id}","starred_url":"https://api.github.com/users/scoverage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scoverage/subscriptions","organizations_url":"https://api.github.com/users/scoverage/orgs","repos_url":"https://api.github.com/users/scoverage/repos","events_url":"https://api.github.com/users/scoverage/events{/privacy}","received_events_url":"https://api.github.com/users/scoverage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scoverage/scalac-scoverage-plugin","description":"Scoverage Scala Code Coverage Core Libs","fork":false,"url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin","forks_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/forks","keys_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/teams","hooks_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/hooks","issue_events_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/events","assignees_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/tags","blobs_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/languages","stargazers_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/stargazers","contributors_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/contributors","subscribers_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/subscribers","subscription_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/subscription","commits_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/merges","archive_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/downloads","issues_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/labels{/name}","releases_url":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/releases{/id}","created_at":"2013-11-26T06:47:38Z","updated_at":"2015-02-27T19:35:04Z","pushed_at":"2015-02-25T15:59:58Z","git_url":"git://github.com/scoverage/scalac-scoverage-plugin.git","ssh_url":"git@github.com:scoverage/scalac-scoverage-plugin.git","clone_url":"https://github.com/scoverage/scalac-scoverage-plugin.git","svn_url":"https://github.com/scoverage/scalac-scoverage-plugin","homepage":"http://scoverage.org","size":6941,"stargazers_count":161,"watchers_count":161,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":28,"mirror_url":null,"open_issues_count":16,"forks":28,"open_issues":16,"watchers":161,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/109"},"html":{"href":"https://github.com/scoverage/scalac-scoverage-plugin/pull/109"},"issue":{"href":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/issues/109"},"comments":{"href":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/scoverage/scalac-scoverage-plugin/statuses/88c35e294e032914cfba53a32c1dac67864a6e19"}}}}