{"action":"created","comment":{"url":"https://api.github.com/repos/scala/scala/pulls/comments/58293552","id":58293552,"diff_hunk":"@@ -38,23 +39,50 @@ class ScalaDoc {\n       reporter.echo(command.usageMsg)\n     else\n       try { new DocFactory(reporter, docSettings) document command.files }\n-    catch {\n-      case ex @ FatalError(msg) =>\n-        if (docSettings.debug.value) ex.printStackTrace()\n-        reporter.error(null, \"fatal error: \" + msg)\n-    }\n-    finally reporter.printSummary()\n+      catch {\n+        case ex @ FatalError(msg) =>\n+          if (docSettings.debug.value) ex.printStackTrace()\n+          reporter.error(null, \"fatal error: \" + msg)\n+      }\n+      finally reporter.printSummary()\n \n     !reporter.reallyHasErrors\n   }\n }\n \n+/** The Scaladoc reporter adds summary messages to the `ConsoleReporter`\n+ *\n+ *  Use the `summaryX` methods to add unique summarizing message to the end of\n+ *  the run.\n+ */\n class ScalaDocReporter(settings: Settings) extends ConsoleReporter(settings) {\n+  import scala.collection.mutable\n \n   // need to do sometimes lie so that the Global instance doesn't\n   // trash all the symbols just because there was an error\n   override def hasErrors = false\n   def reallyHasErrors = super.hasErrors\n+\n+  private[this] implicit val orderingByPos: Ordering[Position] = Ordering.by(p => if (p.isDefined) p.start else -1)\n+  private[this] val delayedMessages: mutable.SortedMap[Position, mutable.Map[String, () => Unit]] =\n+    mutable.SortedMap.empty[Position, mutable.Map[String, () => Unit]]\n+\n+  /** Eliminates messages if both `pos` and `msg` are equal to existing element */\n+  def addDelayedMessage(pos: Position, msg: String, print: () => Unit): Unit =\n+    delayedMessages.get(pos).map { posMap =>\n+      posMap += (msg -> print)\n+    } getOrElse {\n+      delayedMessages(pos) = mutable.Map(msg -> print)\n+    }\n+\n+  def printDelayedMessages(): Unit = for {\n+    (_, map) <- delayedMessages\n+  } yield map.values.foreach(_.apply())","path":"src/scaladoc/scala/tools/nsc/ScalaDoc.scala","position":58,"original_position":58,"commit_id":"96b1c0f3d02108d8cb7e1bacbf813a276fe22090","original_commit_id":"96b1c0f3d02108d8cb7e1bacbf813a276fe22090","user":{"login":"felixmulder","id":1530049,"avatar_url":"https://avatars.githubusercontent.com/u/1530049?v=3","gravatar_id":"","url":"https://api.github.com/users/felixmulder","html_url":"https://github.com/felixmulder","followers_url":"https://api.github.com/users/felixmulder/followers","following_url":"https://api.github.com/users/felixmulder/following{/other_user}","gists_url":"https://api.github.com/users/felixmulder/gists{/gist_id}","starred_url":"https://api.github.com/users/felixmulder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixmulder/subscriptions","organizations_url":"https://api.github.com/users/felixmulder/orgs","repos_url":"https://api.github.com/users/felixmulder/repos","events_url":"https://api.github.com/users/felixmulder/events{/privacy}","received_events_url":"https://api.github.com/users/felixmulder/received_events","type":"User","site_admin":false},"body":"Good idea! I'll make the changes and ping you :)","created_at":"2016-04-02T13:47:24Z","updated_at":"2016-04-02T13:47:24Z","html_url":"https://github.com/scala/scala/pull/5063#discussion_r58293552","pull_request_url":"https://api.github.com/repos/scala/scala/pulls/5063","_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/comments/58293552"},"html":{"href":"https://github.com/scala/scala/pull/5063#discussion_r58293552"},"pull_request":{"href":"https://api.github.com/repos/scala/scala/pulls/5063"}}},"pull_request":{"url":"https://api.github.com/repos/scala/scala/pulls/5063","id":64156604,"html_url":"https://github.com/scala/scala/pull/5063","diff_url":"https://github.com/scala/scala/pull/5063.diff","patch_url":"https://github.com/scala/scala/pull/5063.patch","issue_url":"https://api.github.com/repos/scala/scala/issues/5063","number":5063,"state":"open","locked":false,"title":"Add summary reporting to Scaladoc","user":{"login":"felixmulder","id":1530049,"avatar_url":"https://avatars.githubusercontent.com/u/1530049?v=3","gravatar_id":"","url":"https://api.github.com/users/felixmulder","html_url":"https://github.com/felixmulder","followers_url":"https://api.github.com/users/felixmulder/followers","following_url":"https://api.github.com/users/felixmulder/following{/other_user}","gists_url":"https://api.github.com/users/felixmulder/gists{/gist_id}","starred_url":"https://api.github.com/users/felixmulder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixmulder/subscriptions","organizations_url":"https://api.github.com/users/felixmulder/orgs","repos_url":"https://api.github.com/users/felixmulder/repos","events_url":"https://api.github.com/users/felixmulder/events{/privacy}","received_events_url":"https://api.github.com/users/felixmulder/received_events","type":"User","site_admin":false},"body":"This commit adds summary reporting for scaladoc. This eliminates the infinite list of `warning: doc-version (2.12.0-20160323-144128-6173274) is too long to be displayed in the webview`.\r\n\r\nreview: @VladUreche ","created_at":"2016-03-25T12:05:56Z","updated_at":"2016-04-02T13:47:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1b1a6b1aa485bab67afb1c6055763195171c322","assignee":null,"milestone":{"url":"https://api.github.com/repos/scala/scala/milestones/52","html_url":"https://github.com/scala/scala/milestones/2.12.0-M5","labels_url":"https://api.github.com/repos/scala/scala/milestones/52/labels","id":1355301,"number":52,"title":"2.12.0-M5","description":"Merge to 2.12.x. \r\n\r\nBug fixes to stabilize existing features only. Ticket must be created and assigned to M5 milestone on scala/scala-dev: https://github.com/scala/scala-dev/milestones/2.12.0-M5.\r\n\r\nOne potential exception to the no-big-refactorings-rule -- TBD:\r\n  - [ ] fields phase + rework lambdalift to reduce capture? (#5035)\r\n","creator":{"login":"adriaanm","id":91083,"avatar_url":"https://avatars.githubusercontent.com/u/91083?v=3","gravatar_id":"","url":"https://api.github.com/users/adriaanm","html_url":"https://github.com/adriaanm","followers_url":"https://api.github.com/users/adriaanm/followers","following_url":"https://api.github.com/users/adriaanm/following{/other_user}","gists_url":"https://api.github.com/users/adriaanm/gists{/gist_id}","starred_url":"https://api.github.com/users/adriaanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adriaanm/subscriptions","organizations_url":"https://api.github.com/users/adriaanm/orgs","repos_url":"https://api.github.com/users/adriaanm/repos","events_url":"https://api.github.com/users/adriaanm/events{/privacy}","received_events_url":"https://api.github.com/users/adriaanm/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":3,"state":"open","created_at":"2015-10-14T13:06:29Z","updated_at":"2016-04-02T11:41:40Z","due_on":"2016-05-27T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/scala/scala/pulls/5063/commits","review_comments_url":"https://api.github.com/repos/scala/scala/pulls/5063/comments","review_comment_url":"https://api.github.com/repos/scala/scala/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scala/scala/issues/5063/comments","statuses_url":"https://api.github.com/repos/scala/scala/statuses/96b1c0f3d02108d8cb7e1bacbf813a276fe22090","head":{"label":"felixmulder:topic/scaladoc-summary-reporting","ref":"topic/scaladoc-summary-reporting","sha":"96b1c0f3d02108d8cb7e1bacbf813a276fe22090","user":{"login":"felixmulder","id":1530049,"avatar_url":"https://avatars.githubusercontent.com/u/1530049?v=3","gravatar_id":"","url":"https://api.github.com/users/felixmulder","html_url":"https://github.com/felixmulder","followers_url":"https://api.github.com/users/felixmulder/followers","following_url":"https://api.github.com/users/felixmulder/following{/other_user}","gists_url":"https://api.github.com/users/felixmulder/gists{/gist_id}","starred_url":"https://api.github.com/users/felixmulder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixmulder/subscriptions","organizations_url":"https://api.github.com/users/felixmulder/orgs","repos_url":"https://api.github.com/users/felixmulder/repos","events_url":"https://api.github.com/users/felixmulder/events{/privacy}","received_events_url":"https://api.github.com/users/felixmulder/received_events","type":"User","site_admin":false},"repo":{"id":47139998,"name":"scala","full_name":"felixmulder/scala","owner":{"login":"felixmulder","id":1530049,"avatar_url":"https://avatars.githubusercontent.com/u/1530049?v=3","gravatar_id":"","url":"https://api.github.com/users/felixmulder","html_url":"https://github.com/felixmulder","followers_url":"https://api.github.com/users/felixmulder/followers","following_url":"https://api.github.com/users/felixmulder/following{/other_user}","gists_url":"https://api.github.com/users/felixmulder/gists{/gist_id}","starred_url":"https://api.github.com/users/felixmulder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixmulder/subscriptions","organizations_url":"https://api.github.com/users/felixmulder/orgs","repos_url":"https://api.github.com/users/felixmulder/repos","events_url":"https://api.github.com/users/felixmulder/events{/privacy}","received_events_url":"https://api.github.com/users/felixmulder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/felixmulder/scala","description":"The Scala programming language","fork":true,"url":"https://api.github.com/repos/felixmulder/scala","forks_url":"https://api.github.com/repos/felixmulder/scala/forks","keys_url":"https://api.github.com/repos/felixmulder/scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/felixmulder/scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/felixmulder/scala/teams","hooks_url":"https://api.github.com/repos/felixmulder/scala/hooks","issue_events_url":"https://api.github.com/repos/felixmulder/scala/issues/events{/number}","events_url":"https://api.github.com/repos/felixmulder/scala/events","assignees_url":"https://api.github.com/repos/felixmulder/scala/assignees{/user}","branches_url":"https://api.github.com/repos/felixmulder/scala/branches{/branch}","tags_url":"https://api.github.com/repos/felixmulder/scala/tags","blobs_url":"https://api.github.com/repos/felixmulder/scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/felixmulder/scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/felixmulder/scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/felixmulder/scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/felixmulder/scala/statuses/{sha}","languages_url":"https://api.github.com/repos/felixmulder/scala/languages","stargazers_url":"https://api.github.com/repos/felixmulder/scala/stargazers","contributors_url":"https://api.github.com/repos/felixmulder/scala/contributors","subscribers_url":"https://api.github.com/repos/felixmulder/scala/subscribers","subscription_url":"https://api.github.com/repos/felixmulder/scala/subscription","commits_url":"https://api.github.com/repos/felixmulder/scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/felixmulder/scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/felixmulder/scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/felixmulder/scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/felixmulder/scala/contents/{+path}","compare_url":"https://api.github.com/repos/felixmulder/scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/felixmulder/scala/merges","archive_url":"https://api.github.com/repos/felixmulder/scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/felixmulder/scala/downloads","issues_url":"https://api.github.com/repos/felixmulder/scala/issues{/number}","pulls_url":"https://api.github.com/repos/felixmulder/scala/pulls{/number}","milestones_url":"https://api.github.com/repos/felixmulder/scala/milestones{/number}","notifications_url":"https://api.github.com/repos/felixmulder/scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/felixmulder/scala/labels{/name}","releases_url":"https://api.github.com/repos/felixmulder/scala/releases{/id}","deployments_url":"https://api.github.com/repos/felixmulder/scala/deployments","created_at":"2015-11-30T19:09:09Z","updated_at":"2016-01-22T00:49:24Z","pushed_at":"2016-03-30T09:21:13Z","git_url":"git://github.com/felixmulder/scala.git","ssh_url":"git@github.com:felixmulder/scala.git","clone_url":"https://github.com/felixmulder/scala.git","svn_url":"https://github.com/felixmulder/scala","homepage":"http://www.scala-lang.org/","size":83850,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.12.x"}},"base":{"label":"scala:2.12.x","ref":"2.12.x","sha":"0e4c39aee4196573e8fb94a01fd92e0be4e4dd05","user":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=3","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"repo":{"id":2888818,"name":"scala","full_name":"scala/scala","owner":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=3","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scala/scala","description":"The Scala programming language","fork":false,"url":"https://api.github.com/repos/scala/scala","forks_url":"https://api.github.com/repos/scala/scala/forks","keys_url":"https://api.github.com/repos/scala/scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scala/scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scala/scala/teams","hooks_url":"https://api.github.com/repos/scala/scala/hooks","issue_events_url":"https://api.github.com/repos/scala/scala/issues/events{/number}","events_url":"https://api.github.com/repos/scala/scala/events","assignees_url":"https://api.github.com/repos/scala/scala/assignees{/user}","branches_url":"https://api.github.com/repos/scala/scala/branches{/branch}","tags_url":"https://api.github.com/repos/scala/scala/tags","blobs_url":"https://api.github.com/repos/scala/scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scala/scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scala/scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/scala/scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scala/scala/statuses/{sha}","languages_url":"https://api.github.com/repos/scala/scala/languages","stargazers_url":"https://api.github.com/repos/scala/scala/stargazers","contributors_url":"https://api.github.com/repos/scala/scala/contributors","subscribers_url":"https://api.github.com/repos/scala/scala/subscribers","subscription_url":"https://api.github.com/repos/scala/scala/subscription","commits_url":"https://api.github.com/repos/scala/scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/scala/scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/scala/scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/scala/scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/scala/scala/contents/{+path}","compare_url":"https://api.github.com/repos/scala/scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scala/scala/merges","archive_url":"https://api.github.com/repos/scala/scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scala/scala/downloads","issues_url":"https://api.github.com/repos/scala/scala/issues{/number}","pulls_url":"https://api.github.com/repos/scala/scala/pulls{/number}","milestones_url":"https://api.github.com/repos/scala/scala/milestones{/number}","notifications_url":"https://api.github.com/repos/scala/scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scala/scala/labels{/name}","releases_url":"https://api.github.com/repos/scala/scala/releases{/id}","deployments_url":"https://api.github.com/repos/scala/scala/deployments","created_at":"2011-12-01T05:02:34Z","updated_at":"2016-04-02T12:09:32Z","pushed_at":"2016-04-02T11:58:10Z","git_url":"git://github.com/scala/scala.git","ssh_url":"git@github.com:scala/scala.git","clone_url":"https://github.com/scala/scala.git","svn_url":"https://github.com/scala/scala","homepage":"http://www.scala-lang.org/","size":141955,"stargazers_count":5900,"watchers_count":5900,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1477,"mirror_url":null,"open_issues_count":27,"forks":1477,"open_issues":27,"watchers":5900,"default_branch":"2.12.x"}},"_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/5063"},"html":{"href":"https://github.com/scala/scala/pull/5063"},"issue":{"href":"https://api.github.com/repos/scala/scala/issues/5063"},"comments":{"href":"https://api.github.com/repos/scala/scala/issues/5063/comments"},"review_comments":{"href":"https://api.github.com/repos/scala/scala/pulls/5063/comments"},"review_comment":{"href":"https://api.github.com/repos/scala/scala/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scala/scala/pulls/5063/commits"},"statuses":{"href":"https://api.github.com/repos/scala/scala/statuses/96b1c0f3d02108d8cb7e1bacbf813a276fe22090"}}}}