{"action":"created","comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments/26341635","id":26341635,"diff_hunk":"@@ -5,7 +5,9 @@ module Cop\n     # This module encapsulates the logic for autocorrect behaviour for a cop\n     module AutocorrectLogic\n       def autocorrect?\n-        @options[:auto_correct] && support_autocorrect? && autocorrect_enabled?\n+        return nil unless support_autocorrect?","path":"lib/rubocop/cop/autocorrect_logic.rb","position":5,"original_position":5,"commit_id":"60d9766f6c91e1816db2436ec1026212f9888f44","original_commit_id":"60d9766f6c91e1816db2436ec1026212f9888f44","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":"Boolean methods should return either `true` or `false`. Returning anything else is unexpected/uncommon.","created_at":"2015-03-12T20:34:26Z","updated_at":"2015-03-12T20:34:26Z","html_url":"https://github.com/bbatsov/rubocop/pull/1712#discussion_r26341635","pull_request_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1712","_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments/26341635"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/1712#discussion_r26341635"},"pull_request":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1712"}}},"pull_request":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1712","id":31074660,"html_url":"https://github.com/bbatsov/rubocop/pull/1712","diff_url":"https://github.com/bbatsov/rubocop/pull/1712.diff","patch_url":"https://github.com/bbatsov/rubocop/pull/1712.patch","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/1712","number":1712,"state":"open","locked":false,"title":"Return nil from autocorrect? if cop does not support autocorrection","user":{"login":"vassilevsky","id":252023,"avatar_url":"https://avatars.githubusercontent.com/u/252023?v=3","gravatar_id":"","url":"https://api.github.com/users/vassilevsky","html_url":"https://github.com/vassilevsky","followers_url":"https://api.github.com/users/vassilevsky/followers","following_url":"https://api.github.com/users/vassilevsky/following{/other_user}","gists_url":"https://api.github.com/users/vassilevsky/gists{/gist_id}","starred_url":"https://api.github.com/users/vassilevsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vassilevsky/subscriptions","organizations_url":"https://api.github.com/users/vassilevsky/orgs","repos_url":"https://api.github.com/users/vassilevsky/repos","events_url":"https://api.github.com/users/vassilevsky/events{/privacy}","received_events_url":"https://api.github.com/users/vassilevsky/received_events","type":"User","site_admin":false},"body":"More meaningful values of offenses' `corrected` attribute:\r\n\r\n* `nil` — the cop does not support autocorrection at all;\r\n* `false` — the cop could autocorrect this offense, but didn't do it for one reason or another;\r\n* `true` — the cop has autocorrected this offense.","created_at":"2015-03-12T20:31:48Z","updated_at":"2015-03-12T20:34:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2f9efabf0b0b7899b229d8a36d14dc79dd9ef62","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1712/commits","review_comments_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1712/comments","review_comment_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/1712/comments","statuses_url":"https://api.github.com/repos/bbatsov/rubocop/statuses/60d9766f6c91e1816db2436ec1026212f9888f44","head":{"label":"vassilevsky:corrected","ref":"corrected","sha":"60d9766f6c91e1816db2436ec1026212f9888f44","user":{"login":"vassilevsky","id":252023,"avatar_url":"https://avatars.githubusercontent.com/u/252023?v=3","gravatar_id":"","url":"https://api.github.com/users/vassilevsky","html_url":"https://github.com/vassilevsky","followers_url":"https://api.github.com/users/vassilevsky/followers","following_url":"https://api.github.com/users/vassilevsky/following{/other_user}","gists_url":"https://api.github.com/users/vassilevsky/gists{/gist_id}","starred_url":"https://api.github.com/users/vassilevsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vassilevsky/subscriptions","organizations_url":"https://api.github.com/users/vassilevsky/orgs","repos_url":"https://api.github.com/users/vassilevsky/repos","events_url":"https://api.github.com/users/vassilevsky/events{/privacy}","received_events_url":"https://api.github.com/users/vassilevsky/received_events","type":"User","site_admin":false},"repo":{"id":31034940,"name":"rubocop","full_name":"vassilevsky/rubocop","owner":{"login":"vassilevsky","id":252023,"avatar_url":"https://avatars.githubusercontent.com/u/252023?v=3","gravatar_id":"","url":"https://api.github.com/users/vassilevsky","html_url":"https://github.com/vassilevsky","followers_url":"https://api.github.com/users/vassilevsky/followers","following_url":"https://api.github.com/users/vassilevsky/following{/other_user}","gists_url":"https://api.github.com/users/vassilevsky/gists{/gist_id}","starred_url":"https://api.github.com/users/vassilevsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vassilevsky/subscriptions","organizations_url":"https://api.github.com/users/vassilevsky/orgs","repos_url":"https://api.github.com/users/vassilevsky/repos","events_url":"https://api.github.com/users/vassilevsky/events{/privacy}","received_events_url":"https://api.github.com/users/vassilevsky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vassilevsky/rubocop","description":"A Ruby static code analyzer, based on the community Ruby style guide.","fork":true,"url":"https://api.github.com/repos/vassilevsky/rubocop","forks_url":"https://api.github.com/repos/vassilevsky/rubocop/forks","keys_url":"https://api.github.com/repos/vassilevsky/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vassilevsky/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vassilevsky/rubocop/teams","hooks_url":"https://api.github.com/repos/vassilevsky/rubocop/hooks","issue_events_url":"https://api.github.com/repos/vassilevsky/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/vassilevsky/rubocop/events","assignees_url":"https://api.github.com/repos/vassilevsky/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/vassilevsky/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/vassilevsky/rubocop/tags","blobs_url":"https://api.github.com/repos/vassilevsky/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vassilevsky/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vassilevsky/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/vassilevsky/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vassilevsky/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/vassilevsky/rubocop/languages","stargazers_url":"https://api.github.com/repos/vassilevsky/rubocop/stargazers","contributors_url":"https://api.github.com/repos/vassilevsky/rubocop/contributors","subscribers_url":"https://api.github.com/repos/vassilevsky/rubocop/subscribers","subscription_url":"https://api.github.com/repos/vassilevsky/rubocop/subscription","commits_url":"https://api.github.com/repos/vassilevsky/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/vassilevsky/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/vassilevsky/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/vassilevsky/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/vassilevsky/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/vassilevsky/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vassilevsky/rubocop/merges","archive_url":"https://api.github.com/repos/vassilevsky/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vassilevsky/rubocop/downloads","issues_url":"https://api.github.com/repos/vassilevsky/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/vassilevsky/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/vassilevsky/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/vassilevsky/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vassilevsky/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/vassilevsky/rubocop/releases{/id}","created_at":"2015-02-19T20:22:45Z","updated_at":"2015-02-19T20:22:46Z","pushed_at":"2015-03-12T20:25:29Z","git_url":"git://github.com/vassilevsky/rubocop.git","ssh_url":"git@github.com:vassilevsky/rubocop.git","clone_url":"https://github.com/vassilevsky/rubocop.git","svn_url":"https://github.com/vassilevsky/rubocop","homepage":"","size":8359,"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":"f52bc7e2ec4b5a765bd905884613030d1f984277","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-03-12T20:25:04Z","pushed_at":"2015-03-10T19:49:27Z","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":19039,"stargazers_count":4109,"watchers_count":4109,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":408,"mirror_url":null,"open_issues_count":93,"forks":408,"open_issues":93,"watchers":4109,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1712"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/1712"},"issue":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/1712"},"comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/1712/comments"},"review_comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1712/comments"},"review_comment":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1712/commits"},"statuses":{"href":"https://api.github.com/repos/bbatsov/rubocop/statuses/60d9766f6c91e1816db2436ec1026212f9888f44"}}}}