{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/13237","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/13237/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/13237/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/13237/events","html_url":"https://github.com/Microsoft/vscode/issues/13237","id":181089907,"number":13237,"title":"Format On Save triggers infinite loop for JSON documents","user":{"login":"ddotlic","id":1737586,"avatar_url":"https://avatars.githubusercontent.com/u/1737586?v=3","gravatar_id":"","url":"https://api.github.com/users/ddotlic","html_url":"https://github.com/ddotlic","followers_url":"https://api.github.com/users/ddotlic/followers","following_url":"https://api.github.com/users/ddotlic/following{/other_user}","gists_url":"https://api.github.com/users/ddotlic/gists{/gist_id}","starred_url":"https://api.github.com/users/ddotlic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddotlic/subscriptions","organizations_url":"https://api.github.com/users/ddotlic/orgs","repos_url":"https://api.github.com/users/ddotlic/repos","events_url":"https://api.github.com/users/ddotlic/events{/privacy}","received_events_url":"https://api.github.com/users/ddotlic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T08:12:17Z","updated_at":"2016-10-05T08:17:05Z","closed_at":"2016-10-05T08:17:05Z","body":"- VSCode Version: 1.6.0 insider (Oct 1 2016)\r\n- OS Version: macOS Sierra\r\n\r\nSteps to Reproduce:\r\n\r\n1.  set `\"editor.formatOnSave\": true` somewhere (in my case, user settings)\r\n2. open JSON file\r\n3. edit the file\r\n4. try to save the file, note that CPU spikes and VS Code clearly runs in a loop saving, reformatting, saving, reformatting... ad nauseam; the only way to stop this is to close the file; additionally, when I do, one other extension (that adds empty line at end of document) has not been executed either\r\n\r\nI had similar silly experience with an extension I used to use for auto-format-on-save (for some reason it did not work well on JSON files) but I've uninstalled the extension in the meantime.\r\n\r\nIf you can't repro, could you please point me at docs or tell me how to double check if the extension has been properly uninstalled?\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/251611252","html_url":"https://github.com/Microsoft/vscode/issues/13237#issuecomment-251611252","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/13237","id":251611252,"user":{"login":"ddotlic","id":1737586,"avatar_url":"https://avatars.githubusercontent.com/u/1737586?v=3","gravatar_id":"","url":"https://api.github.com/users/ddotlic","html_url":"https://github.com/ddotlic","followers_url":"https://api.github.com/users/ddotlic/followers","following_url":"https://api.github.com/users/ddotlic/following{/other_user}","gists_url":"https://api.github.com/users/ddotlic/gists{/gist_id}","starred_url":"https://api.github.com/users/ddotlic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddotlic/subscriptions","organizations_url":"https://api.github.com/users/ddotlic/orgs","repos_url":"https://api.github.com/users/ddotlic/repos","events_url":"https://api.github.com/users/ddotlic/events{/privacy}","received_events_url":"https://api.github.com/users/ddotlic/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T08:17:05Z","updated_at":"2016-10-05T08:17:05Z","body":"OK, silly me - I should have checked if the issue is with the extensions **still** installed, and it is - the \"final-newline\" extension is the one causing the issue. I'll open the bug with the author.\r\n\r\nAs a side note, a feature as silly as adding an empty line at the end of the file should not be in the extension, but in the product itself (for example, the product already does a similar thing - removes trailing whitespace, why not add option to insert newline at end of document).\r\n\r\nSorry for the noise."}}
{"actor":{"display_login":"ddotlic"}}