{"action":"created","comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments/47449361","id":47449361,"diff_hunk":"@@ -14,7 +14,24 @@ def on_send(node)\n         end\n \n         def autocorrect(node)\n-          ->(corrector) { corrector.replace(node.loc.selector, 'attr_reader') }\n+          _receiver, _method_name, attr_name, setter = *node\n+          node_expr = node.loc.expression\n+          attr_expr = attr_name.loc.expression\n+          replacement = 'attr_reader'","path":"lib/rubocop/cop/style/attr.rb","position":17,"original_position":17,"commit_id":"9d02b2f76838c1a1cf4a1c8466a9d676b715122e","original_commit_id":"9d02b2f76838c1a1cf4a1c8466a9d676b715122e","user":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars.githubusercontent.com/u/103882?v=3","gravatar_id":"","url":"https://api.github.com/users/bbatsov","html_url":"https://github.com/bbatsov","followers_url":"https://api.github.com/users/bbatsov/followers","following_url":"https://api.github.com/users/bbatsov/following{/other_user}","gists_url":"https://api.github.com/users/bbatsov/gists{/gist_id}","starred_url":"https://api.github.com/users/bbatsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbatsov/subscriptions","organizations_url":"https://api.github.com/users/bbatsov/orgs","repos_url":"https://api.github.com/users/bbatsov/repos","events_url":"https://api.github.com/users/bbatsov/events{/privacy}","received_events_url":"https://api.github.com/users/bbatsov/received_events","type":"User","site_admin":false},"body":"Changing this \"default value\" afterwards seems a bit confusing to me. I'd rather drop the default. ","created_at":"2015-12-13T20:05:54Z","updated_at":"2015-12-13T20:05:54Z","html_url":"https://github.com/bbatsov/rubocop/pull/2499#discussion_r47449361","pull_request_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/2499","_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments/47449361"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/2499#discussion_r47449361"},"pull_request":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/2499"}}},"pull_request":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/2499","id":53488083,"html_url":"https://github.com/bbatsov/rubocop/pull/2499","diff_url":"https://github.com/bbatsov/rubocop/pull/2499.diff","patch_url":"https://github.com/bbatsov/rubocop/pull/2499.patch","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2499","number":2499,"state":"open","locked":false,"title":"fix attr cop implementation bbatsov/rubocop#2483","user":{"login":"weh","id":482423,"avatar_url":"https://avatars.githubusercontent.com/u/482423?v=3","gravatar_id":"","url":"https://api.github.com/users/weh","html_url":"https://github.com/weh","followers_url":"https://api.github.com/users/weh/followers","following_url":"https://api.github.com/users/weh/following{/other_user}","gists_url":"https://api.github.com/users/weh/gists{/gist_id}","starred_url":"https://api.github.com/users/weh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weh/subscriptions","organizations_url":"https://api.github.com/users/weh/orgs","repos_url":"https://api.github.com/users/weh/repos","events_url":"https://api.github.com/users/weh/events{/privacy}","received_events_url":"https://api.github.com/users/weh/received_events","type":"User","site_admin":false},"body":"extend the attr cop implementation to respect the additional boolean param.\r\nFixes #2483 ","created_at":"2015-12-12T23:08:45Z","updated_at":"2015-12-13T20:05:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"834a64b3324ccbe91c83d45832cedd5253ef7a4f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/2499/commits","review_comments_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/2499/comments","review_comment_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2499/comments","statuses_url":"https://api.github.com/repos/bbatsov/rubocop/statuses/9d02b2f76838c1a1cf4a1c8466a9d676b715122e","head":{"label":"weh:bugfix/attr","ref":"bugfix/attr","sha":"9d02b2f76838c1a1cf4a1c8466a9d676b715122e","user":{"login":"weh","id":482423,"avatar_url":"https://avatars.githubusercontent.com/u/482423?v=3","gravatar_id":"","url":"https://api.github.com/users/weh","html_url":"https://github.com/weh","followers_url":"https://api.github.com/users/weh/followers","following_url":"https://api.github.com/users/weh/following{/other_user}","gists_url":"https://api.github.com/users/weh/gists{/gist_id}","starred_url":"https://api.github.com/users/weh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weh/subscriptions","organizations_url":"https://api.github.com/users/weh/orgs","repos_url":"https://api.github.com/users/weh/repos","events_url":"https://api.github.com/users/weh/events{/privacy}","received_events_url":"https://api.github.com/users/weh/received_events","type":"User","site_admin":false},"repo":{"id":47780893,"name":"rubocop","full_name":"weh/rubocop","owner":{"login":"weh","id":482423,"avatar_url":"https://avatars.githubusercontent.com/u/482423?v=3","gravatar_id":"","url":"https://api.github.com/users/weh","html_url":"https://github.com/weh","followers_url":"https://api.github.com/users/weh/followers","following_url":"https://api.github.com/users/weh/following{/other_user}","gists_url":"https://api.github.com/users/weh/gists{/gist_id}","starred_url":"https://api.github.com/users/weh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weh/subscriptions","organizations_url":"https://api.github.com/users/weh/orgs","repos_url":"https://api.github.com/users/weh/repos","events_url":"https://api.github.com/users/weh/events{/privacy}","received_events_url":"https://api.github.com/users/weh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/weh/rubocop","description":"A Ruby static code analyzer, based on the community Ruby style guide.","fork":true,"url":"https://api.github.com/repos/weh/rubocop","forks_url":"https://api.github.com/repos/weh/rubocop/forks","keys_url":"https://api.github.com/repos/weh/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weh/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weh/rubocop/teams","hooks_url":"https://api.github.com/repos/weh/rubocop/hooks","issue_events_url":"https://api.github.com/repos/weh/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/weh/rubocop/events","assignees_url":"https://api.github.com/repos/weh/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/weh/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/weh/rubocop/tags","blobs_url":"https://api.github.com/repos/weh/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weh/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weh/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/weh/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weh/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/weh/rubocop/languages","stargazers_url":"https://api.github.com/repos/weh/rubocop/stargazers","contributors_url":"https://api.github.com/repos/weh/rubocop/contributors","subscribers_url":"https://api.github.com/repos/weh/rubocop/subscribers","subscription_url":"https://api.github.com/repos/weh/rubocop/subscription","commits_url":"https://api.github.com/repos/weh/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/weh/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/weh/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/weh/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/weh/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/weh/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weh/rubocop/merges","archive_url":"https://api.github.com/repos/weh/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weh/rubocop/downloads","issues_url":"https://api.github.com/repos/weh/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/weh/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/weh/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/weh/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weh/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/weh/rubocop/releases{/id}","created_at":"2015-12-10T18:49:47Z","updated_at":"2015-12-10T18:49:49Z","pushed_at":"2015-12-13T19:53:45Z","git_url":"git://github.com/weh/rubocop.git","ssh_url":"git@github.com:weh/rubocop.git","clone_url":"https://github.com/weh/rubocop.git","svn_url":"https://github.com/weh/rubocop","homepage":"","size":9493,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bbatsov:master","ref":"master","sha":"b1b07dd584fe2ed9b399aa21645afa1ca610371b","user":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars.githubusercontent.com/u/103882?v=3","gravatar_id":"","url":"https://api.github.com/users/bbatsov","html_url":"https://github.com/bbatsov","followers_url":"https://api.github.com/users/bbatsov/followers","following_url":"https://api.github.com/users/bbatsov/following{/other_user}","gists_url":"https://api.github.com/users/bbatsov/gists{/gist_id}","starred_url":"https://api.github.com/users/bbatsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbatsov/subscriptions","organizations_url":"https://api.github.com/users/bbatsov/orgs","repos_url":"https://api.github.com/users/bbatsov/repos","events_url":"https://api.github.com/users/bbatsov/events{/privacy}","received_events_url":"https://api.github.com/users/bbatsov/received_events","type":"User","site_admin":false},"repo":{"id":4095287,"name":"rubocop","full_name":"bbatsov/rubocop","owner":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars.githubusercontent.com/u/103882?v=3","gravatar_id":"","url":"https://api.github.com/users/bbatsov","html_url":"https://github.com/bbatsov","followers_url":"https://api.github.com/users/bbatsov/followers","following_url":"https://api.github.com/users/bbatsov/following{/other_user}","gists_url":"https://api.github.com/users/bbatsov/gists{/gist_id}","starred_url":"https://api.github.com/users/bbatsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbatsov/subscriptions","organizations_url":"https://api.github.com/users/bbatsov/orgs","repos_url":"https://api.github.com/users/bbatsov/repos","events_url":"https://api.github.com/users/bbatsov/events{/privacy}","received_events_url":"https://api.github.com/users/bbatsov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bbatsov/rubocop","description":"A Ruby static code analyzer, based on the community Ruby style guide.","fork":false,"url":"https://api.github.com/repos/bbatsov/rubocop","forks_url":"https://api.github.com/repos/bbatsov/rubocop/forks","keys_url":"https://api.github.com/repos/bbatsov/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbatsov/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbatsov/rubocop/teams","hooks_url":"https://api.github.com/repos/bbatsov/rubocop/hooks","issue_events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/bbatsov/rubocop/events","assignees_url":"https://api.github.com/repos/bbatsov/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/bbatsov/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/bbatsov/rubocop/tags","blobs_url":"https://api.github.com/repos/bbatsov/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbatsov/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbatsov/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbatsov/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbatsov/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/bbatsov/rubocop/languages","stargazers_url":"https://api.github.com/repos/bbatsov/rubocop/stargazers","contributors_url":"https://api.github.com/repos/bbatsov/rubocop/contributors","subscribers_url":"https://api.github.com/repos/bbatsov/rubocop/subscribers","subscription_url":"https://api.github.com/repos/bbatsov/rubocop/subscription","commits_url":"https://api.github.com/repos/bbatsov/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbatsov/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbatsov/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbatsov/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/bbatsov/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbatsov/rubocop/merges","archive_url":"https://api.github.com/repos/bbatsov/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbatsov/rubocop/downloads","issues_url":"https://api.github.com/repos/bbatsov/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/bbatsov/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/bbatsov/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/bbatsov/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbatsov/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/bbatsov/rubocop/releases{/id}","created_at":"2012-04-21T10:09:58Z","updated_at":"2015-12-13T12:41:40Z","pushed_at":"2015-12-13T19:53:45Z","git_url":"git://github.com/bbatsov/rubocop.git","ssh_url":"git@github.com:bbatsov/rubocop.git","clone_url":"https://github.com/bbatsov/rubocop.git","svn_url":"https://github.com/bbatsov/rubocop","homepage":"","size":12306,"stargazers_count":5537,"watchers_count":5537,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":676,"mirror_url":null,"open_issues_count":124,"forks":676,"open_issues":124,"watchers":5537,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/2499"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/2499"},"issue":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/2499"},"comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/2499/comments"},"review_comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/2499/comments"},"review_comment":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/2499/commits"},"statuses":{"href":"https://api.github.com/repos/bbatsov/rubocop/statuses/9d02b2f76838c1a1cf4a1c8466a9d676b715122e"}}}}