{"action":"created","comment":{"url":"https://api.github.com/repos/flutter/flutter/pulls/comments/48207864","id":48207864,"diff_hunk":"@@ -148,18 +163,28 @@ class AnalyzeCommand extends FlutterCommand {\n \n     if (argResults['current-package']) {\n       // ./lib/main.dart\n-      String mainPath = 'lib/main.dart';\n+      String mainPath = path.join('lib', 'main.dart');\n       if (FileSystemEntity.isFileSync(mainPath)) {\n         dartFiles.add(mainPath);\n         pubSpecDirectories.add('.');\n         foundAnyInCurrentDirectory = true;\n       }\n+\n+      // Check for <package>/lib/<package>.dart.\n+      String packageName = path.basename(Directory.current.path);\n+      String mainFilePath = path.join('lib', '$packageName.dart');","path":"packages/flutter_tools/lib/src/commands/analyze.dart","position":66,"original_position":66,"commit_id":"e60a159c564c438fd90115394ce7939e1006f8a5","original_commit_id":"e60a159c564c438fd90115394ce7939e1006f8a5","user":{"login":"devoncarew","id":1269969,"avatar_url":"https://avatars.githubusercontent.com/u/1269969?v=3","gravatar_id":"","url":"https://api.github.com/users/devoncarew","html_url":"https://github.com/devoncarew","followers_url":"https://api.github.com/users/devoncarew/followers","following_url":"https://api.github.com/users/devoncarew/following{/other_user}","gists_url":"https://api.github.com/users/devoncarew/gists{/gist_id}","starred_url":"https://api.github.com/users/devoncarew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devoncarew/subscriptions","organizations_url":"https://api.github.com/users/devoncarew/orgs","repos_url":"https://api.github.com/users/devoncarew/repos","events_url":"https://api.github.com/users/devoncarew/events{/privacy}","received_events_url":"https://api.github.com/users/devoncarew/received_events","type":"User","site_admin":false},"body":"This looks for `lib/<packageName>.dart` when flutter analyze is run for just the current package.","created_at":"2015-12-22T00:05:25Z","updated_at":"2015-12-22T00:05:25Z","html_url":"https://github.com/flutter/flutter/pull/1011#discussion_r48207864","pull_request_url":"https://api.github.com/repos/flutter/flutter/pulls/1011","_links":{"self":{"href":"https://api.github.com/repos/flutter/flutter/pulls/comments/48207864"},"html":{"href":"https://github.com/flutter/flutter/pull/1011#discussion_r48207864"},"pull_request":{"href":"https://api.github.com/repos/flutter/flutter/pulls/1011"}}},"pull_request":{"url":"https://api.github.com/repos/flutter/flutter/pulls/1011","id":54312611,"html_url":"https://github.com/flutter/flutter/pull/1011","diff_url":"https://github.com/flutter/flutter/pull/1011.diff","patch_url":"https://github.com/flutter/flutter/pull/1011.patch","issue_url":"https://api.github.com/repos/flutter/flutter/issues/1011","number":1011,"state":"open","locked":false,"title":"analyze more packages","user":{"login":"devoncarew","id":1269969,"avatar_url":"https://avatars.githubusercontent.com/u/1269969?v=3","gravatar_id":"","url":"https://api.github.com/users/devoncarew","html_url":"https://github.com/devoncarew","followers_url":"https://api.github.com/users/devoncarew/followers","following_url":"https://api.github.com/users/devoncarew/following{/other_user}","gists_url":"https://api.github.com/users/devoncarew/gists{/gist_id}","starred_url":"https://api.github.com/users/devoncarew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devoncarew/subscriptions","organizations_url":"https://api.github.com/users/devoncarew/orgs","repos_url":"https://api.github.com/users/devoncarew/repos","events_url":"https://api.github.com/users/devoncarew/events{/privacy}","received_events_url":"https://api.github.com/users/devoncarew/received_events","type":"User","site_admin":false},"body":"- look for and analyze `foo/lib/foo.dart` - this catches packages like `flutter_sprites`, which I don't believe had previously been analyzed\r\n- fix an issue where we were deleting the temporary generated main file, then trying to read its source to match against error locations\r\n- skip todo comments (`[info] TODO`) in the results\r\n\r\n@Hixie ","created_at":"2015-12-21T22:48:44Z","updated_at":"2015-12-22T00:05:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3b9eb32289d9906661b78e0ba33f3fa6db9717e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flutter/flutter/pulls/1011/commits","review_comments_url":"https://api.github.com/repos/flutter/flutter/pulls/1011/comments","review_comment_url":"https://api.github.com/repos/flutter/flutter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/1011/comments","statuses_url":"https://api.github.com/repos/flutter/flutter/statuses/e60a159c564c438fd90115394ce7939e1006f8a5","head":{"label":"devoncarew:more_analysis","ref":"more_analysis","sha":"e60a159c564c438fd90115394ce7939e1006f8a5","user":{"login":"devoncarew","id":1269969,"avatar_url":"https://avatars.githubusercontent.com/u/1269969?v=3","gravatar_id":"","url":"https://api.github.com/users/devoncarew","html_url":"https://github.com/devoncarew","followers_url":"https://api.github.com/users/devoncarew/followers","following_url":"https://api.github.com/users/devoncarew/following{/other_user}","gists_url":"https://api.github.com/users/devoncarew/gists{/gist_id}","starred_url":"https://api.github.com/users/devoncarew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devoncarew/subscriptions","organizations_url":"https://api.github.com/users/devoncarew/orgs","repos_url":"https://api.github.com/users/devoncarew/repos","events_url":"https://api.github.com/users/devoncarew/events{/privacy}","received_events_url":"https://api.github.com/users/devoncarew/received_events","type":"User","site_admin":false},"repo":{"id":45596312,"name":"flutter","full_name":"devoncarew/flutter","owner":{"login":"devoncarew","id":1269969,"avatar_url":"https://avatars.githubusercontent.com/u/1269969?v=3","gravatar_id":"","url":"https://api.github.com/users/devoncarew","html_url":"https://github.com/devoncarew","followers_url":"https://api.github.com/users/devoncarew/followers","following_url":"https://api.github.com/users/devoncarew/following{/other_user}","gists_url":"https://api.github.com/users/devoncarew/gists{/gist_id}","starred_url":"https://api.github.com/users/devoncarew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devoncarew/subscriptions","organizations_url":"https://api.github.com/users/devoncarew/orgs","repos_url":"https://api.github.com/users/devoncarew/repos","events_url":"https://api.github.com/users/devoncarew/events{/privacy}","received_events_url":"https://api.github.com/users/devoncarew/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/devoncarew/flutter","description":"The Flutter framework","fork":true,"url":"https://api.github.com/repos/devoncarew/flutter","forks_url":"https://api.github.com/repos/devoncarew/flutter/forks","keys_url":"https://api.github.com/repos/devoncarew/flutter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devoncarew/flutter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devoncarew/flutter/teams","hooks_url":"https://api.github.com/repos/devoncarew/flutter/hooks","issue_events_url":"https://api.github.com/repos/devoncarew/flutter/issues/events{/number}","events_url":"https://api.github.com/repos/devoncarew/flutter/events","assignees_url":"https://api.github.com/repos/devoncarew/flutter/assignees{/user}","branches_url":"https://api.github.com/repos/devoncarew/flutter/branches{/branch}","tags_url":"https://api.github.com/repos/devoncarew/flutter/tags","blobs_url":"https://api.github.com/repos/devoncarew/flutter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devoncarew/flutter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devoncarew/flutter/git/refs{/sha}","trees_url":"https://api.github.com/repos/devoncarew/flutter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devoncarew/flutter/statuses/{sha}","languages_url":"https://api.github.com/repos/devoncarew/flutter/languages","stargazers_url":"https://api.github.com/repos/devoncarew/flutter/stargazers","contributors_url":"https://api.github.com/repos/devoncarew/flutter/contributors","subscribers_url":"https://api.github.com/repos/devoncarew/flutter/subscribers","subscription_url":"https://api.github.com/repos/devoncarew/flutter/subscription","commits_url":"https://api.github.com/repos/devoncarew/flutter/commits{/sha}","git_commits_url":"https://api.github.com/repos/devoncarew/flutter/git/commits{/sha}","comments_url":"https://api.github.com/repos/devoncarew/flutter/comments{/number}","issue_comment_url":"https://api.github.com/repos/devoncarew/flutter/issues/comments{/number}","contents_url":"https://api.github.com/repos/devoncarew/flutter/contents/{+path}","compare_url":"https://api.github.com/repos/devoncarew/flutter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devoncarew/flutter/merges","archive_url":"https://api.github.com/repos/devoncarew/flutter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devoncarew/flutter/downloads","issues_url":"https://api.github.com/repos/devoncarew/flutter/issues{/number}","pulls_url":"https://api.github.com/repos/devoncarew/flutter/pulls{/number}","milestones_url":"https://api.github.com/repos/devoncarew/flutter/milestones{/number}","notifications_url":"https://api.github.com/repos/devoncarew/flutter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devoncarew/flutter/labels{/name}","releases_url":"https://api.github.com/repos/devoncarew/flutter/releases{/id}","created_at":"2015-11-05T07:56:06Z","updated_at":"2015-11-05T07:56:07Z","pushed_at":"2015-12-21T22:57:36Z","git_url":"git://github.com/devoncarew/flutter.git","ssh_url":"git@github.com:devoncarew/flutter.git","clone_url":"https://github.com/devoncarew/flutter.git","svn_url":"https://github.com/devoncarew/flutter","homepage":"http://flutter.io","size":11288,"stargazers_count":0,"watchers_count":0,"language":"Dart","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flutter:master","ref":"master","sha":"7970df59072dd1c229864c2f161dc1d2437031c9","user":{"login":"flutter","id":14101776,"avatar_url":"https://avatars.githubusercontent.com/u/14101776?v=3","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"repo":{"id":31792824,"name":"flutter","full_name":"flutter/flutter","owner":{"login":"flutter","id":14101776,"avatar_url":"https://avatars.githubusercontent.com/u/14101776?v=3","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flutter/flutter","description":"Framework for building high-performance, high-fidelity iOS and Android apps","fork":false,"url":"https://api.github.com/repos/flutter/flutter","forks_url":"https://api.github.com/repos/flutter/flutter/forks","keys_url":"https://api.github.com/repos/flutter/flutter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flutter/flutter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flutter/flutter/teams","hooks_url":"https://api.github.com/repos/flutter/flutter/hooks","issue_events_url":"https://api.github.com/repos/flutter/flutter/issues/events{/number}","events_url":"https://api.github.com/repos/flutter/flutter/events","assignees_url":"https://api.github.com/repos/flutter/flutter/assignees{/user}","branches_url":"https://api.github.com/repos/flutter/flutter/branches{/branch}","tags_url":"https://api.github.com/repos/flutter/flutter/tags","blobs_url":"https://api.github.com/repos/flutter/flutter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flutter/flutter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flutter/flutter/git/refs{/sha}","trees_url":"https://api.github.com/repos/flutter/flutter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flutter/flutter/statuses/{sha}","languages_url":"https://api.github.com/repos/flutter/flutter/languages","stargazers_url":"https://api.github.com/repos/flutter/flutter/stargazers","contributors_url":"https://api.github.com/repos/flutter/flutter/contributors","subscribers_url":"https://api.github.com/repos/flutter/flutter/subscribers","subscription_url":"https://api.github.com/repos/flutter/flutter/subscription","commits_url":"https://api.github.com/repos/flutter/flutter/commits{/sha}","git_commits_url":"https://api.github.com/repos/flutter/flutter/git/commits{/sha}","comments_url":"https://api.github.com/repos/flutter/flutter/comments{/number}","issue_comment_url":"https://api.github.com/repos/flutter/flutter/issues/comments{/number}","contents_url":"https://api.github.com/repos/flutter/flutter/contents/{+path}","compare_url":"https://api.github.com/repos/flutter/flutter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flutter/flutter/merges","archive_url":"https://api.github.com/repos/flutter/flutter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flutter/flutter/downloads","issues_url":"https://api.github.com/repos/flutter/flutter/issues{/number}","pulls_url":"https://api.github.com/repos/flutter/flutter/pulls{/number}","milestones_url":"https://api.github.com/repos/flutter/flutter/milestones{/number}","notifications_url":"https://api.github.com/repos/flutter/flutter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flutter/flutter/labels{/name}","releases_url":"https://api.github.com/repos/flutter/flutter/releases{/id}","created_at":"2015-03-06T22:54:58Z","updated_at":"2015-12-21T22:21:34Z","pushed_at":"2015-12-21T23:15:30Z","git_url":"git://github.com/flutter/flutter.git","ssh_url":"git@github.com:flutter/flutter.git","clone_url":"https://github.com/flutter/flutter.git","svn_url":"https://github.com/flutter/flutter","homepage":"http://flutter.io","size":103010,"stargazers_count":2447,"watchers_count":2447,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":229,"mirror_url":null,"open_issues_count":351,"forks":229,"open_issues":351,"watchers":2447,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flutter/flutter/pulls/1011"},"html":{"href":"https://github.com/flutter/flutter/pull/1011"},"issue":{"href":"https://api.github.com/repos/flutter/flutter/issues/1011"},"comments":{"href":"https://api.github.com/repos/flutter/flutter/issues/1011/comments"},"review_comments":{"href":"https://api.github.com/repos/flutter/flutter/pulls/1011/comments"},"review_comment":{"href":"https://api.github.com/repos/flutter/flutter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flutter/flutter/pulls/1011/commits"},"statuses":{"href":"https://api.github.com/repos/flutter/flutter/statuses/e60a159c564c438fd90115394ce7939e1006f8a5"}}}}