{"action":"created","comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments/80622448","pull_request_review_id":1667606,"id":80622448,"diff_hunk":"@@ -80,7 +81,14 @@ def body_end?(line)\n         end\n \n         def message(node)\n-          format(MSG, node.loc.selector.source)\n+          previous_line = processed_source[node.loc.line - 2]","path":"lib/rubocop/cop/style/empty_lines_around_access_modifier.rb","position":null,"original_position":15,"commit_id":"e81805bc3e17e6d5a47fc22328beae17f7dc3d6b","original_commit_id":"758dee29695200a13efc4fda8fd6520cba11ecf2","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":"Seems to me you can push the `lstrip` call here.","created_at":"2016-09-27T05:32:06Z","updated_at":"2016-09-27T05:37:25Z","html_url":"https://github.com/bbatsov/rubocop/pull/3527#discussion_r80622448","pull_request_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/3527","_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments/80622448"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/3527#discussion_r80622448"},"pull_request":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/3527"}}},"pull_request":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/3527","id":86412394,"html_url":"https://github.com/bbatsov/rubocop/pull/3527","diff_url":"https://github.com/bbatsov/rubocop/pull/3527.diff","patch_url":"https://github.com/bbatsov/rubocop/pull/3527.patch","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/3527","number":3527,"state":"open","locked":false,"title":"Change misleading message of empty lines around access modifier","user":{"login":"bquorning","id":22333,"avatar_url":"https://avatars.githubusercontent.com/u/22333?v=3","gravatar_id":"","url":"https://api.github.com/users/bquorning","html_url":"https://github.com/bquorning","followers_url":"https://api.github.com/users/bquorning/followers","following_url":"https://api.github.com/users/bquorning/following{/other_user}","gists_url":"https://api.github.com/users/bquorning/gists{/gist_id}","starred_url":"https://api.github.com/users/bquorning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bquorning/subscriptions","organizations_url":"https://api.github.com/users/bquorning/orgs","repos_url":"https://api.github.com/users/bquorning/repos","events_url":"https://api.github.com/users/bquorning/events{/privacy}","received_events_url":"https://api.github.com/users/bquorning/received_events","type":"User","site_admin":false},"body":"The `Style/EmptyLinesAroundAccessModifier` would always say it needed a blank line both above and below an access modifier, even if it was at the beginning of a class, module, or block, where there actually shouldn't be a blank line above.\r\n\r\nFixed #3503.\r\n\r\nI don’t particularly like how the `#message` method now duplicates logic from earlier in the class, i.e. the setting of `previous_line` and the calls to `block_start?` and `class_def?`. Input is much appreciated.\r\n\r\n-----------------\r\n\r\nBefore submitting the PR make sure the following are checked:\r\n\r\n* [x] Wrote [good commit messages][1].\r\n* [x] Commit message starts with `[Fix #issue-number]` (if the related issue exists).\r\n* [x] Used the same coding conventions as the rest of the project.\r\n* [x] Feature branch is up-to-date with `master` (if not - rebase it).\r\n* [x] Squashed related commits together.\r\n* [x] Added tests.\r\n* [x] Added an entry to the [Changelog](../blob/master/CHANGELOG.md) if the new code introduces user-observable changes. See [changelog entry format](../blob/master/CONTRIBUTING.md#changelog-entry-format).\r\n* [x] All tests are passing.\r\n* [x] The new code doesn't generate RuboCop offenses.\r\n* [x] The PR relates to *only* one subject with a clear title\r\n  and description in grammatically correct, complete sentences.\r\n\r\n[1]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html\r\n","created_at":"2016-09-22T20:53:07Z","updated_at":"2016-09-27T05:37:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fce511b9d26dc71e66e929ee5f5ed52f680992ef","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/3527/commits","review_comments_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/3527/comments","review_comment_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/3527/comments","statuses_url":"https://api.github.com/repos/bbatsov/rubocop/statuses/e81805bc3e17e6d5a47fc22328beae17f7dc3d6b","head":{"label":"bquorning:change-misleading-message-of-empty-lines-around-access-modifier","ref":"change-misleading-message-of-empty-lines-around-access-modifier","sha":"e81805bc3e17e6d5a47fc22328beae17f7dc3d6b","user":{"login":"bquorning","id":22333,"avatar_url":"https://avatars.githubusercontent.com/u/22333?v=3","gravatar_id":"","url":"https://api.github.com/users/bquorning","html_url":"https://github.com/bquorning","followers_url":"https://api.github.com/users/bquorning/followers","following_url":"https://api.github.com/users/bquorning/following{/other_user}","gists_url":"https://api.github.com/users/bquorning/gists{/gist_id}","starred_url":"https://api.github.com/users/bquorning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bquorning/subscriptions","organizations_url":"https://api.github.com/users/bquorning/orgs","repos_url":"https://api.github.com/users/bquorning/repos","events_url":"https://api.github.com/users/bquorning/events{/privacy}","received_events_url":"https://api.github.com/users/bquorning/received_events","type":"User","site_admin":false},"repo":{"id":12640527,"name":"rubocop","full_name":"bquorning/rubocop","owner":{"login":"bquorning","id":22333,"avatar_url":"https://avatars.githubusercontent.com/u/22333?v=3","gravatar_id":"","url":"https://api.github.com/users/bquorning","html_url":"https://github.com/bquorning","followers_url":"https://api.github.com/users/bquorning/followers","following_url":"https://api.github.com/users/bquorning/following{/other_user}","gists_url":"https://api.github.com/users/bquorning/gists{/gist_id}","starred_url":"https://api.github.com/users/bquorning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bquorning/subscriptions","organizations_url":"https://api.github.com/users/bquorning/orgs","repos_url":"https://api.github.com/users/bquorning/repos","events_url":"https://api.github.com/users/bquorning/events{/privacy}","received_events_url":"https://api.github.com/users/bquorning/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bquorning/rubocop","description":"An experimental Ruby code analyzer, based on the community Ruby style guide.","fork":true,"url":"https://api.github.com/repos/bquorning/rubocop","forks_url":"https://api.github.com/repos/bquorning/rubocop/forks","keys_url":"https://api.github.com/repos/bquorning/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bquorning/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bquorning/rubocop/teams","hooks_url":"https://api.github.com/repos/bquorning/rubocop/hooks","issue_events_url":"https://api.github.com/repos/bquorning/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/bquorning/rubocop/events","assignees_url":"https://api.github.com/repos/bquorning/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/bquorning/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/bquorning/rubocop/tags","blobs_url":"https://api.github.com/repos/bquorning/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bquorning/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bquorning/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/bquorning/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bquorning/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/bquorning/rubocop/languages","stargazers_url":"https://api.github.com/repos/bquorning/rubocop/stargazers","contributors_url":"https://api.github.com/repos/bquorning/rubocop/contributors","subscribers_url":"https://api.github.com/repos/bquorning/rubocop/subscribers","subscription_url":"https://api.github.com/repos/bquorning/rubocop/subscription","commits_url":"https://api.github.com/repos/bquorning/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/bquorning/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/bquorning/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/bquorning/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/bquorning/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/bquorning/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bquorning/rubocop/merges","archive_url":"https://api.github.com/repos/bquorning/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bquorning/rubocop/downloads","issues_url":"https://api.github.com/repos/bquorning/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/bquorning/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/bquorning/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/bquorning/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bquorning/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/bquorning/rubocop/releases{/id}","deployments_url":"https://api.github.com/repos/bquorning/rubocop/deployments","created_at":"2013-09-06T09:24:28Z","updated_at":"2015-03-18T19:18:40Z","pushed_at":"2016-09-23T08:55:02Z","git_url":"git://github.com/bquorning/rubocop.git","ssh_url":"git@github.com:bquorning/rubocop.git","clone_url":"https://github.com/bquorning/rubocop.git","svn_url":"https://github.com/bquorning/rubocop","homepage":"http://batsov.com/rubocop","size":13139,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"bbatsov:master","ref":"master","sha":"663d17cb3f7b94a61693c5f78e5257c8feb121eb","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}","deployments_url":"https://api.github.com/repos/bbatsov/rubocop/deployments","created_at":"2012-04-21T10:09:58Z","updated_at":"2016-09-26T22:24:13Z","pushed_at":"2016-09-26T20:53:08Z","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":"http://rubocop.readthedocs.io","size":16806,"stargazers_count":6801,"watchers_count":6801,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":996,"mirror_url":null,"open_issues_count":162,"forks":996,"open_issues":162,"watchers":6801,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/3527"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/3527"},"issue":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/3527"},"comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/3527/comments"},"review_comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/3527/comments"},"review_comment":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/3527/commits"},"statuses":{"href":"https://api.github.com/repos/bbatsov/rubocop/statuses/e81805bc3e17e6d5a47fc22328beae17f7dc3d6b"}}}}
{"actor":{"display_login":"bbatsov"}}