{"action":"created","comment":{"url":"https://api.github.com/repos/atom/deprecation-cop/pulls/comments/29530595","id":29530595,"diff_hunk":"@@ -1,8 +1,35 @@\n SelectorLinter = require 'atom-selector-linter'\n+CSON = require 'season'\n+fs = require 'fs-plus'\n \n exports.getSelectorDeprecations = ->\n   linter = new SelectorLinter(maxPerPackage: 50)\n   linter.checkPackage(pkg) for pkg in atom.packages.getLoadedPackages()\n+  \n+  userKeymapPath = atom.keymaps.getUserKeymapPath()\n+  \n+  if fs.existsSync(userKeymapPath)","path":"lib/helpers.coffee","position":11,"original_position":11,"commit_id":"af79721df25d555dd74417a2747e5f3f71105c89","original_commit_id":"af79721df25d555dd74417a2747e5f3f71105c89","user":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"body":"Might want to use `fs.isFileSync` here instead just to make it more accurate.","created_at":"2015-05-01T20:22:36Z","updated_at":"2015-05-01T20:22:36Z","html_url":"https://github.com/atom/deprecation-cop/pull/41#discussion_r29530595","pull_request_url":"https://api.github.com/repos/atom/deprecation-cop/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/atom/deprecation-cop/pulls/comments/29530595"},"html":{"href":"https://github.com/atom/deprecation-cop/pull/41#discussion_r29530595"},"pull_request":{"href":"https://api.github.com/repos/atom/deprecation-cop/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/atom/deprecation-cop/pulls/41","id":34544962,"html_url":"https://github.com/atom/deprecation-cop/pull/41","diff_url":"https://github.com/atom/deprecation-cop/pull/41.diff","patch_url":"https://github.com/atom/deprecation-cop/pull/41.patch","issue_url":"https://api.github.com/repos/atom/deprecation-cop/issues/41","number":41,"state":"open","locked":false,"title":"Lint and correctly attribute deprecations from local config files","user":{"login":"izuzak","id":38924,"avatar_url":"https://avatars.githubusercontent.com/u/38924?v=3","gravatar_id":"","url":"https://api.github.com/users/izuzak","html_url":"https://github.com/izuzak","followers_url":"https://api.github.com/users/izuzak/followers","following_url":"https://api.github.com/users/izuzak/following{/other_user}","gists_url":"https://api.github.com/users/izuzak/gists{/gist_id}","starred_url":"https://api.github.com/users/izuzak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izuzak/subscriptions","organizations_url":"https://api.github.com/users/izuzak/orgs","repos_url":"https://api.github.com/users/izuzak/repos","events_url":"https://api.github.com/users/izuzak/events{/privacy}","received_events_url":"https://api.github.com/users/izuzak/received_events","type":"User","site_admin":true},"body":"This is an attempt at fixing https://github.com/atom/deprecation-cop/issues/18 and also fixing how deprecations from `init.coffee` are attributed.\r\n\r\n* b0ccfe2 adds a check to see if a filename in the deprecation stack matches the init script, and sets the package name to \"your local init.coffee file\" if it does\r\n\r\n* 86dcf76 adds linting for the user's local keymap and styles files, and makes deprecations from those files be attributed to \"your local keymap.cson file\" and \"your local styles.less file\"\r\n\r\n* af79721 makes selector deprecation messages render in markdown\r\n\r\nWhat do you think of this direction, @kevinsawicki? I'd still need to think about adding tests for this, but just wanted to ask if this makes sense?\r\n\r\nBefore :camera: (notice that the deprecation from init.coffee is attributed to atom core, and that the selector deprecation message is not rendered in markdown):\r\n\r\n![screen shot 2015-05-01 at 17 12 23](https://cloud.githubusercontent.com/assets/38924/7432402/19a76ce2-f028-11e4-8cb9-c307f792c095.png)\r\n\r\nAfter :camera: (notice that the init.coffee deprecation is correctly attributed, markdown rendering in selector deprecation messages, and that deprecations were found in keymap.cson and styles.less):\r\n\r\n![screen shot 2015-05-01 at 17 10 14](https://cloud.githubusercontent.com/assets/38924/7432401/19a33230-f028-11e4-8400-35c67a226f8e.png)","created_at":"2015-05-01T15:43:02Z","updated_at":"2015-05-01T20:22:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7818a54b8b2920225cd44969ffff8216640530d5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/deprecation-cop/pulls/41/commits","review_comments_url":"https://api.github.com/repos/atom/deprecation-cop/pulls/41/comments","review_comment_url":"https://api.github.com/repos/atom/deprecation-cop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/deprecation-cop/issues/41/comments","statuses_url":"https://api.github.com/repos/atom/deprecation-cop/statuses/af79721df25d555dd74417a2747e5f3f71105c89","head":{"label":"atom:iz-config-files","ref":"iz-config-files","sha":"af79721df25d555dd74417a2747e5f3f71105c89","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":18765014,"name":"deprecation-cop","full_name":"atom/deprecation-cop","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/deprecation-cop","description":"Shows a list of deprecated calls","fork":false,"url":"https://api.github.com/repos/atom/deprecation-cop","forks_url":"https://api.github.com/repos/atom/deprecation-cop/forks","keys_url":"https://api.github.com/repos/atom/deprecation-cop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/deprecation-cop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/deprecation-cop/teams","hooks_url":"https://api.github.com/repos/atom/deprecation-cop/hooks","issue_events_url":"https://api.github.com/repos/atom/deprecation-cop/issues/events{/number}","events_url":"https://api.github.com/repos/atom/deprecation-cop/events","assignees_url":"https://api.github.com/repos/atom/deprecation-cop/assignees{/user}","branches_url":"https://api.github.com/repos/atom/deprecation-cop/branches{/branch}","tags_url":"https://api.github.com/repos/atom/deprecation-cop/tags","blobs_url":"https://api.github.com/repos/atom/deprecation-cop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/deprecation-cop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/deprecation-cop/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/deprecation-cop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/deprecation-cop/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/deprecation-cop/languages","stargazers_url":"https://api.github.com/repos/atom/deprecation-cop/stargazers","contributors_url":"https://api.github.com/repos/atom/deprecation-cop/contributors","subscribers_url":"https://api.github.com/repos/atom/deprecation-cop/subscribers","subscription_url":"https://api.github.com/repos/atom/deprecation-cop/subscription","commits_url":"https://api.github.com/repos/atom/deprecation-cop/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/deprecation-cop/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/deprecation-cop/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/deprecation-cop/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/deprecation-cop/contents/{+path}","compare_url":"https://api.github.com/repos/atom/deprecation-cop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/deprecation-cop/merges","archive_url":"https://api.github.com/repos/atom/deprecation-cop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/deprecation-cop/downloads","issues_url":"https://api.github.com/repos/atom/deprecation-cop/issues{/number}","pulls_url":"https://api.github.com/repos/atom/deprecation-cop/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/deprecation-cop/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/deprecation-cop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/deprecation-cop/labels{/name}","releases_url":"https://api.github.com/repos/atom/deprecation-cop/releases{/id}","created_at":"2014-04-14T15:06:37Z","updated_at":"2015-05-01T17:06:29Z","pushed_at":"2015-05-01T15:43:03Z","git_url":"git://github.com/atom/deprecation-cop.git","ssh_url":"git@github.com:atom/deprecation-cop.git","clone_url":"https://github.com/atom/deprecation-cop.git","svn_url":"https://github.com/atom/deprecation-cop","homepage":"","size":777,"stargazers_count":5,"watchers_count":5,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":5,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"72f80a496705437ba53bc845e1ddbb24c940ab80","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":18765014,"name":"deprecation-cop","full_name":"atom/deprecation-cop","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/deprecation-cop","description":"Shows a list of deprecated calls","fork":false,"url":"https://api.github.com/repos/atom/deprecation-cop","forks_url":"https://api.github.com/repos/atom/deprecation-cop/forks","keys_url":"https://api.github.com/repos/atom/deprecation-cop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/deprecation-cop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/deprecation-cop/teams","hooks_url":"https://api.github.com/repos/atom/deprecation-cop/hooks","issue_events_url":"https://api.github.com/repos/atom/deprecation-cop/issues/events{/number}","events_url":"https://api.github.com/repos/atom/deprecation-cop/events","assignees_url":"https://api.github.com/repos/atom/deprecation-cop/assignees{/user}","branches_url":"https://api.github.com/repos/atom/deprecation-cop/branches{/branch}","tags_url":"https://api.github.com/repos/atom/deprecation-cop/tags","blobs_url":"https://api.github.com/repos/atom/deprecation-cop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/deprecation-cop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/deprecation-cop/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/deprecation-cop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/deprecation-cop/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/deprecation-cop/languages","stargazers_url":"https://api.github.com/repos/atom/deprecation-cop/stargazers","contributors_url":"https://api.github.com/repos/atom/deprecation-cop/contributors","subscribers_url":"https://api.github.com/repos/atom/deprecation-cop/subscribers","subscription_url":"https://api.github.com/repos/atom/deprecation-cop/subscription","commits_url":"https://api.github.com/repos/atom/deprecation-cop/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/deprecation-cop/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/deprecation-cop/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/deprecation-cop/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/deprecation-cop/contents/{+path}","compare_url":"https://api.github.com/repos/atom/deprecation-cop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/deprecation-cop/merges","archive_url":"https://api.github.com/repos/atom/deprecation-cop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/deprecation-cop/downloads","issues_url":"https://api.github.com/repos/atom/deprecation-cop/issues{/number}","pulls_url":"https://api.github.com/repos/atom/deprecation-cop/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/deprecation-cop/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/deprecation-cop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/deprecation-cop/labels{/name}","releases_url":"https://api.github.com/repos/atom/deprecation-cop/releases{/id}","created_at":"2014-04-14T15:06:37Z","updated_at":"2015-05-01T17:06:29Z","pushed_at":"2015-05-01T15:43:03Z","git_url":"git://github.com/atom/deprecation-cop.git","ssh_url":"git@github.com:atom/deprecation-cop.git","clone_url":"https://github.com/atom/deprecation-cop.git","svn_url":"https://github.com/atom/deprecation-cop","homepage":"","size":777,"stargazers_count":5,"watchers_count":5,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/deprecation-cop/pulls/41"},"html":{"href":"https://github.com/atom/deprecation-cop/pull/41"},"issue":{"href":"https://api.github.com/repos/atom/deprecation-cop/issues/41"},"comments":{"href":"https://api.github.com/repos/atom/deprecation-cop/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/deprecation-cop/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/deprecation-cop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/deprecation-cop/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/atom/deprecation-cop/statuses/af79721df25d555dd74417a2747e5f3f71105c89"}}}}