{"action":"closed","number":1795,"pull_request":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1795","id":33272392,"html_url":"https://github.com/bbatsov/rubocop/pull/1795","diff_url":"https://github.com/bbatsov/rubocop/pull/1795.diff","patch_url":"https://github.com/bbatsov/rubocop/pull/1795.patch","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/1795","number":1795,"state":"closed","locked":false,"title":"[Fix #1794] Check if there are tokens before accessing them","user":{"login":"schmijos","id":245443,"avatar_url":"https://avatars.githubusercontent.com/u/245443?v=3","gravatar_id":"","url":"https://api.github.com/users/schmijos","html_url":"https://github.com/schmijos","followers_url":"https://api.github.com/users/schmijos/followers","following_url":"https://api.github.com/users/schmijos/following{/other_user}","gists_url":"https://api.github.com/users/schmijos/gists{/gist_id}","starred_url":"https://api.github.com/users/schmijos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmijos/subscriptions","organizations_url":"https://api.github.com/users/schmijos/orgs","repos_url":"https://api.github.com/users/schmijos/repos","events_url":"https://api.github.com/users/schmijos/events{/privacy}","received_events_url":"https://api.github.com/users/schmijos/received_events","type":"User","site_admin":false},"body":"This PR fixes a problem occurring if rubocop scans empty files containing only new lines (#1794). I extracted the function determining the `__END__` token into an own method which respects empty token lists.\r\n\r\nI'm not sure what to expect from autocorrection though.","created_at":"2015-04-14T16:00:05Z","updated_at":"2015-04-20T20:54:18Z","closed_at":"2015-04-20T20:54:18Z","merged_at":"2015-04-20T20:54:18Z","merge_commit_sha":"969f4d18708bef490ea77208477d211876bf4981","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1795/commits","review_comments_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1795/comments","review_comment_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/1795/comments","statuses_url":"https://api.github.com/repos/bbatsov/rubocop/statuses/885f53f6ef1262b6c51f523c2f1e929ba02690fe","head":{"label":"renuo:master","ref":"master","sha":"885f53f6ef1262b6c51f523c2f1e929ba02690fe","user":{"login":"renuo","id":1863488,"avatar_url":"https://avatars.githubusercontent.com/u/1863488?v=3","gravatar_id":"","url":"https://api.github.com/users/renuo","html_url":"https://github.com/renuo","followers_url":"https://api.github.com/users/renuo/followers","following_url":"https://api.github.com/users/renuo/following{/other_user}","gists_url":"https://api.github.com/users/renuo/gists{/gist_id}","starred_url":"https://api.github.com/users/renuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renuo/subscriptions","organizations_url":"https://api.github.com/users/renuo/orgs","repos_url":"https://api.github.com/users/renuo/repos","events_url":"https://api.github.com/users/renuo/events{/privacy}","received_events_url":"https://api.github.com/users/renuo/received_events","type":"Organization","site_admin":false},"repo":{"id":33937196,"name":"rubocop","full_name":"renuo/rubocop","owner":{"login":"renuo","id":1863488,"avatar_url":"https://avatars.githubusercontent.com/u/1863488?v=3","gravatar_id":"","url":"https://api.github.com/users/renuo","html_url":"https://github.com/renuo","followers_url":"https://api.github.com/users/renuo/followers","following_url":"https://api.github.com/users/renuo/following{/other_user}","gists_url":"https://api.github.com/users/renuo/gists{/gist_id}","starred_url":"https://api.github.com/users/renuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renuo/subscriptions","organizations_url":"https://api.github.com/users/renuo/orgs","repos_url":"https://api.github.com/users/renuo/repos","events_url":"https://api.github.com/users/renuo/events{/privacy}","received_events_url":"https://api.github.com/users/renuo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/renuo/rubocop","description":"A Ruby static code analyzer, based on the community Ruby style guide.","fork":true,"url":"https://api.github.com/repos/renuo/rubocop","forks_url":"https://api.github.com/repos/renuo/rubocop/forks","keys_url":"https://api.github.com/repos/renuo/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/renuo/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/renuo/rubocop/teams","hooks_url":"https://api.github.com/repos/renuo/rubocop/hooks","issue_events_url":"https://api.github.com/repos/renuo/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/renuo/rubocop/events","assignees_url":"https://api.github.com/repos/renuo/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/renuo/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/renuo/rubocop/tags","blobs_url":"https://api.github.com/repos/renuo/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/renuo/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/renuo/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/renuo/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/renuo/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/renuo/rubocop/languages","stargazers_url":"https://api.github.com/repos/renuo/rubocop/stargazers","contributors_url":"https://api.github.com/repos/renuo/rubocop/contributors","subscribers_url":"https://api.github.com/repos/renuo/rubocop/subscribers","subscription_url":"https://api.github.com/repos/renuo/rubocop/subscription","commits_url":"https://api.github.com/repos/renuo/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/renuo/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/renuo/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/renuo/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/renuo/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/renuo/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/renuo/rubocop/merges","archive_url":"https://api.github.com/repos/renuo/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/renuo/rubocop/downloads","issues_url":"https://api.github.com/repos/renuo/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/renuo/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/renuo/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/renuo/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/renuo/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/renuo/rubocop/releases{/id}","created_at":"2015-04-14T14:37:51Z","updated_at":"2015-04-20T19:59:42Z","pushed_at":"2015-04-20T19:59:42Z","git_url":"git://github.com/renuo/rubocop.git","ssh_url":"git@github.com:renuo/rubocop.git","clone_url":"https://github.com/renuo/rubocop.git","svn_url":"https://github.com/renuo/rubocop","homepage":"","size":8775,"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":"533a8be2a104c966224699aec20f1f609b50f625","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-04-20T19:52:11Z","pushed_at":"2015-04-20T20:54:19Z","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":19728,"stargazers_count":4365,"watchers_count":4365,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":450,"mirror_url":null,"open_issues_count":89,"forks":450,"open_issues":89,"watchers":4365,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1795"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/1795"},"issue":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/1795"},"comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/1795/comments"},"review_comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1795/comments"},"review_comment":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/1795/commits"},"statuses":{"href":"https://api.github.com/repos/bbatsov/rubocop/statuses/885f53f6ef1262b6c51f523c2f1e929ba02690fe"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"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},"comments":7,"review_comments":0,"commits":1,"additions":42,"deletions":7,"changed_files":3}}