{"action":"created","comment":{"url":"https://api.github.com/repos/eslint/eslint/pulls/comments/52538151","id":52538151,"diff_hunk":"@@ -20,6 +21,7 @@ var path = require(\"path\");\n //------------------------------------------------------------------------------\n var fixture = fs.readFileSync(path.join(__dirname, \"../../fixtures/rules/indent/indent-invalid-fixture-1.js\"), \"utf8\");\n var fixedFixture = fs.readFileSync(path.join(__dirname, \"../../fixtures/rules/indent/indent-valid-fixture-1.js\"), \"utf8\");\n+var fixedFixtureTabs = fs.readFileSync(path.join(__dirname, \"../../fixtures/rules/indent/indent-valid-fixture-1-tabs.js\"), \"utf8\");","path":"tests/lib/rules/indent.js","position":12,"original_position":12,"commit_id":"6b6a8ab28e648c00c7f3fcbc78ffcbb7235272e1","original_commit_id":"6b6a8ab28e648c00c7f3fcbc78ffcbb7235272e1","user":{"login":"xjamundx","id":246143,"avatar_url":"https://avatars.githubusercontent.com/u/246143?v=3","gravatar_id":"","url":"https://api.github.com/users/xjamundx","html_url":"https://github.com/xjamundx","followers_url":"https://api.github.com/users/xjamundx/followers","following_url":"https://api.github.com/users/xjamundx/following{/other_user}","gists_url":"https://api.github.com/users/xjamundx/gists{/gist_id}","starred_url":"https://api.github.com/users/xjamundx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xjamundx/subscriptions","organizations_url":"https://api.github.com/users/xjamundx/orgs","repos_url":"https://api.github.com/users/xjamundx/repos","events_url":"https://api.github.com/users/xjamundx/events{/privacy}","received_events_url":"https://api.github.com/users/xjamundx/received_events","type":"User","site_admin":false},"body":"This test using this is missing, but I assume it's coming","created_at":"2016-02-10T22:39:14Z","updated_at":"2016-02-10T22:39:14Z","html_url":"https://github.com/eslint/eslint/pull/4363#discussion_r52538151","pull_request_url":"https://api.github.com/repos/eslint/eslint/pulls/4363","_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments/52538151"},"html":{"href":"https://github.com/eslint/eslint/pull/4363#discussion_r52538151"},"pull_request":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4363"}}},"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/4363","id":50073705,"html_url":"https://github.com/eslint/eslint/pull/4363","diff_url":"https://github.com/eslint/eslint/pull/4363.diff","patch_url":"https://github.com/eslint/eslint/pull/4363.patch","issue_url":"https://api.github.com/repos/eslint/eslint/issues/4363","number":4363,"state":"open","locked":false,"title":"Fix: indent auto-fix is no longer fooled by spaces vs tabs (fixes #4274)","user":{"login":"platinumazure","id":284282,"avatar_url":"https://avatars.githubusercontent.com/u/284282?v=3","gravatar_id":"","url":"https://api.github.com/users/platinumazure","html_url":"https://github.com/platinumazure","followers_url":"https://api.github.com/users/platinumazure/followers","following_url":"https://api.github.com/users/platinumazure/following{/other_user}","gists_url":"https://api.github.com/users/platinumazure/gists{/gist_id}","starred_url":"https://api.github.com/users/platinumazure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platinumazure/subscriptions","organizations_url":"https://api.github.com/users/platinumazure/orgs","repos_url":"https://api.github.com/users/platinumazure/repos","events_url":"https://api.github.com/users/platinumazure/events{/privacy}","received_events_url":"https://api.github.com/users/platinumazure/received_events","type":"User","site_admin":false},"body":"Initial steps toward fixing #4274 by replacing the text range of the leading indent with the new indent, rather than trying to add or remove characters since that can be fooled by spaces vs tabs. I was getting a bit confused with all of the ranges being passed around, so I decided to switch to tokens as an intermediary-- hopefully this will be a little easier to follow. Added a couple of new test cases related to the problems I had seen with old auto-fix, and those tests and all current tests pass with this implementation.\r\n\r\n**This is a work in progress**. Please do not merge yet.\r\n\r\nNext steps will be determined after project collaborators/reviewers answer the following questions:\r\n\r\n1. Is this an okay approach, in general?\r\n1. Ideas for test cases to add? (In theory I could basically triple all of the existing test cases to create new ones that involve tab-to-space and space-to-tab transforms, but that might be overkill.)\r\n\r\nFixes #4274 (once this is improved with extra test cases).","created_at":"2015-11-08T23:22:39Z","updated_at":"2016-02-10T22:39:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1d5f0f01c7c598475a75f8b51494bab846f606c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eslint/eslint/pulls/4363/commits","review_comments_url":"https://api.github.com/repos/eslint/eslint/pulls/4363/comments","review_comment_url":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4363/comments","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/6b6a8ab28e648c00c7f3fcbc78ffcbb7235272e1","head":{"label":"platinumazure:fix-indent-autofix","ref":"fix-indent-autofix","sha":"6b6a8ab28e648c00c7f3fcbc78ffcbb7235272e1","user":{"login":"platinumazure","id":284282,"avatar_url":"https://avatars.githubusercontent.com/u/284282?v=3","gravatar_id":"","url":"https://api.github.com/users/platinumazure","html_url":"https://github.com/platinumazure","followers_url":"https://api.github.com/users/platinumazure/followers","following_url":"https://api.github.com/users/platinumazure/following{/other_user}","gists_url":"https://api.github.com/users/platinumazure/gists{/gist_id}","starred_url":"https://api.github.com/users/platinumazure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platinumazure/subscriptions","organizations_url":"https://api.github.com/users/platinumazure/orgs","repos_url":"https://api.github.com/users/platinumazure/repos","events_url":"https://api.github.com/users/platinumazure/events{/privacy}","received_events_url":"https://api.github.com/users/platinumazure/received_events","type":"User","site_admin":false},"repo":{"id":41607614,"name":"eslint","full_name":"platinumazure/eslint","owner":{"login":"platinumazure","id":284282,"avatar_url":"https://avatars.githubusercontent.com/u/284282?v=3","gravatar_id":"","url":"https://api.github.com/users/platinumazure","html_url":"https://github.com/platinumazure","followers_url":"https://api.github.com/users/platinumazure/followers","following_url":"https://api.github.com/users/platinumazure/following{/other_user}","gists_url":"https://api.github.com/users/platinumazure/gists{/gist_id}","starred_url":"https://api.github.com/users/platinumazure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platinumazure/subscriptions","organizations_url":"https://api.github.com/users/platinumazure/orgs","repos_url":"https://api.github.com/users/platinumazure/repos","events_url":"https://api.github.com/users/platinumazure/events{/privacy}","received_events_url":"https://api.github.com/users/platinumazure/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/platinumazure/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":true,"url":"https://api.github.com/repos/platinumazure/eslint","forks_url":"https://api.github.com/repos/platinumazure/eslint/forks","keys_url":"https://api.github.com/repos/platinumazure/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/platinumazure/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/platinumazure/eslint/teams","hooks_url":"https://api.github.com/repos/platinumazure/eslint/hooks","issue_events_url":"https://api.github.com/repos/platinumazure/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/platinumazure/eslint/events","assignees_url":"https://api.github.com/repos/platinumazure/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/platinumazure/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/platinumazure/eslint/tags","blobs_url":"https://api.github.com/repos/platinumazure/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/platinumazure/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/platinumazure/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/platinumazure/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/platinumazure/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/platinumazure/eslint/languages","stargazers_url":"https://api.github.com/repos/platinumazure/eslint/stargazers","contributors_url":"https://api.github.com/repos/platinumazure/eslint/contributors","subscribers_url":"https://api.github.com/repos/platinumazure/eslint/subscribers","subscription_url":"https://api.github.com/repos/platinumazure/eslint/subscription","commits_url":"https://api.github.com/repos/platinumazure/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/platinumazure/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/platinumazure/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/platinumazure/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/platinumazure/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/platinumazure/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/platinumazure/eslint/merges","archive_url":"https://api.github.com/repos/platinumazure/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/platinumazure/eslint/downloads","issues_url":"https://api.github.com/repos/platinumazure/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/platinumazure/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/platinumazure/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/platinumazure/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/platinumazure/eslint/labels{/name}","releases_url":"https://api.github.com/repos/platinumazure/eslint/releases{/id}","deployments_url":"https://api.github.com/repos/platinumazure/eslint/deployments","created_at":"2015-08-29T21:19:01Z","updated_at":"2016-01-18T15:47:54Z","pushed_at":"2016-02-08T17:30:30Z","git_url":"git://github.com/platinumazure/eslint.git","ssh_url":"git@github.com:platinumazure/eslint.git","clone_url":"https://github.com/platinumazure/eslint.git","svn_url":"https://github.com/platinumazure/eslint","homepage":"http://eslint.org","size":9634,"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":"3e485ccb00f02b52e007999ad3b196ebc9090ce1","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}","deployments_url":"https://api.github.com/repos/eslint/eslint/deployments","created_at":"2013-06-29T23:59:48Z","updated_at":"2016-02-10T21:55:21Z","pushed_at":"2016-02-10T21:37:40Z","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":12582,"stargazers_count":3968,"watchers_count":3968,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":781,"mirror_url":null,"open_issues_count":155,"forks":781,"open_issues":155,"watchers":3968,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4363"},"html":{"href":"https://github.com/eslint/eslint/pull/4363"},"issue":{"href":"https://api.github.com/repos/eslint/eslint/issues/4363"},"comments":{"href":"https://api.github.com/repos/eslint/eslint/issues/4363/comments"},"review_comments":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4363/comments"},"review_comment":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4363/commits"},"statuses":{"href":"https://api.github.com/repos/eslint/eslint/statuses/6b6a8ab28e648c00c7f3fcbc78ffcbb7235272e1"}}}}