{"action":"opened","number":6524,"pull_request":{"url":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6524","id":233580902,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNTgwOTAy","html_url":"https://github.com/rubocop-hq/rubocop/pull/6524","diff_url":"https://github.com/rubocop-hq/rubocop/pull/6524.diff","patch_url":"https://github.com/rubocop-hq/rubocop/pull/6524.patch","issue_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6524","number":6524,"state":"open","locked":false,"title":"A bit mor edge cases for Style/MethodCallWithArgsParentheses","user":{"login":"gsamokovarov","id":604618,"node_id":"MDQ6VXNlcjYwNDYxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/604618?v=4","gravatar_id":"","url":"https://api.github.com/users/gsamokovarov","html_url":"https://github.com/gsamokovarov","followers_url":"https://api.github.com/users/gsamokovarov/followers","following_url":"https://api.github.com/users/gsamokovarov/following{/other_user}","gists_url":"https://api.github.com/users/gsamokovarov/gists{/gist_id}","starred_url":"https://api.github.com/users/gsamokovarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsamokovarov/subscriptions","organizations_url":"https://api.github.com/users/gsamokovarov/orgs","repos_url":"https://api.github.com/users/gsamokovarov/repos","events_url":"https://api.github.com/users/gsamokovarov/events{/privacy}","received_events_url":"https://api.github.com/users/gsamokovarov/received_events","type":"User","site_admin":false},"body":"During the testing of the cop in my company's big code-base I have found the following edge cases:\r\n\r\n1. Allow parens in `foo.include?(bar) ? bar : quux`\r\n    This is needed, because of the precedence of the ternary if. You may want to be explicit what argument you are calling the condition method with. This naturally leads to:\r\n2. Allow parens in `foo.include?(bar ? baz : quux)`\r\n3. Allow parens in `ConstantLikeMethod()`. If you have parens arond a constant-companion-like method call, the parens may be needed to signal the method call and not a constant access.\r\n\r\nI have thrown a few refactorings and re-organizations as well.","created_at":"2018-11-26T14:41:11Z","updated_at":"2018-11-26T14:41:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6524/commits","review_comments_url":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6524/comments","review_comment_url":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6524/comments","statuses_url":"https://api.github.com/repos/rubocop-hq/rubocop/statuses/c87c74027d0efcd2e28f59eb6077a2b247de732e","head":{"label":"gsamokovarov:method-call-omit-parentheses-edge-cases","ref":"method-call-omit-parentheses-edge-cases","sha":"c87c74027d0efcd2e28f59eb6077a2b247de732e","user":{"login":"gsamokovarov","id":604618,"node_id":"MDQ6VXNlcjYwNDYxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/604618?v=4","gravatar_id":"","url":"https://api.github.com/users/gsamokovarov","html_url":"https://github.com/gsamokovarov","followers_url":"https://api.github.com/users/gsamokovarov/followers","following_url":"https://api.github.com/users/gsamokovarov/following{/other_user}","gists_url":"https://api.github.com/users/gsamokovarov/gists{/gist_id}","starred_url":"https://api.github.com/users/gsamokovarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsamokovarov/subscriptions","organizations_url":"https://api.github.com/users/gsamokovarov/orgs","repos_url":"https://api.github.com/users/gsamokovarov/repos","events_url":"https://api.github.com/users/gsamokovarov/events{/privacy}","received_events_url":"https://api.github.com/users/gsamokovarov/received_events","type":"User","site_admin":false},"repo":{"id":15263853,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI2Mzg1Mw==","name":"rubocop","full_name":"gsamokovarov/rubocop","private":false,"owner":{"login":"gsamokovarov","id":604618,"node_id":"MDQ6VXNlcjYwNDYxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/604618?v=4","gravatar_id":"","url":"https://api.github.com/users/gsamokovarov","html_url":"https://github.com/gsamokovarov","followers_url":"https://api.github.com/users/gsamokovarov/followers","following_url":"https://api.github.com/users/gsamokovarov/following{/other_user}","gists_url":"https://api.github.com/users/gsamokovarov/gists{/gist_id}","starred_url":"https://api.github.com/users/gsamokovarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsamokovarov/subscriptions","organizations_url":"https://api.github.com/users/gsamokovarov/orgs","repos_url":"https://api.github.com/users/gsamokovarov/repos","events_url":"https://api.github.com/users/gsamokovarov/events{/privacy}","received_events_url":"https://api.github.com/users/gsamokovarov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gsamokovarov/rubocop","description":"A robust Ruby code analyzer, based on the community Ruby style guide.","fork":true,"url":"https://api.github.com/repos/gsamokovarov/rubocop","forks_url":"https://api.github.com/repos/gsamokovarov/rubocop/forks","keys_url":"https://api.github.com/repos/gsamokovarov/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gsamokovarov/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gsamokovarov/rubocop/teams","hooks_url":"https://api.github.com/repos/gsamokovarov/rubocop/hooks","issue_events_url":"https://api.github.com/repos/gsamokovarov/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/gsamokovarov/rubocop/events","assignees_url":"https://api.github.com/repos/gsamokovarov/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/gsamokovarov/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/gsamokovarov/rubocop/tags","blobs_url":"https://api.github.com/repos/gsamokovarov/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gsamokovarov/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gsamokovarov/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/gsamokovarov/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gsamokovarov/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/gsamokovarov/rubocop/languages","stargazers_url":"https://api.github.com/repos/gsamokovarov/rubocop/stargazers","contributors_url":"https://api.github.com/repos/gsamokovarov/rubocop/contributors","subscribers_url":"https://api.github.com/repos/gsamokovarov/rubocop/subscribers","subscription_url":"https://api.github.com/repos/gsamokovarov/rubocop/subscription","commits_url":"https://api.github.com/repos/gsamokovarov/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/gsamokovarov/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/gsamokovarov/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/gsamokovarov/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/gsamokovarov/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/gsamokovarov/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gsamokovarov/rubocop/merges","archive_url":"https://api.github.com/repos/gsamokovarov/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gsamokovarov/rubocop/downloads","issues_url":"https://api.github.com/repos/gsamokovarov/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/gsamokovarov/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/gsamokovarov/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/gsamokovarov/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gsamokovarov/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/gsamokovarov/rubocop/releases{/id}","deployments_url":"https://api.github.com/repos/gsamokovarov/rubocop/deployments","created_at":"2013-12-17T19:29:46Z","updated_at":"2018-05-31T06:59:50Z","pushed_at":"2018-11-26T14:32:20Z","git_url":"git://github.com/gsamokovarov/rubocop.git","ssh_url":"git@github.com:gsamokovarov/rubocop.git","clone_url":"https://github.com/gsamokovarov/rubocop.git","svn_url":"https://github.com/gsamokovarov/rubocop","homepage":"","size":24206,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"rubocop-hq:master","ref":"master","sha":"c32d96888b0a778e63dda5c2329c63907739473a","user":{"login":"rubocop-hq","id":39672756,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NjcyNzU2","avatar_url":"https://avatars3.githubusercontent.com/u/39672756?v=4","gravatar_id":"","url":"https://api.github.com/users/rubocop-hq","html_url":"https://github.com/rubocop-hq","followers_url":"https://api.github.com/users/rubocop-hq/followers","following_url":"https://api.github.com/users/rubocop-hq/following{/other_user}","gists_url":"https://api.github.com/users/rubocop-hq/gists{/gist_id}","starred_url":"https://api.github.com/users/rubocop-hq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubocop-hq/subscriptions","organizations_url":"https://api.github.com/users/rubocop-hq/orgs","repos_url":"https://api.github.com/users/rubocop-hq/repos","events_url":"https://api.github.com/users/rubocop-hq/events{/privacy}","received_events_url":"https://api.github.com/users/rubocop-hq/received_events","type":"Organization","site_admin":false},"repo":{"id":4095287,"node_id":"MDEwOlJlcG9zaXRvcnk0MDk1Mjg3","name":"rubocop","full_name":"rubocop-hq/rubocop","private":false,"owner":{"login":"rubocop-hq","id":39672756,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NjcyNzU2","avatar_url":"https://avatars3.githubusercontent.com/u/39672756?v=4","gravatar_id":"","url":"https://api.github.com/users/rubocop-hq","html_url":"https://github.com/rubocop-hq","followers_url":"https://api.github.com/users/rubocop-hq/followers","following_url":"https://api.github.com/users/rubocop-hq/following{/other_user}","gists_url":"https://api.github.com/users/rubocop-hq/gists{/gist_id}","starred_url":"https://api.github.com/users/rubocop-hq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubocop-hq/subscriptions","organizations_url":"https://api.github.com/users/rubocop-hq/orgs","repos_url":"https://api.github.com/users/rubocop-hq/repos","events_url":"https://api.github.com/users/rubocop-hq/events{/privacy}","received_events_url":"https://api.github.com/users/rubocop-hq/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rubocop-hq/rubocop","description":"A Ruby static code analyzer and formatter, based on the community Ruby style guide.","fork":false,"url":"https://api.github.com/repos/rubocop-hq/rubocop","forks_url":"https://api.github.com/repos/rubocop-hq/rubocop/forks","keys_url":"https://api.github.com/repos/rubocop-hq/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubocop-hq/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubocop-hq/rubocop/teams","hooks_url":"https://api.github.com/repos/rubocop-hq/rubocop/hooks","issue_events_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/rubocop-hq/rubocop/events","assignees_url":"https://api.github.com/repos/rubocop-hq/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/rubocop-hq/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/rubocop-hq/rubocop/tags","blobs_url":"https://api.github.com/repos/rubocop-hq/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubocop-hq/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubocop-hq/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubocop-hq/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubocop-hq/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/rubocop-hq/rubocop/languages","stargazers_url":"https://api.github.com/repos/rubocop-hq/rubocop/stargazers","contributors_url":"https://api.github.com/repos/rubocop-hq/rubocop/contributors","subscribers_url":"https://api.github.com/repos/rubocop-hq/rubocop/subscribers","subscription_url":"https://api.github.com/repos/rubocop-hq/rubocop/subscription","commits_url":"https://api.github.com/repos/rubocop-hq/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubocop-hq/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubocop-hq/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubocop-hq/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/rubocop-hq/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubocop-hq/rubocop/merges","archive_url":"https://api.github.com/repos/rubocop-hq/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubocop-hq/rubocop/downloads","issues_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/rubocop-hq/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/rubocop-hq/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/rubocop-hq/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubocop-hq/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/rubocop-hq/rubocop/releases{/id}","deployments_url":"https://api.github.com/repos/rubocop-hq/rubocop/deployments","created_at":"2012-04-21T10:09:58Z","updated_at":"2018-11-26T11:40:48Z","pushed_at":"2018-11-26T11:19:13Z","git_url":"git://github.com/rubocop-hq/rubocop.git","ssh_url":"git@github.com:rubocop-hq/rubocop.git","clone_url":"https://github.com/rubocop-hq/rubocop.git","svn_url":"https://github.com/rubocop-hq/rubocop","homepage":"https://docs.rubocop.org","size":24274,"stargazers_count":9552,"watchers_count":9552,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1956,"mirror_url":null,"archived":false,"open_issues_count":236,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1956,"open_issues":236,"watchers":9552,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6524"},"html":{"href":"https://github.com/rubocop-hq/rubocop/pull/6524"},"issue":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6524"},"comments":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6524/comments"},"review_comments":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6524/comments"},"review_comment":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6524/commits"},"statuses":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/statuses/c87c74027d0efcd2e28f59eb6077a2b247de732e"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":4,"additions":50,"deletions":26,"changed_files":2}}
{"actor":{"display_login":"gsamokovarov"}}