{"action":"closed","number":3989,"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/3989","id":46441924,"html_url":"https://github.com/eslint/eslint/pull/3989","diff_url":"https://github.com/eslint/eslint/pull/3989.diff","patch_url":"https://github.com/eslint/eslint/pull/3989.patch","issue_url":"https://api.github.com/repos/eslint/eslint/issues/3989","number":3989,"state":"closed","locked":false,"title":"Ignored files should not throw errors during CLI","user":{"login":"dominicbarnes","id":160197,"avatar_url":"https://avatars.githubusercontent.com/u/160197?v=3","gravatar_id":"","url":"https://api.github.com/users/dominicbarnes","html_url":"https://github.com/dominicbarnes","followers_url":"https://api.github.com/users/dominicbarnes/followers","following_url":"https://api.github.com/users/dominicbarnes/following{/other_user}","gists_url":"https://api.github.com/users/dominicbarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/dominicbarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominicbarnes/subscriptions","organizations_url":"https://api.github.com/users/dominicbarnes/orgs","repos_url":"https://api.github.com/users/dominicbarnes/repos","events_url":"https://api.github.com/users/dominicbarnes/events{/privacy}","received_events_url":"https://api.github.com/users/dominicbarnes/received_events","type":"User","site_admin":false},"body":"Sorry in advance for a PR that does not include any tests. The problem I came across was an extremely weird edge-case that I have not been able to reproduce manually. However, I think my fix is pretty simple and the rationale should make sense regardless.\r\n\r\nAt the point where my change has been made (ie: `executeOnFile()`), there is a `fs.realpathSync()` call that was throwing in the case described by #3978. The file in question was known by ESLint to be ignored, but the realpath call was happening before the early return. I've changed it to exit early once the file is known to be ignored, before running the risk of `fs.realpathSync()` throwing an uncaught exception.\r\n\r\nI'm sure there are other (edge) cases where this `fs.realpathSync()` could throw in this small window, but this prevents errors happening for files that should be ignored in the first place. Not to mention, there's no reason to add the performance penalty of a sync fs call for a file that will just be ignored anyways.","created_at":"2015-09-30T18:58:38Z","updated_at":"2015-10-02T02:02:42Z","closed_at":"2015-10-02T02:02:42Z","merged_at":"2015-10-02T02:02:42Z","merge_commit_sha":"78604b9dafd183f8e563a18e5cba5e807614181f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eslint/eslint/pulls/3989/commits","review_comments_url":"https://api.github.com/repos/eslint/eslint/pulls/3989/comments","review_comment_url":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/3989/comments","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/564051d4bd5ef58f11282e59a9a02da056f48975","head":{"label":"dominicbarnes:ignored-files-should-not-stat","ref":"ignored-files-should-not-stat","sha":"564051d4bd5ef58f11282e59a9a02da056f48975","user":{"login":"dominicbarnes","id":160197,"avatar_url":"https://avatars.githubusercontent.com/u/160197?v=3","gravatar_id":"","url":"https://api.github.com/users/dominicbarnes","html_url":"https://github.com/dominicbarnes","followers_url":"https://api.github.com/users/dominicbarnes/followers","following_url":"https://api.github.com/users/dominicbarnes/following{/other_user}","gists_url":"https://api.github.com/users/dominicbarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/dominicbarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominicbarnes/subscriptions","organizations_url":"https://api.github.com/users/dominicbarnes/orgs","repos_url":"https://api.github.com/users/dominicbarnes/repos","events_url":"https://api.github.com/users/dominicbarnes/events{/privacy}","received_events_url":"https://api.github.com/users/dominicbarnes/received_events","type":"User","site_admin":false},"repo":{"id":36052150,"name":"eslint","full_name":"dominicbarnes/eslint","owner":{"login":"dominicbarnes","id":160197,"avatar_url":"https://avatars.githubusercontent.com/u/160197?v=3","gravatar_id":"","url":"https://api.github.com/users/dominicbarnes","html_url":"https://github.com/dominicbarnes","followers_url":"https://api.github.com/users/dominicbarnes/followers","following_url":"https://api.github.com/users/dominicbarnes/following{/other_user}","gists_url":"https://api.github.com/users/dominicbarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/dominicbarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominicbarnes/subscriptions","organizations_url":"https://api.github.com/users/dominicbarnes/orgs","repos_url":"https://api.github.com/users/dominicbarnes/repos","events_url":"https://api.github.com/users/dominicbarnes/events{/privacy}","received_events_url":"https://api.github.com/users/dominicbarnes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dominicbarnes/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":true,"url":"https://api.github.com/repos/dominicbarnes/eslint","forks_url":"https://api.github.com/repos/dominicbarnes/eslint/forks","keys_url":"https://api.github.com/repos/dominicbarnes/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dominicbarnes/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dominicbarnes/eslint/teams","hooks_url":"https://api.github.com/repos/dominicbarnes/eslint/hooks","issue_events_url":"https://api.github.com/repos/dominicbarnes/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/dominicbarnes/eslint/events","assignees_url":"https://api.github.com/repos/dominicbarnes/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/dominicbarnes/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/dominicbarnes/eslint/tags","blobs_url":"https://api.github.com/repos/dominicbarnes/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dominicbarnes/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dominicbarnes/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/dominicbarnes/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dominicbarnes/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/dominicbarnes/eslint/languages","stargazers_url":"https://api.github.com/repos/dominicbarnes/eslint/stargazers","contributors_url":"https://api.github.com/repos/dominicbarnes/eslint/contributors","subscribers_url":"https://api.github.com/repos/dominicbarnes/eslint/subscribers","subscription_url":"https://api.github.com/repos/dominicbarnes/eslint/subscription","commits_url":"https://api.github.com/repos/dominicbarnes/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/dominicbarnes/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/dominicbarnes/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/dominicbarnes/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/dominicbarnes/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/dominicbarnes/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dominicbarnes/eslint/merges","archive_url":"https://api.github.com/repos/dominicbarnes/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dominicbarnes/eslint/downloads","issues_url":"https://api.github.com/repos/dominicbarnes/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/dominicbarnes/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/dominicbarnes/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/dominicbarnes/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dominicbarnes/eslint/labels{/name}","releases_url":"https://api.github.com/repos/dominicbarnes/eslint/releases{/id}","created_at":"2015-05-22T04:25:53Z","updated_at":"2015-05-22T04:25:55Z","pushed_at":"2015-10-01T20:53:42Z","git_url":"git://github.com/dominicbarnes/eslint.git","ssh_url":"git@github.com:dominicbarnes/eslint.git","clone_url":"https://github.com/dominicbarnes/eslint.git","svn_url":"https://github.com/dominicbarnes/eslint","homepage":"http://eslint.org","size":7726,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"eslint:master","ref":"master","sha":"c273c81828a8535fd46181cb53081ab0c93df431","user":{"login":"eslint","id":6019716,"avatar_url":"https://avatars.githubusercontent.com/u/6019716?v=3","gravatar_id":"","url":"https://api.github.com/users/eslint","html_url":"https://github.com/eslint","followers_url":"https://api.github.com/users/eslint/followers","following_url":"https://api.github.com/users/eslint/following{/other_user}","gists_url":"https://api.github.com/users/eslint/gists{/gist_id}","starred_url":"https://api.github.com/users/eslint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslint/subscriptions","organizations_url":"https://api.github.com/users/eslint/orgs","repos_url":"https://api.github.com/users/eslint/repos","events_url":"https://api.github.com/users/eslint/events{/privacy}","received_events_url":"https://api.github.com/users/eslint/received_events","type":"Organization","site_admin":false},"repo":{"id":11061773,"name":"eslint","full_name":"eslint/eslint","owner":{"login":"eslint","id":6019716,"avatar_url":"https://avatars.githubusercontent.com/u/6019716?v=3","gravatar_id":"","url":"https://api.github.com/users/eslint","html_url":"https://github.com/eslint","followers_url":"https://api.github.com/users/eslint/followers","following_url":"https://api.github.com/users/eslint/following{/other_user}","gists_url":"https://api.github.com/users/eslint/gists{/gist_id}","starred_url":"https://api.github.com/users/eslint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslint/subscriptions","organizations_url":"https://api.github.com/users/eslint/orgs","repos_url":"https://api.github.com/users/eslint/repos","events_url":"https://api.github.com/users/eslint/events{/privacy}","received_events_url":"https://api.github.com/users/eslint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eslint/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":false,"url":"https://api.github.com/repos/eslint/eslint","forks_url":"https://api.github.com/repos/eslint/eslint/forks","keys_url":"https://api.github.com/repos/eslint/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eslint/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eslint/eslint/teams","hooks_url":"https://api.github.com/repos/eslint/eslint/hooks","issue_events_url":"https://api.github.com/repos/eslint/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/eslint/eslint/events","assignees_url":"https://api.github.com/repos/eslint/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/eslint/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/eslint/eslint/tags","blobs_url":"https://api.github.com/repos/eslint/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eslint/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eslint/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/eslint/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/eslint/eslint/languages","stargazers_url":"https://api.github.com/repos/eslint/eslint/stargazers","contributors_url":"https://api.github.com/repos/eslint/eslint/contributors","subscribers_url":"https://api.github.com/repos/eslint/eslint/subscribers","subscription_url":"https://api.github.com/repos/eslint/eslint/subscription","commits_url":"https://api.github.com/repos/eslint/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/eslint/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/eslint/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/eslint/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/eslint/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/eslint/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eslint/eslint/merges","archive_url":"https://api.github.com/repos/eslint/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eslint/eslint/downloads","issues_url":"https://api.github.com/repos/eslint/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/eslint/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/eslint/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/eslint/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eslint/eslint/labels{/name}","releases_url":"https://api.github.com/repos/eslint/eslint/releases{/id}","created_at":"2013-06-29T23:59:48Z","updated_at":"2015-10-02T01:30:30Z","pushed_at":"2015-10-02T02:02:43Z","git_url":"git://github.com/eslint/eslint.git","ssh_url":"git@github.com:eslint/eslint.git","clone_url":"https://github.com/eslint/eslint.git","svn_url":"https://github.com/eslint/eslint","homepage":"http://eslint.org","size":23968,"stargazers_count":3017,"watchers_count":3017,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":573,"mirror_url":null,"open_issues_count":172,"forks":573,"open_issues":172,"watchers":3017,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/3989"},"html":{"href":"https://github.com/eslint/eslint/pull/3989"},"issue":{"href":"https://api.github.com/repos/eslint/eslint/issues/3989"},"comments":{"href":"https://api.github.com/repos/eslint/eslint/issues/3989/comments"},"review_comments":{"href":"https://api.github.com/repos/eslint/eslint/pulls/3989/comments"},"review_comment":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eslint/eslint/pulls/3989/commits"},"statuses":{"href":"https://api.github.com/repos/eslint/eslint/statuses/564051d4bd5ef58f11282e59a9a02da056f48975"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"nzakas","id":38546,"avatar_url":"https://avatars.githubusercontent.com/u/38546?v=3","gravatar_id":"","url":"https://api.github.com/users/nzakas","html_url":"https://github.com/nzakas","followers_url":"https://api.github.com/users/nzakas/followers","following_url":"https://api.github.com/users/nzakas/following{/other_user}","gists_url":"https://api.github.com/users/nzakas/gists{/gist_id}","starred_url":"https://api.github.com/users/nzakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzakas/subscriptions","organizations_url":"https://api.github.com/users/nzakas/orgs","repos_url":"https://api.github.com/users/nzakas/repos","events_url":"https://api.github.com/users/nzakas/events{/privacy}","received_events_url":"https://api.github.com/users/nzakas/received_events","type":"User","site_admin":false},"comments":5,"review_comments":3,"commits":1,"additions":26,"deletions":2,"changed_files":2}}