{"action":"created","comment":{"url":"https://api.github.com/repos/dart-lang/pana/pulls/comments/168748282","pull_request_review_id":97168167,"id":168748282,"diff_hunk":"@@ -71,29 +76,73 @@ Future<Fitness> calcFitness(\n   final warnPoints = max(4.0, magnitude * 0.05); // 5%\n   final hintPoints = 1.0;\n \n+  final suggestions = <Suggestion>[];\n   var shortcoming = 0.0;\n \n   if (platform != null && platform.hasConflict) {\n     shortcoming += errorPoints;\n+    final components = platform?.components?.map((s) => '`$s`')?.join(', ');\n+    var description =\n+        'Make sure that the imported libraries are not in conflict.';\n+    if (components != null) {\n+      description += ' Detected components: $components.';\n+    }\n+    suggestions.add(new Suggestion.error(\n+      'Fix platform conflict in `$dartFile`.',\n+      description,\n+      file: dartFile,\n+      penalty: new Penalty(fraction: 2000, amount: errorPoints.ceil()),\n+    ));\n   }\n \n   if (isFormatted == null || !isFormatted) {\n     shortcoming += hintPoints;\n+    suggestions.add(new Suggestion.hint(\n+      'Format `$dartFile`.',\n+      'Run `dartfmt` to format `$dartFile`.',\n+      file: dartFile,\n+      penalty: new Penalty(amount: hintPoints.ceil()),\n+    ));\n+  }\n+\n+  String suggestionDescription(CodeProblem cp, String local) {\n+    return 'Strong-mode analysis of `$dartFile` $local:\\n\\n'","path":"lib/src/fitness.dart","position":null,"original_position":55,"commit_id":"2bdefb3381d4842801074935fec7250a84623803","original_commit_id":"22daedcf7f28c8999297caf7d45c2f076a18a5be","user":{"login":"isoos","id":4778111,"avatar_url":"https://avatars1.githubusercontent.com/u/4778111?v=4","gravatar_id":"","url":"https://api.github.com/users/isoos","html_url":"https://github.com/isoos","followers_url":"https://api.github.com/users/isoos/followers","following_url":"https://api.github.com/users/isoos/following{/other_user}","gists_url":"https://api.github.com/users/isoos/gists{/gist_id}","starred_url":"https://api.github.com/users/isoos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isoos/subscriptions","organizations_url":"https://api.github.com/users/isoos/orgs","repos_url":"https://api.github.com/users/isoos/repos","events_url":"https://api.github.com/users/isoos/events{/privacy}","received_events_url":"https://api.github.com/users/isoos/received_events","type":"User","site_admin":false},"body":"I like to include it for now, because it raises awareness, but we may omit that after Dart 2 is finished. Added a TODO to change it later.","created_at":"2018-02-16T12:52:39Z","updated_at":"2018-02-16T12:52:39Z","html_url":"https://github.com/dart-lang/pana/pull/249#discussion_r168748282","pull_request_url":"https://api.github.com/repos/dart-lang/pana/pulls/249","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/dart-lang/pana/pulls/comments/168748282"},"html":{"href":"https://github.com/dart-lang/pana/pull/249#discussion_r168748282"},"pull_request":{"href":"https://api.github.com/repos/dart-lang/pana/pulls/249"}},"in_reply_to_id":168741591},"pull_request":{"url":"https://api.github.com/repos/dart-lang/pana/pulls/249","id":169133735,"html_url":"https://github.com/dart-lang/pana/pull/249","diff_url":"https://github.com/dart-lang/pana/pull/249.diff","patch_url":"https://github.com/dart-lang/pana/pull/249.patch","issue_url":"https://api.github.com/repos/dart-lang/pana/issues/249","number":249,"state":"open","locked":false,"title":"Expose all dartanalyzer and dartfmt problems as suggestions.","user":{"login":"isoos","id":4778111,"avatar_url":"https://avatars1.githubusercontent.com/u/4778111?v=4","gravatar_id":"","url":"https://api.github.com/users/isoos","html_url":"https://github.com/isoos","followers_url":"https://api.github.com/users/isoos/followers","following_url":"https://api.github.com/users/isoos/following{/other_user}","gists_url":"https://api.github.com/users/isoos/gists{/gist_id}","starred_url":"https://api.github.com/users/isoos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isoos/subscriptions","organizations_url":"https://api.github.com/users/isoos/orgs","repos_url":"https://api.github.com/users/isoos/repos","events_url":"https://api.github.com/users/isoos/events{/privacy}","received_events_url":"https://api.github.com/users/isoos/received_events","type":"User","site_admin":false},"body":"This ended up a bit longer than expected, but it closes #222 and also closes https://github.com/dart-lang/pub-dartlang-dart/issues/692. Increases the fine-grained data in the output, but the rendered parts on the pub site will be compact.","created_at":"2018-02-14T15:03:41Z","updated_at":"2018-02-16T12:52:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e92211f33bad4f0b353e620abf986935ebfb0b7f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dart-lang/pana/pulls/249/commits","review_comments_url":"https://api.github.com/repos/dart-lang/pana/pulls/249/comments","review_comment_url":"https://api.github.com/repos/dart-lang/pana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dart-lang/pana/issues/249/comments","statuses_url":"https://api.github.com/repos/dart-lang/pana/statuses/2bdefb3381d4842801074935fec7250a84623803","head":{"label":"isoos:expose_all_code_problems","ref":"expose_all_code_problems","sha":"2bdefb3381d4842801074935fec7250a84623803","user":{"login":"isoos","id":4778111,"avatar_url":"https://avatars1.githubusercontent.com/u/4778111?v=4","gravatar_id":"","url":"https://api.github.com/users/isoos","html_url":"https://github.com/isoos","followers_url":"https://api.github.com/users/isoos/followers","following_url":"https://api.github.com/users/isoos/following{/other_user}","gists_url":"https://api.github.com/users/isoos/gists{/gist_id}","starred_url":"https://api.github.com/users/isoos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isoos/subscriptions","organizations_url":"https://api.github.com/users/isoos/orgs","repos_url":"https://api.github.com/users/isoos/repos","events_url":"https://api.github.com/users/isoos/events{/privacy}","received_events_url":"https://api.github.com/users/isoos/received_events","type":"User","site_admin":false},"repo":{"id":92393668,"name":"pana","full_name":"isoos/pana","owner":{"login":"isoos","id":4778111,"avatar_url":"https://avatars1.githubusercontent.com/u/4778111?v=4","gravatar_id":"","url":"https://api.github.com/users/isoos","html_url":"https://github.com/isoos","followers_url":"https://api.github.com/users/isoos/followers","following_url":"https://api.github.com/users/isoos/following{/other_user}","gists_url":"https://api.github.com/users/isoos/gists{/gist_id}","starred_url":"https://api.github.com/users/isoos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isoos/subscriptions","organizations_url":"https://api.github.com/users/isoos/orgs","repos_url":"https://api.github.com/users/isoos/repos","events_url":"https://api.github.com/users/isoos/events{/privacy}","received_events_url":"https://api.github.com/users/isoos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/isoos/pana","description":"Package ANAlysis with Strong mode support","fork":true,"url":"https://api.github.com/repos/isoos/pana","forks_url":"https://api.github.com/repos/isoos/pana/forks","keys_url":"https://api.github.com/repos/isoos/pana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isoos/pana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isoos/pana/teams","hooks_url":"https://api.github.com/repos/isoos/pana/hooks","issue_events_url":"https://api.github.com/repos/isoos/pana/issues/events{/number}","events_url":"https://api.github.com/repos/isoos/pana/events","assignees_url":"https://api.github.com/repos/isoos/pana/assignees{/user}","branches_url":"https://api.github.com/repos/isoos/pana/branches{/branch}","tags_url":"https://api.github.com/repos/isoos/pana/tags","blobs_url":"https://api.github.com/repos/isoos/pana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isoos/pana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isoos/pana/git/refs{/sha}","trees_url":"https://api.github.com/repos/isoos/pana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isoos/pana/statuses/{sha}","languages_url":"https://api.github.com/repos/isoos/pana/languages","stargazers_url":"https://api.github.com/repos/isoos/pana/stargazers","contributors_url":"https://api.github.com/repos/isoos/pana/contributors","subscribers_url":"https://api.github.com/repos/isoos/pana/subscribers","subscription_url":"https://api.github.com/repos/isoos/pana/subscription","commits_url":"https://api.github.com/repos/isoos/pana/commits{/sha}","git_commits_url":"https://api.github.com/repos/isoos/pana/git/commits{/sha}","comments_url":"https://api.github.com/repos/isoos/pana/comments{/number}","issue_comment_url":"https://api.github.com/repos/isoos/pana/issues/comments{/number}","contents_url":"https://api.github.com/repos/isoos/pana/contents/{+path}","compare_url":"https://api.github.com/repos/isoos/pana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isoos/pana/merges","archive_url":"https://api.github.com/repos/isoos/pana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isoos/pana/downloads","issues_url":"https://api.github.com/repos/isoos/pana/issues{/number}","pulls_url":"https://api.github.com/repos/isoos/pana/pulls{/number}","milestones_url":"https://api.github.com/repos/isoos/pana/milestones{/number}","notifications_url":"https://api.github.com/repos/isoos/pana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isoos/pana/labels{/name}","releases_url":"https://api.github.com/repos/isoos/pana/releases{/id}","deployments_url":"https://api.github.com/repos/isoos/pana/deployments","created_at":"2017-05-25T10:44:25Z","updated_at":"2018-02-01T07:42:33Z","pushed_at":"2018-02-16T12:51:27Z","git_url":"git://github.com/isoos/pana.git","ssh_url":"git@github.com:isoos/pana.git","clone_url":"https://github.com/isoos/pana.git","svn_url":"https://github.com/isoos/pana","homepage":"https://pub.dartlang.org/packages/pana","size":1176,"stargazers_count":0,"watchers_count":0,"language":"Dart","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":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dart-lang:master","ref":"master","sha":"0b4b32f323a2508f780db04ad2c15d22a50aa29e","user":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars0.githubusercontent.com/u/1609975?v=4","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":43093613,"name":"pana","full_name":"dart-lang/pana","owner":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars0.githubusercontent.com/u/1609975?v=4","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dart-lang/pana","description":"Package ANAlysis with Strong mode support","fork":false,"url":"https://api.github.com/repos/dart-lang/pana","forks_url":"https://api.github.com/repos/dart-lang/pana/forks","keys_url":"https://api.github.com/repos/dart-lang/pana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/pana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/pana/teams","hooks_url":"https://api.github.com/repos/dart-lang/pana/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/pana/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/pana/events","assignees_url":"https://api.github.com/repos/dart-lang/pana/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/pana/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/pana/tags","blobs_url":"https://api.github.com/repos/dart-lang/pana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/pana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/pana/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/pana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/pana/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/pana/languages","stargazers_url":"https://api.github.com/repos/dart-lang/pana/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/pana/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/pana/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/pana/subscription","commits_url":"https://api.github.com/repos/dart-lang/pana/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/pana/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/pana/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/pana/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/pana/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/pana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/pana/merges","archive_url":"https://api.github.com/repos/dart-lang/pana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/pana/downloads","issues_url":"https://api.github.com/repos/dart-lang/pana/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/pana/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/pana/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/pana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/pana/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/pana/releases{/id}","deployments_url":"https://api.github.com/repos/dart-lang/pana/deployments","created_at":"2015-09-24T21:18:44Z","updated_at":"2018-02-06T17:19:14Z","pushed_at":"2018-02-16T12:51:28Z","git_url":"git://github.com/dart-lang/pana.git","ssh_url":"git@github.com:dart-lang/pana.git","clone_url":"https://github.com/dart-lang/pana.git","svn_url":"https://github.com/dart-lang/pana","homepage":"https://pub.dartlang.org/packages/pana","size":1176,"stargazers_count":12,"watchers_count":12,"language":"Dart","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":8,"open_issues":9,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dart-lang/pana/pulls/249"},"html":{"href":"https://github.com/dart-lang/pana/pull/249"},"issue":{"href":"https://api.github.com/repos/dart-lang/pana/issues/249"},"comments":{"href":"https://api.github.com/repos/dart-lang/pana/issues/249/comments"},"review_comments":{"href":"https://api.github.com/repos/dart-lang/pana/pulls/249/comments"},"review_comment":{"href":"https://api.github.com/repos/dart-lang/pana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dart-lang/pana/pulls/249/commits"},"statuses":{"href":"https://api.github.com/repos/dart-lang/pana/statuses/2bdefb3381d4842801074935fec7250a84623803"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"isoos"}}