{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/comments/69580601","id":69580601,"diff_hunk":"@@ -20,69 +18,23 @@ def readall\n         ruby_files << rb\n       end\n \n-      failed = false\n-      workers = (0...Hardware::CPU.cores).map do\n-        Thread.new do\n-          begin\n-            while rb = ruby_files.pop(true)\n-              # As a side effect, print syntax errors/warnings to `$stderr`.\n-              failed = true if syntax_errors_or_warnings?(rb)\n-            end\n-          rescue ThreadError # ignore empty queue error\n-          end\n-        end\n-      end\n-      workers.each(&:join)\n-      Homebrew.failed = failed\n+      valid_syntax = Readall.valid_ruby_syntax?(ruby_files)\n+      Homebrew.failed = true unless valid_syntax\n     end\n \n-    formulae = []\n-    alias_dirs = []\n     if ARGV.named.empty?\n-      formulae = Formula.files\n-      alias_dirs = Tap.map(&:alias_dir)\n+      if ARGV.include?(\"--aliases\")\n+        valid_aliases = Readall.valid_aliases?(Tap.map(&:alias_dir))\n+        Homebrew.failed = true unless valid_aliases\n+      end\n+      valid_formulae = Readall.valid_formulae?(Formula.files)\n+      Homebrew.failed = true unless valid_formulae\n     else\n       tap = Tap.fetch(ARGV.named.first)\n       raise TapUnavailableError, tap.name unless tap.installed?\n-      formulae = tap.formula_files\n-      alias_dirs = [tap.alias_dir]\n-    end\n-\n-    if ARGV.delete(\"--aliases\")\n-      alias_dirs.each do |alias_dir|\n-        next unless alias_dir.directory?\n-        Pathname.glob(\"#{alias_dir}/*\").each do |f|\n-          next unless f.symlink?\n-          next if f.file?\n-          onoe \"Broken alias: #{f}\"\n-          Homebrew.failed = true\n-        end\n-      end\n-    end\n-\n-    formulae.each do |file|\n-      begin\n-        Formulary.factory(file)\n-      rescue Interrupt\n-        raise\n-      rescue Exception => e\n-        onoe \"problem in #{file}\"\n-        puts e\n-        Homebrew.failed = true\n-      end\n+      options = {:aliases => ARGV.include?(\"--aliases\")}\n+      valid_tap = Readall.valid_tap?(tap, options)\n+      Homebrew.failed = true unless valid_tap","path":"Library/Homebrew/cmd/readall.rb","position":80,"original_position":80,"commit_id":"de60643600851dc57dd67995eb18d98ca0f13d9b","original_commit_id":"de60643600851dc57dd67995eb18d98ca0f13d9b","user":{"login":"UniqMartin","id":11892150,"avatar_url":"https://avatars.githubusercontent.com/u/11892150?v=3","gravatar_id":"","url":"https://api.github.com/users/UniqMartin","html_url":"https://github.com/UniqMartin","followers_url":"https://api.github.com/users/UniqMartin/followers","following_url":"https://api.github.com/users/UniqMartin/following{/other_user}","gists_url":"https://api.github.com/users/UniqMartin/gists{/gist_id}","starred_url":"https://api.github.com/users/UniqMartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UniqMartin/subscriptions","organizations_url":"https://api.github.com/users/UniqMartin/orgs","repos_url":"https://api.github.com/users/UniqMartin/repos","events_url":"https://api.github.com/users/UniqMartin/events{/privacy}","received_events_url":"https://api.github.com/users/UniqMartin/received_events","type":"User","site_admin":false},"body":"May I suggest to restructure this entire block a bit? Now that you've nicely abstracted away things in the `Readall` module, I think it would be clearer to iterate over taps, i.e. do something like this (untested):\r\n\r\n```ruby\r\noptions = { :aliases => ARGV.include?(\"--aliases\") }\r\ntaps = if ARGV.named.empty?\r\n  Tap\r\nelse\r\n  [Tap.fetch(ARGV.named.first)]\r\nend\r\ntaps.each do |tap|\r\n  Homebrew.failed = true unless Readall.valid_tap?(tap, options)\r\nend\r\n```","created_at":"2016-07-05T15:12:36Z","updated_at":"2016-07-05T15:12:36Z","html_url":"https://github.com/Homebrew/brew/pull/396#discussion_r69580601","pull_request_url":"https://api.github.com/repos/Homebrew/brew/pulls/396","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments/69580601"},"html":{"href":"https://github.com/Homebrew/brew/pull/396#discussion_r69580601"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/396"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/396","id":75004171,"html_url":"https://github.com/Homebrew/brew/pull/396","diff_url":"https://github.com/Homebrew/brew/pull/396.diff","patch_url":"https://github.com/Homebrew/brew/pull/396.patch","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/396","number":396,"state":"open","locked":false,"title":"tap: run readall when tapping.","user":{"login":"MikeMcQuaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeMcQuaid","html_url":"https://github.com/MikeMcQuaid","followers_url":"https://api.github.com/users/MikeMcQuaid/followers","following_url":"https://api.github.com/users/MikeMcQuaid/following{/other_user}","gists_url":"https://api.github.com/users/MikeMcQuaid/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeMcQuaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeMcQuaid/subscriptions","organizations_url":"https://api.github.com/users/MikeMcQuaid/orgs","repos_url":"https://api.github.com/users/MikeMcQuaid/repos","events_url":"https://api.github.com/users/MikeMcQuaid/events{/privacy}","received_events_url":"https://api.github.com/users/MikeMcQuaid/received_events","type":"User","site_admin":true},"body":"- [x] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/.github/CONTRIBUTING.md) document?\r\n- [x] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?\r\n- [x] Have you added an explanation of what your changes do and why you'd like us to include them?\r\n- [x] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/homebrew/pull/49031).\r\n- [x] Have you successfully run `brew tests` with your changes locally?\r\n\r\n-----\r\n\r\nThis will prevent tapping an tap with syntax errors from causing issues\r\nfor users.\r\n\r\nFixes #58.","created_at":"2016-06-23T18:32:26Z","updated_at":"2016-07-05T15:12:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"218cf18f93b6b964ddb657f50a100f6d0273aad1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/brew/pulls/396/commits","review_comments_url":"https://api.github.com/repos/Homebrew/brew/pulls/396/comments","review_comment_url":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/396/comments","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/de60643600851dc57dd67995eb18d98ca0f13d9b","head":{"label":"MikeMcQuaid:tap-readall","ref":"tap-readall","sha":"de60643600851dc57dd67995eb18d98ca0f13d9b","user":{"login":"MikeMcQuaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeMcQuaid","html_url":"https://github.com/MikeMcQuaid","followers_url":"https://api.github.com/users/MikeMcQuaid/followers","following_url":"https://api.github.com/users/MikeMcQuaid/following{/other_user}","gists_url":"https://api.github.com/users/MikeMcQuaid/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeMcQuaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeMcQuaid/subscriptions","organizations_url":"https://api.github.com/users/MikeMcQuaid/orgs","repos_url":"https://api.github.com/users/MikeMcQuaid/repos","events_url":"https://api.github.com/users/MikeMcQuaid/events{/privacy}","received_events_url":"https://api.github.com/users/MikeMcQuaid/received_events","type":"User","site_admin":true},"repo":{"id":55344513,"name":"brew","full_name":"MikeMcQuaid/brew","owner":{"login":"MikeMcQuaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeMcQuaid","html_url":"https://github.com/MikeMcQuaid","followers_url":"https://api.github.com/users/MikeMcQuaid/followers","following_url":"https://api.github.com/users/MikeMcQuaid/following{/other_user}","gists_url":"https://api.github.com/users/MikeMcQuaid/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeMcQuaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeMcQuaid/subscriptions","organizations_url":"https://api.github.com/users/MikeMcQuaid/orgs","repos_url":"https://api.github.com/users/MikeMcQuaid/repos","events_url":"https://api.github.com/users/MikeMcQuaid/events{/privacy}","received_events_url":"https://api.github.com/users/MikeMcQuaid/received_events","type":"User","site_admin":true},"private":false,"html_url":"https://github.com/MikeMcQuaid/brew","description":":beer: The missing package manager for OS X","fork":true,"url":"https://api.github.com/repos/MikeMcQuaid/brew","forks_url":"https://api.github.com/repos/MikeMcQuaid/brew/forks","keys_url":"https://api.github.com/repos/MikeMcQuaid/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MikeMcQuaid/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MikeMcQuaid/brew/teams","hooks_url":"https://api.github.com/repos/MikeMcQuaid/brew/hooks","issue_events_url":"https://api.github.com/repos/MikeMcQuaid/brew/issues/events{/number}","events_url":"https://api.github.com/repos/MikeMcQuaid/brew/events","assignees_url":"https://api.github.com/repos/MikeMcQuaid/brew/assignees{/user}","branches_url":"https://api.github.com/repos/MikeMcQuaid/brew/branches{/branch}","tags_url":"https://api.github.com/repos/MikeMcQuaid/brew/tags","blobs_url":"https://api.github.com/repos/MikeMcQuaid/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MikeMcQuaid/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MikeMcQuaid/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/MikeMcQuaid/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MikeMcQuaid/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/MikeMcQuaid/brew/languages","stargazers_url":"https://api.github.com/repos/MikeMcQuaid/brew/stargazers","contributors_url":"https://api.github.com/repos/MikeMcQuaid/brew/contributors","subscribers_url":"https://api.github.com/repos/MikeMcQuaid/brew/subscribers","subscription_url":"https://api.github.com/repos/MikeMcQuaid/brew/subscription","commits_url":"https://api.github.com/repos/MikeMcQuaid/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/MikeMcQuaid/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/MikeMcQuaid/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/MikeMcQuaid/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/MikeMcQuaid/brew/contents/{+path}","compare_url":"https://api.github.com/repos/MikeMcQuaid/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MikeMcQuaid/brew/merges","archive_url":"https://api.github.com/repos/MikeMcQuaid/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MikeMcQuaid/brew/downloads","issues_url":"https://api.github.com/repos/MikeMcQuaid/brew/issues{/number}","pulls_url":"https://api.github.com/repos/MikeMcQuaid/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/MikeMcQuaid/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/MikeMcQuaid/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MikeMcQuaid/brew/labels{/name}","releases_url":"https://api.github.com/repos/MikeMcQuaid/brew/releases{/id}","deployments_url":"https://api.github.com/repos/MikeMcQuaid/brew/deployments","created_at":"2016-04-03T12:06:24Z","updated_at":"2016-04-03T12:06:26Z","pushed_at":"2016-07-04T17:35:05Z","git_url":"git://github.com/MikeMcQuaid/brew.git","ssh_url":"git@github.com:MikeMcQuaid/brew.git","clone_url":"https://github.com/MikeMcQuaid/brew.git","svn_url":"https://github.com/MikeMcQuaid/brew","homepage":"http://brew.sh","size":10130,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"master"}},"base":{"label":"Homebrew:master","ref":"master","sha":"dba1958bd79c1c9d18f215dfc2b806ea62edd1c8","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":53238813,"name":"brew","full_name":"Homebrew/brew","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/brew","description":":beer: The missing package manager for OS X","fork":false,"url":"https://api.github.com/repos/Homebrew/brew","forks_url":"https://api.github.com/repos/Homebrew/brew/forks","keys_url":"https://api.github.com/repos/Homebrew/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/brew/teams","hooks_url":"https://api.github.com/repos/Homebrew/brew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/brew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/brew/events","assignees_url":"https://api.github.com/repos/Homebrew/brew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/brew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/brew/tags","blobs_url":"https://api.github.com/repos/Homebrew/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/brew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/brew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/brew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/brew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/brew/subscription","commits_url":"https://api.github.com/repos/Homebrew/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/brew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/brew/merges","archive_url":"https://api.github.com/repos/Homebrew/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/brew/downloads","issues_url":"https://api.github.com/repos/Homebrew/brew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/brew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/brew/releases{/id}","deployments_url":"https://api.github.com/repos/Homebrew/brew/deployments","created_at":"2016-03-06T05:08:38Z","updated_at":"2016-07-05T14:28:45Z","pushed_at":"2016-07-05T14:51:55Z","git_url":"git://github.com/Homebrew/brew.git","ssh_url":"git@github.com:Homebrew/brew.git","clone_url":"https://github.com/Homebrew/brew.git","svn_url":"https://github.com/Homebrew/brew","homepage":"http://brew.sh","size":10618,"stargazers_count":1833,"watchers_count":1833,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":529,"mirror_url":null,"open_issues_count":65,"forks":529,"open_issues":65,"watchers":1833,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/396"},"html":{"href":"https://github.com/Homebrew/brew/pull/396"},"issue":{"href":"https://api.github.com/repos/Homebrew/brew/issues/396"},"comments":{"href":"https://api.github.com/repos/Homebrew/brew/issues/396/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/396/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/396/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/brew/statuses/de60643600851dc57dd67995eb18d98ca0f13d9b"}}}}
{"actor":{"display_login":"UniqMartin"}}