{"action":"created","comment":{"url":"https://api.github.com/repos/palantir/tslint/pulls/comments/24475957","id":24475957,"diff_hunk":"@@ -47,7 +62,30 @@ class CommentWalker extends Lint.RuleWalker {\n                 }\n             }\n         });\n-        // no need to call super to visit the rest of the nodes, so don't call super here\n+    }\n+\n+    public visitRegularExpressionLiteral(node: ts.Node) {\n+        if (node.getStart() < node.getEnd()) {\n+            // only add to the map nodes whose end comes after their start, to prevent infinite loops\n+            this.tokensToSkipStartEndMap[node.getStart()] = node.getEnd();\n+        }\n+        super.visitRegularExpressionLiteral(node);\n+    }\n+\n+    public visitIdentifier(node: ts.Identifier) {\n+        if (node.getStart() < node.getEnd()) {\n+            // only add to the map nodes whose end comes after their start, to prevent infinite loops\n+            this.tokensToSkipStartEndMap[node.getStart()] = node.getEnd();\n+        }\n+        super.visitIdentifier(node);\n+    }\n+\n+    public visitTemplateExpression(node: ts.TemplateExpression) {","path":"src/rules/commentFormatRule.ts","position":47,"original_position":47,"commit_id":"4073a38e1429c3eef5e0dae46f91d41572f1cdad","original_commit_id":"4073a38e1429c3eef5e0dae46f91d41572f1cdad","user":{"login":"ashwinr","id":362990,"avatar_url":"https://avatars.githubusercontent.com/u/362990?v=3","gravatar_id":"","url":"https://api.github.com/users/ashwinr","html_url":"https://github.com/ashwinr","followers_url":"https://api.github.com/users/ashwinr/followers","following_url":"https://api.github.com/users/ashwinr/following{/other_user}","gists_url":"https://api.github.com/users/ashwinr/gists{/gist_id}","starred_url":"https://api.github.com/users/ashwinr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashwinr/subscriptions","organizations_url":"https://api.github.com/users/ashwinr/orgs","repos_url":"https://api.github.com/users/ashwinr/repos","events_url":"https://api.github.com/users/ashwinr/events{/privacy}","received_events_url":"https://api.github.com/users/ashwinr/received_events","type":"User","site_admin":false},"body":"There's a lot of repetition in these 3 methods. Split out this block into a private addNode method and call it from all these methods","created_at":"2015-02-11T06:09:26Z","updated_at":"2015-02-11T06:09:26Z","html_url":"https://github.com/palantir/tslint/pull/311#discussion_r24475957","pull_request_url":"https://api.github.com/repos/palantir/tslint/pulls/311","_links":{"self":{"href":"https://api.github.com/repos/palantir/tslint/pulls/comments/24475957"},"html":{"href":"https://github.com/palantir/tslint/pull/311#discussion_r24475957"},"pull_request":{"href":"https://api.github.com/repos/palantir/tslint/pulls/311"}}},"pull_request":{"url":"https://api.github.com/repos/palantir/tslint/pulls/311","id":29035409,"html_url":"https://github.com/palantir/tslint/pull/311","diff_url":"https://github.com/palantir/tslint/pull/311.diff","patch_url":"https://github.com/palantir/tslint/pull/311.patch","issue_url":"https://api.github.com/repos/palantir/tslint/issues/311","number":311,"state":"open","locked":false,"title":"Fixes #293","user":{"login":"gscshoyru","id":2463526,"avatar_url":"https://avatars.githubusercontent.com/u/2463526?v=3","gravatar_id":"","url":"https://api.github.com/users/gscshoyru","html_url":"https://github.com/gscshoyru","followers_url":"https://api.github.com/users/gscshoyru/followers","following_url":"https://api.github.com/users/gscshoyru/following{/other_user}","gists_url":"https://api.github.com/users/gscshoyru/gists{/gist_id}","starred_url":"https://api.github.com/users/gscshoyru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gscshoyru/subscriptions","organizations_url":"https://api.github.com/users/gscshoyru/orgs","repos_url":"https://api.github.com/users/gscshoyru/repos","events_url":"https://api.github.com/users/gscshoyru/events{/privacy}","received_events_url":"https://api.github.com/users/gscshoyru/received_events","type":"User","site_admin":false},"body":"Comment format rule should skip templates (and other things). And the\r\nwhitespace rule should skip templates too.","created_at":"2015-02-10T19:13:49Z","updated_at":"2015-02-11T06:09:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"164d1454047b5b3a647c78d0382d51dd09b540b2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/palantir/tslint/pulls/311/commits","review_comments_url":"https://api.github.com/repos/palantir/tslint/pulls/311/comments","review_comment_url":"https://api.github.com/repos/palantir/tslint/pulls/comments/{number}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/311/comments","statuses_url":"https://api.github.com/repos/palantir/tslint/statuses/4073a38e1429c3eef5e0dae46f91d41572f1cdad","head":{"label":"gscshoyru:fix-comment-rule","ref":"fix-comment-rule","sha":"4073a38e1429c3eef5e0dae46f91d41572f1cdad","user":{"login":"gscshoyru","id":2463526,"avatar_url":"https://avatars.githubusercontent.com/u/2463526?v=3","gravatar_id":"","url":"https://api.github.com/users/gscshoyru","html_url":"https://github.com/gscshoyru","followers_url":"https://api.github.com/users/gscshoyru/followers","following_url":"https://api.github.com/users/gscshoyru/following{/other_user}","gists_url":"https://api.github.com/users/gscshoyru/gists{/gist_id}","starred_url":"https://api.github.com/users/gscshoyru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gscshoyru/subscriptions","organizations_url":"https://api.github.com/users/gscshoyru/orgs","repos_url":"https://api.github.com/users/gscshoyru/repos","events_url":"https://api.github.com/users/gscshoyru/events{/privacy}","received_events_url":"https://api.github.com/users/gscshoyru/received_events","type":"User","site_admin":false},"repo":{"id":14902457,"name":"tslint","full_name":"gscshoyru/tslint","owner":{"login":"gscshoyru","id":2463526,"avatar_url":"https://avatars.githubusercontent.com/u/2463526?v=3","gravatar_id":"","url":"https://api.github.com/users/gscshoyru","html_url":"https://github.com/gscshoyru","followers_url":"https://api.github.com/users/gscshoyru/followers","following_url":"https://api.github.com/users/gscshoyru/following{/other_user}","gists_url":"https://api.github.com/users/gscshoyru/gists{/gist_id}","starred_url":"https://api.github.com/users/gscshoyru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gscshoyru/subscriptions","organizations_url":"https://api.github.com/users/gscshoyru/orgs","repos_url":"https://api.github.com/users/gscshoyru/repos","events_url":"https://api.github.com/users/gscshoyru/events{/privacy}","received_events_url":"https://api.github.com/users/gscshoyru/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gscshoyru/tslint","description":"A linter for the TypeScript language.","fork":true,"url":"https://api.github.com/repos/gscshoyru/tslint","forks_url":"https://api.github.com/repos/gscshoyru/tslint/forks","keys_url":"https://api.github.com/repos/gscshoyru/tslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gscshoyru/tslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gscshoyru/tslint/teams","hooks_url":"https://api.github.com/repos/gscshoyru/tslint/hooks","issue_events_url":"https://api.github.com/repos/gscshoyru/tslint/issues/events{/number}","events_url":"https://api.github.com/repos/gscshoyru/tslint/events","assignees_url":"https://api.github.com/repos/gscshoyru/tslint/assignees{/user}","branches_url":"https://api.github.com/repos/gscshoyru/tslint/branches{/branch}","tags_url":"https://api.github.com/repos/gscshoyru/tslint/tags","blobs_url":"https://api.github.com/repos/gscshoyru/tslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gscshoyru/tslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gscshoyru/tslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/gscshoyru/tslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gscshoyru/tslint/statuses/{sha}","languages_url":"https://api.github.com/repos/gscshoyru/tslint/languages","stargazers_url":"https://api.github.com/repos/gscshoyru/tslint/stargazers","contributors_url":"https://api.github.com/repos/gscshoyru/tslint/contributors","subscribers_url":"https://api.github.com/repos/gscshoyru/tslint/subscribers","subscription_url":"https://api.github.com/repos/gscshoyru/tslint/subscription","commits_url":"https://api.github.com/repos/gscshoyru/tslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/gscshoyru/tslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/gscshoyru/tslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/gscshoyru/tslint/issues/comments/{number}","contents_url":"https://api.github.com/repos/gscshoyru/tslint/contents/{+path}","compare_url":"https://api.github.com/repos/gscshoyru/tslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gscshoyru/tslint/merges","archive_url":"https://api.github.com/repos/gscshoyru/tslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gscshoyru/tslint/downloads","issues_url":"https://api.github.com/repos/gscshoyru/tslint/issues{/number}","pulls_url":"https://api.github.com/repos/gscshoyru/tslint/pulls{/number}","milestones_url":"https://api.github.com/repos/gscshoyru/tslint/milestones{/number}","notifications_url":"https://api.github.com/repos/gscshoyru/tslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gscshoyru/tslint/labels{/name}","releases_url":"https://api.github.com/repos/gscshoyru/tslint/releases{/id}","created_at":"2013-12-03T18:45:57Z","updated_at":"2014-04-04T23:11:08Z","pushed_at":"2015-02-10T19:13:07Z","git_url":"git://github.com/gscshoyru/tslint.git","ssh_url":"git@github.com:gscshoyru/tslint.git","clone_url":"https://github.com/gscshoyru/tslint.git","svn_url":"https://github.com/gscshoyru/tslint","homepage":null,"size":8397,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":"palantir:master","ref":"master","sha":"8f36fc13c68a7bd61f34568fa1d5ece9ce86b551","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":11672345,"name":"tslint","full_name":"palantir/tslint","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/tslint","description":"A linter for the TypeScript language.","fork":false,"url":"https://api.github.com/repos/palantir/tslint","forks_url":"https://api.github.com/repos/palantir/tslint/forks","keys_url":"https://api.github.com/repos/palantir/tslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/tslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/tslint/teams","hooks_url":"https://api.github.com/repos/palantir/tslint/hooks","issue_events_url":"https://api.github.com/repos/palantir/tslint/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/tslint/events","assignees_url":"https://api.github.com/repos/palantir/tslint/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/tslint/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/tslint/tags","blobs_url":"https://api.github.com/repos/palantir/tslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/tslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/tslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/tslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/tslint/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/tslint/languages","stargazers_url":"https://api.github.com/repos/palantir/tslint/stargazers","contributors_url":"https://api.github.com/repos/palantir/tslint/contributors","subscribers_url":"https://api.github.com/repos/palantir/tslint/subscribers","subscription_url":"https://api.github.com/repos/palantir/tslint/subscription","commits_url":"https://api.github.com/repos/palantir/tslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/tslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/tslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/tslint/issues/comments/{number}","contents_url":"https://api.github.com/repos/palantir/tslint/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/tslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/tslint/merges","archive_url":"https://api.github.com/repos/palantir/tslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/tslint/downloads","issues_url":"https://api.github.com/repos/palantir/tslint/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/tslint/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/tslint/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/tslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/tslint/labels{/name}","releases_url":"https://api.github.com/repos/palantir/tslint/releases{/id}","created_at":"2013-07-25T22:19:18Z","updated_at":"2015-02-11T06:05:38Z","pushed_at":"2015-02-11T06:05:37Z","git_url":"git://github.com/palantir/tslint.git","ssh_url":"git@github.com:palantir/tslint.git","clone_url":"https://github.com/palantir/tslint.git","svn_url":"https://github.com/palantir/tslint","homepage":null,"size":10946,"stargazers_count":191,"watchers_count":191,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":51,"mirror_url":null,"open_issues_count":43,"forks":51,"open_issues":43,"watchers":191,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/tslint/pulls/311"},"html":{"href":"https://github.com/palantir/tslint/pull/311"},"issue":{"href":"https://api.github.com/repos/palantir/tslint/issues/311"},"comments":{"href":"https://api.github.com/repos/palantir/tslint/issues/311/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/tslint/pulls/311/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/tslint/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/palantir/tslint/pulls/311/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/tslint/statuses/4073a38e1429c3eef5e0dae46f91d41572f1cdad"}}}}