{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/comments/175307665","pull_request_review_id":104814968,"id":175307665,"diff_hunk":"@@ -83,6 +86,12 @@ def check_undeclared_deps\n       next true if Formula[name].bin.directory?\n       @brewed_dylibs.keys.map { |x| x.split(\"/\").last }.include?(name)\n     end\n+    missing = []\n+    @broken_dylibs.each do |str|\n+      next unless str.start_with? \"#{HOMEBREW_PREFIX}/opt\"\n+      missing << str.sub(\"#{HOMEBREW_PREFIX}/opt/\", \"\").split(\"/\")[0]\n+    end\n+    unnecessary_deps -= missing","path":"Library/Homebrew/linkage_checker.rb","position":null,"original_position":33,"commit_id":"8634f19107d98e56fa12165e92800a2120e9b13e","original_commit_id":"2a6a2b2fa0c208f25524ea6ebcb0a9f30315d360","user":{"login":"maxim-belkin","id":13123663,"avatar_url":"https://avatars2.githubusercontent.com/u/13123663?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-belkin","html_url":"https://github.com/maxim-belkin","followers_url":"https://api.github.com/users/maxim-belkin/followers","following_url":"https://api.github.com/users/maxim-belkin/following{/other_user}","gists_url":"https://api.github.com/users/maxim-belkin/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-belkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-belkin/subscriptions","organizations_url":"https://api.github.com/users/maxim-belkin/orgs","repos_url":"https://api.github.com/users/maxim-belkin/repos","events_url":"https://api.github.com/users/maxim-belkin/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-belkin/received_events","type":"User","site_admin":false},"body":"I can convert `broken_dylibs` to Hash to make `Missing libraries:` output similar to that of `Homebrew libraries:`, that is:\r\n\r\n<pre>\r\n$ brew linkage tor\r\nSystem libraries:\r\n  /usr/lib/libSystem.B.dylib\r\n  /usr/lib/libz.1.dylib\r\nHomebrew libraries:\r\n  /usr/local/opt/libevent/lib/libevent-2.1.6.dylib (libevent)\r\nMissing libraries:\r\n  /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib <b>(openssl)</b>\r\n  /usr/local/opt/openssl/lib/libssl.1.0.0.dylib <b>(openssl)</b>\r\n</pre>\r\n\r\nWould that work?","created_at":"2018-03-18T22:47:50Z","updated_at":"2018-03-18T22:47:50Z","html_url":"https://github.com/Homebrew/brew/pull/3940#discussion_r175307665","pull_request_url":"https://api.github.com/repos/Homebrew/brew/pulls/3940","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments/175307665"},"html":{"href":"https://github.com/Homebrew/brew/pull/3940#discussion_r175307665"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/3940"}},"in_reply_to_id":175282395},"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/3940","id":175685269,"html_url":"https://github.com/Homebrew/brew/pull/3940","diff_url":"https://github.com/Homebrew/brew/pull/3940.diff","patch_url":"https://github.com/Homebrew/brew/pull/3940.patch","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/3940","number":3940,"state":"open","locked":false,"title":"Fixes for linkage_checker","user":{"login":"maxim-belkin","id":13123663,"avatar_url":"https://avatars2.githubusercontent.com/u/13123663?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-belkin","html_url":"https://github.com/maxim-belkin","followers_url":"https://api.github.com/users/maxim-belkin/followers","following_url":"https://api.github.com/users/maxim-belkin/following{/other_user}","gists_url":"https://api.github.com/users/maxim-belkin/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-belkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-belkin/subscriptions","organizations_url":"https://api.github.com/users/maxim-belkin/orgs","repos_url":"https://api.github.com/users/maxim-belkin/repos","events_url":"https://api.github.com/users/maxim-belkin/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-belkin/received_events","type":"User","site_admin":false},"body":"- [x] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/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- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/homebrew/pull/49031).\r\n- [ ] Have you successfully run `brew style` with your changes locally?\r\n- [ ] Have you successfully run `brew tests` with your changes locally?\r\n\r\n-----\r\n\r\n1. In `display_test_output`: when printing dependencies without linkage, use `Dependencies with no linkage` string instead of `Possible unnecessary dependencies` for consistency with `display_normal_output`\r\n\r\n2. In `check_dylibs`: keep track of and skip repetitive checking of those dylibs that have been previously checked. This is applicable when different executables/libraries are linked against the same libraries.\r\n\r\n3. In `check_undeclared_deps`: when there are missing libraries, corresponding dependencies should be excluded from the list of dependencies with no linkage.\r\n\r\n```\r\nbrew style linkage_checker.rb\r\n```\r\nfails with \r\n```\r\n== linkage_checker.rb ==\r\nC: 32: 41: Use hash rockets syntax.\r\n```\r\nbut this is not touched in this PR, so I'm leaving it \"as is\". Note, that `brew style` passes just fine:\r\n```\r\n$ brew style\r\n[snip]\r\n670 files inspected, no offenses detected\r\n```\r\n\r\n@ilovezfs \r\n","created_at":"2018-03-17T05:56:32Z","updated_at":"2018-03-18T22:47:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"835c06debb1ef62ae1e1b16228a706015907f5df","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/brew/pulls/3940/commits","review_comments_url":"https://api.github.com/repos/Homebrew/brew/pulls/3940/comments","review_comment_url":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/3940/comments","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/8634f19107d98e56fa12165e92800a2120e9b13e","head":{"label":"maxim-belkin:fix-undeclared","ref":"fix-undeclared","sha":"8634f19107d98e56fa12165e92800a2120e9b13e","user":{"login":"maxim-belkin","id":13123663,"avatar_url":"https://avatars2.githubusercontent.com/u/13123663?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-belkin","html_url":"https://github.com/maxim-belkin","followers_url":"https://api.github.com/users/maxim-belkin/followers","following_url":"https://api.github.com/users/maxim-belkin/following{/other_user}","gists_url":"https://api.github.com/users/maxim-belkin/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-belkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-belkin/subscriptions","organizations_url":"https://api.github.com/users/maxim-belkin/orgs","repos_url":"https://api.github.com/users/maxim-belkin/repos","events_url":"https://api.github.com/users/maxim-belkin/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-belkin/received_events","type":"User","site_admin":false},"repo":{"id":101780676,"name":"homebrew","full_name":"maxim-belkin/homebrew","owner":{"login":"maxim-belkin","id":13123663,"avatar_url":"https://avatars2.githubusercontent.com/u/13123663?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-belkin","html_url":"https://github.com/maxim-belkin","followers_url":"https://api.github.com/users/maxim-belkin/followers","following_url":"https://api.github.com/users/maxim-belkin/following{/other_user}","gists_url":"https://api.github.com/users/maxim-belkin/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-belkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-belkin/subscriptions","organizations_url":"https://api.github.com/users/maxim-belkin/orgs","repos_url":"https://api.github.com/users/maxim-belkin/repos","events_url":"https://api.github.com/users/maxim-belkin/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-belkin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maxim-belkin/homebrew","description":"🍺 The missing package manager for macOS","fork":true,"url":"https://api.github.com/repos/maxim-belkin/homebrew","forks_url":"https://api.github.com/repos/maxim-belkin/homebrew/forks","keys_url":"https://api.github.com/repos/maxim-belkin/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maxim-belkin/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maxim-belkin/homebrew/teams","hooks_url":"https://api.github.com/repos/maxim-belkin/homebrew/hooks","issue_events_url":"https://api.github.com/repos/maxim-belkin/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/maxim-belkin/homebrew/events","assignees_url":"https://api.github.com/repos/maxim-belkin/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/maxim-belkin/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/maxim-belkin/homebrew/tags","blobs_url":"https://api.github.com/repos/maxim-belkin/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maxim-belkin/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maxim-belkin/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/maxim-belkin/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maxim-belkin/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/maxim-belkin/homebrew/languages","stargazers_url":"https://api.github.com/repos/maxim-belkin/homebrew/stargazers","contributors_url":"https://api.github.com/repos/maxim-belkin/homebrew/contributors","subscribers_url":"https://api.github.com/repos/maxim-belkin/homebrew/subscribers","subscription_url":"https://api.github.com/repos/maxim-belkin/homebrew/subscription","commits_url":"https://api.github.com/repos/maxim-belkin/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/maxim-belkin/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/maxim-belkin/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/maxim-belkin/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/maxim-belkin/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/maxim-belkin/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maxim-belkin/homebrew/merges","archive_url":"https://api.github.com/repos/maxim-belkin/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maxim-belkin/homebrew/downloads","issues_url":"https://api.github.com/repos/maxim-belkin/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/maxim-belkin/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/maxim-belkin/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/maxim-belkin/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maxim-belkin/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/maxim-belkin/homebrew/releases{/id}","deployments_url":"https://api.github.com/repos/maxim-belkin/homebrew/deployments","created_at":"2017-08-29T16:06:48Z","updated_at":"2018-03-18T19:49:12Z","pushed_at":"2018-03-18T22:41:06Z","git_url":"git://github.com/maxim-belkin/homebrew.git","ssh_url":"git@github.com:maxim-belkin/homebrew.git","clone_url":"https://github.com/maxim-belkin/homebrew.git","svn_url":"https://github.com/maxim-belkin/homebrew","homepage":"https://brew.sh","size":23083,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Homebrew:master","ref":"master","sha":"e8a4aad56cc5bbbfd2613334cd41a0ed7c3e9bac","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars2.githubusercontent.com/u/1503512?v=4","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://avatars2.githubusercontent.com/u/1503512?v=4","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":"🍺 The missing package manager for macOS","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":"2018-03-18T22:35:20Z","pushed_at":"2018-03-18T22:41:08Z","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":"https://brew.sh","size":23068,"stargazers_count":11484,"watchers_count":11484,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2719,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":2719,"open_issues":34,"watchers":11484,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/3940"},"html":{"href":"https://github.com/Homebrew/brew/pull/3940"},"issue":{"href":"https://api.github.com/repos/Homebrew/brew/issues/3940"},"comments":{"href":"https://api.github.com/repos/Homebrew/brew/issues/3940/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/3940/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/3940/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/brew/statuses/8634f19107d98e56fa12165e92800a2120e9b13e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"maxim-belkin"}}