{"action":"created","comment":{"url":"https://api.github.com/repos/AtomLinter/Linter/pulls/comments/33179403","id":33179403,"diff_hunk":"@@ -51,15 +52,21 @@ module.exports = (ClassicLinter) ->\n         suffix: textEditor.getGrammar().scopeName\n       }\n       return new Promise((resolve, reject) ->\n-        temp.open(tmpOptions, (err, info) ->\n+        temp.mkdir('AtomLinter', (err, tmpDir) ->\n           return reject(err) if err\n \n           try\n-            fs.writeSync(info.fd, textEditor.getText())\n-            fs.closeSync(info.fd)\n+            tmpFile = path.join(tmpDir, path.basename(filePath))\n+            fs.writeFileSync(tmpFile, textEditor.getText())","path":"lib/legacy.coffee","position":18,"original_position":18,"commit_id":"05a545b68234d72b85ee247e613521c08c1fc51c","original_commit_id":"05a545b68234d72b85ee247e613521c08c1fc51c","user":{"login":"AsaAyers","id":324999,"avatar_url":"https://avatars.githubusercontent.com/u/324999?v=3","gravatar_id":"","url":"https://api.github.com/users/AsaAyers","html_url":"https://github.com/AsaAyers","followers_url":"https://api.github.com/users/AsaAyers/followers","following_url":"https://api.github.com/users/AsaAyers/following{/other_user}","gists_url":"https://api.github.com/users/AsaAyers/gists{/gist_id}","starred_url":"https://api.github.com/users/AsaAyers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AsaAyers/subscriptions","organizations_url":"https://api.github.com/users/AsaAyers/orgs","repos_url":"https://api.github.com/users/AsaAyers/repos","events_url":"https://api.github.com/users/AsaAyers/events{/privacy}","received_events_url":"https://api.github.com/users/AsaAyers/received_events","type":"User","site_admin":false},"body":"I hate Node's callback style because it makes the code really ugly and awkward to work with.\r\n\r\nIt's supposed to stop the event loop. That's what `*Sync` means.","created_at":"2015-06-24T18:26:01Z","updated_at":"2015-06-24T18:26:01Z","html_url":"https://github.com/AtomLinter/Linter/pull/603#discussion_r33179403","pull_request_url":"https://api.github.com/repos/AtomLinter/Linter/pulls/603","_links":{"self":{"href":"https://api.github.com/repos/AtomLinter/Linter/pulls/comments/33179403"},"html":{"href":"https://github.com/AtomLinter/Linter/pull/603#discussion_r33179403"},"pull_request":{"href":"https://api.github.com/repos/AtomLinter/Linter/pulls/603"}}},"pull_request":{"url":"https://api.github.com/repos/AtomLinter/Linter/pulls/603","id":38470127,"html_url":"https://github.com/AtomLinter/Linter/pull/603","diff_url":"https://github.com/AtomLinter/Linter/pull/603.diff","patch_url":"https://github.com/AtomLinter/Linter/pull/603.patch","issue_url":"https://api.github.com/repos/AtomLinter/Linter/issues/603","number":603,"state":"open","locked":false,"title":"Use a temporary directory instead of a temporary file","user":{"login":"AsaAyers","id":324999,"avatar_url":"https://avatars.githubusercontent.com/u/324999?v=3","gravatar_id":"","url":"https://api.github.com/users/AsaAyers","html_url":"https://github.com/AsaAyers","followers_url":"https://api.github.com/users/AsaAyers/followers","following_url":"https://api.github.com/users/AsaAyers/following{/other_user}","gists_url":"https://api.github.com/users/AsaAyers/gists{/gist_id}","starred_url":"https://api.github.com/users/AsaAyers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AsaAyers/subscriptions","organizations_url":"https://api.github.com/users/AsaAyers/orgs","repos_url":"https://api.github.com/users/AsaAyers/repos","events_url":"https://api.github.com/users/AsaAyers/events{/privacy}","received_events_url":"https://api.github.com/users/AsaAyers/received_events","type":"User","site_admin":false},"body":"Fixes #585 ","created_at":"2015-06-24T18:06:26Z","updated_at":"2015-06-24T18:26:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e835a11d2e9864524dc41c4186485a54d799b96b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AtomLinter/Linter/pulls/603/commits","review_comments_url":"https://api.github.com/repos/AtomLinter/Linter/pulls/603/comments","review_comment_url":"https://api.github.com/repos/AtomLinter/Linter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AtomLinter/Linter/issues/603/comments","statuses_url":"https://api.github.com/repos/AtomLinter/Linter/statuses/05a545b68234d72b85ee247e613521c08c1fc51c","head":{"label":"AtomLinter:maintain-filename","ref":"maintain-filename","sha":"05a545b68234d72b85ee247e613521c08c1fc51c","user":{"login":"AtomLinter","id":7242824,"avatar_url":"https://avatars.githubusercontent.com/u/7242824?v=3","gravatar_id":"","url":"https://api.github.com/users/AtomLinter","html_url":"https://github.com/AtomLinter","followers_url":"https://api.github.com/users/AtomLinter/followers","following_url":"https://api.github.com/users/AtomLinter/following{/other_user}","gists_url":"https://api.github.com/users/AtomLinter/gists{/gist_id}","starred_url":"https://api.github.com/users/AtomLinter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtomLinter/subscriptions","organizations_url":"https://api.github.com/users/AtomLinter/orgs","repos_url":"https://api.github.com/users/AtomLinter/repos","events_url":"https://api.github.com/users/AtomLinter/events{/privacy}","received_events_url":"https://api.github.com/users/AtomLinter/received_events","type":"Organization","site_admin":false},"repo":{"id":18612437,"name":"Linter","full_name":"AtomLinter/Linter","owner":{"login":"AtomLinter","id":7242824,"avatar_url":"https://avatars.githubusercontent.com/u/7242824?v=3","gravatar_id":"","url":"https://api.github.com/users/AtomLinter","html_url":"https://github.com/AtomLinter","followers_url":"https://api.github.com/users/AtomLinter/followers","following_url":"https://api.github.com/users/AtomLinter/following{/other_user}","gists_url":"https://api.github.com/users/AtomLinter/gists{/gist_id}","starred_url":"https://api.github.com/users/AtomLinter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtomLinter/subscriptions","organizations_url":"https://api.github.com/users/AtomLinter/orgs","repos_url":"https://api.github.com/users/AtomLinter/repos","events_url":"https://api.github.com/users/AtomLinter/events{/privacy}","received_events_url":"https://api.github.com/users/AtomLinter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AtomLinter/Linter","description":"Inline code linting for Atom","fork":false,"url":"https://api.github.com/repos/AtomLinter/Linter","forks_url":"https://api.github.com/repos/AtomLinter/Linter/forks","keys_url":"https://api.github.com/repos/AtomLinter/Linter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AtomLinter/Linter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AtomLinter/Linter/teams","hooks_url":"https://api.github.com/repos/AtomLinter/Linter/hooks","issue_events_url":"https://api.github.com/repos/AtomLinter/Linter/issues/events{/number}","events_url":"https://api.github.com/repos/AtomLinter/Linter/events","assignees_url":"https://api.github.com/repos/AtomLinter/Linter/assignees{/user}","branches_url":"https://api.github.com/repos/AtomLinter/Linter/branches{/branch}","tags_url":"https://api.github.com/repos/AtomLinter/Linter/tags","blobs_url":"https://api.github.com/repos/AtomLinter/Linter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AtomLinter/Linter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AtomLinter/Linter/git/refs{/sha}","trees_url":"https://api.github.com/repos/AtomLinter/Linter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AtomLinter/Linter/statuses/{sha}","languages_url":"https://api.github.com/repos/AtomLinter/Linter/languages","stargazers_url":"https://api.github.com/repos/AtomLinter/Linter/stargazers","contributors_url":"https://api.github.com/repos/AtomLinter/Linter/contributors","subscribers_url":"https://api.github.com/repos/AtomLinter/Linter/subscribers","subscription_url":"https://api.github.com/repos/AtomLinter/Linter/subscription","commits_url":"https://api.github.com/repos/AtomLinter/Linter/commits{/sha}","git_commits_url":"https://api.github.com/repos/AtomLinter/Linter/git/commits{/sha}","comments_url":"https://api.github.com/repos/AtomLinter/Linter/comments{/number}","issue_comment_url":"https://api.github.com/repos/AtomLinter/Linter/issues/comments{/number}","contents_url":"https://api.github.com/repos/AtomLinter/Linter/contents/{+path}","compare_url":"https://api.github.com/repos/AtomLinter/Linter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AtomLinter/Linter/merges","archive_url":"https://api.github.com/repos/AtomLinter/Linter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AtomLinter/Linter/downloads","issues_url":"https://api.github.com/repos/AtomLinter/Linter/issues{/number}","pulls_url":"https://api.github.com/repos/AtomLinter/Linter/pulls{/number}","milestones_url":"https://api.github.com/repos/AtomLinter/Linter/milestones{/number}","notifications_url":"https://api.github.com/repos/AtomLinter/Linter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AtomLinter/Linter/labels{/name}","releases_url":"https://api.github.com/repos/AtomLinter/Linter/releases{/id}","created_at":"2014-04-09T20:39:52Z","updated_at":"2015-06-24T14:11:27Z","pushed_at":"2015-06-24T18:14:59Z","git_url":"git://github.com/AtomLinter/Linter.git","ssh_url":"git@github.com:AtomLinter/Linter.git","clone_url":"https://github.com/AtomLinter/Linter.git","svn_url":"https://github.com/AtomLinter/Linter","homepage":"","size":3345,"stargazers_count":261,"watchers_count":261,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":76,"mirror_url":null,"open_issues_count":12,"forks":76,"open_issues":12,"watchers":261,"default_branch":"master"}},"base":{"label":"AtomLinter:master","ref":"master","sha":"748a29a7eed392819870cbeae54203e293a99e9f","user":{"login":"AtomLinter","id":7242824,"avatar_url":"https://avatars.githubusercontent.com/u/7242824?v=3","gravatar_id":"","url":"https://api.github.com/users/AtomLinter","html_url":"https://github.com/AtomLinter","followers_url":"https://api.github.com/users/AtomLinter/followers","following_url":"https://api.github.com/users/AtomLinter/following{/other_user}","gists_url":"https://api.github.com/users/AtomLinter/gists{/gist_id}","starred_url":"https://api.github.com/users/AtomLinter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtomLinter/subscriptions","organizations_url":"https://api.github.com/users/AtomLinter/orgs","repos_url":"https://api.github.com/users/AtomLinter/repos","events_url":"https://api.github.com/users/AtomLinter/events{/privacy}","received_events_url":"https://api.github.com/users/AtomLinter/received_events","type":"Organization","site_admin":false},"repo":{"id":18612437,"name":"Linter","full_name":"AtomLinter/Linter","owner":{"login":"AtomLinter","id":7242824,"avatar_url":"https://avatars.githubusercontent.com/u/7242824?v=3","gravatar_id":"","url":"https://api.github.com/users/AtomLinter","html_url":"https://github.com/AtomLinter","followers_url":"https://api.github.com/users/AtomLinter/followers","following_url":"https://api.github.com/users/AtomLinter/following{/other_user}","gists_url":"https://api.github.com/users/AtomLinter/gists{/gist_id}","starred_url":"https://api.github.com/users/AtomLinter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtomLinter/subscriptions","organizations_url":"https://api.github.com/users/AtomLinter/orgs","repos_url":"https://api.github.com/users/AtomLinter/repos","events_url":"https://api.github.com/users/AtomLinter/events{/privacy}","received_events_url":"https://api.github.com/users/AtomLinter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AtomLinter/Linter","description":"Inline code linting for Atom","fork":false,"url":"https://api.github.com/repos/AtomLinter/Linter","forks_url":"https://api.github.com/repos/AtomLinter/Linter/forks","keys_url":"https://api.github.com/repos/AtomLinter/Linter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AtomLinter/Linter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AtomLinter/Linter/teams","hooks_url":"https://api.github.com/repos/AtomLinter/Linter/hooks","issue_events_url":"https://api.github.com/repos/AtomLinter/Linter/issues/events{/number}","events_url":"https://api.github.com/repos/AtomLinter/Linter/events","assignees_url":"https://api.github.com/repos/AtomLinter/Linter/assignees{/user}","branches_url":"https://api.github.com/repos/AtomLinter/Linter/branches{/branch}","tags_url":"https://api.github.com/repos/AtomLinter/Linter/tags","blobs_url":"https://api.github.com/repos/AtomLinter/Linter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AtomLinter/Linter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AtomLinter/Linter/git/refs{/sha}","trees_url":"https://api.github.com/repos/AtomLinter/Linter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AtomLinter/Linter/statuses/{sha}","languages_url":"https://api.github.com/repos/AtomLinter/Linter/languages","stargazers_url":"https://api.github.com/repos/AtomLinter/Linter/stargazers","contributors_url":"https://api.github.com/repos/AtomLinter/Linter/contributors","subscribers_url":"https://api.github.com/repos/AtomLinter/Linter/subscribers","subscription_url":"https://api.github.com/repos/AtomLinter/Linter/subscription","commits_url":"https://api.github.com/repos/AtomLinter/Linter/commits{/sha}","git_commits_url":"https://api.github.com/repos/AtomLinter/Linter/git/commits{/sha}","comments_url":"https://api.github.com/repos/AtomLinter/Linter/comments{/number}","issue_comment_url":"https://api.github.com/repos/AtomLinter/Linter/issues/comments{/number}","contents_url":"https://api.github.com/repos/AtomLinter/Linter/contents/{+path}","compare_url":"https://api.github.com/repos/AtomLinter/Linter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AtomLinter/Linter/merges","archive_url":"https://api.github.com/repos/AtomLinter/Linter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AtomLinter/Linter/downloads","issues_url":"https://api.github.com/repos/AtomLinter/Linter/issues{/number}","pulls_url":"https://api.github.com/repos/AtomLinter/Linter/pulls{/number}","milestones_url":"https://api.github.com/repos/AtomLinter/Linter/milestones{/number}","notifications_url":"https://api.github.com/repos/AtomLinter/Linter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AtomLinter/Linter/labels{/name}","releases_url":"https://api.github.com/repos/AtomLinter/Linter/releases{/id}","created_at":"2014-04-09T20:39:52Z","updated_at":"2015-06-24T14:11:27Z","pushed_at":"2015-06-24T18:14:59Z","git_url":"git://github.com/AtomLinter/Linter.git","ssh_url":"git@github.com:AtomLinter/Linter.git","clone_url":"https://github.com/AtomLinter/Linter.git","svn_url":"https://github.com/AtomLinter/Linter","homepage":"","size":3345,"stargazers_count":261,"watchers_count":261,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":76,"mirror_url":null,"open_issues_count":12,"forks":76,"open_issues":12,"watchers":261,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AtomLinter/Linter/pulls/603"},"html":{"href":"https://github.com/AtomLinter/Linter/pull/603"},"issue":{"href":"https://api.github.com/repos/AtomLinter/Linter/issues/603"},"comments":{"href":"https://api.github.com/repos/AtomLinter/Linter/issues/603/comments"},"review_comments":{"href":"https://api.github.com/repos/AtomLinter/Linter/pulls/603/comments"},"review_comment":{"href":"https://api.github.com/repos/AtomLinter/Linter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AtomLinter/Linter/pulls/603/commits"},"statuses":{"href":"https://api.github.com/repos/AtomLinter/Linter/statuses/05a545b68234d72b85ee247e613521c08c1fc51c"}}}}