{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/7750","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/7750/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/7750/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/7750/events","html_url":"https://github.com/dotnet/roslyn/issues/7750","id":124530794,"number":7750,"title":"Handling BatchFixAllProvider crashes","user":{"login":"paul1956","id":12789369,"avatar_url":"https://avatars.githubusercontent.com/u/12789369?v=3","gravatar_id":"","url":"https://api.github.com/users/paul1956","html_url":"https://github.com/paul1956","followers_url":"https://api.github.com/users/paul1956/followers","following_url":"https://api.github.com/users/paul1956/following{/other_user}","gists_url":"https://api.github.com/users/paul1956/gists{/gist_id}","starred_url":"https://api.github.com/users/paul1956/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paul1956/subscriptions","organizations_url":"https://api.github.com/users/paul1956/orgs","repos_url":"https://api.github.com/users/paul1956/repos","events_url":"https://api.github.com/users/paul1956/events{/privacy}","received_events_url":"https://api.github.com/users/paul1956/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-IDE","name":"Area-IDE","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Question","name":"Question","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/4","html_url":"https://github.com/dotnet/roslyn/milestones/1.2","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/4/labels","id":937402,"number":4,"title":"1.2","description":"This is our 1.2 Milestone.\r\n\r\n<!---\r\n@huboard:{\"order\":2.0}\r\n-->\r\n","creator":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"open_issues":602,"closed_issues":335,"state":"open","created_at":"2015-01-15T20:48:55Z","updated_at":"2016-01-08T18:05:07Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-01-01T04:47:17Z","updated_at":"2016-01-08T18:05:06Z","closed_at":null,"body":"I have a CodeFixProvider that is trying to fix all the instances of an issue in a Project (1,200 in my case). Memory keeps going up and I assume Visual Studio eventually runs our of memory and the BatchFixProvider gets an exception, then memory usage returns to normal. Is there a way that I should be detecting the user is trying to fix too many things at once and stop so that at least some are fixed. If I fix all the issues in a document, and manually process all the documents in a the project everything works so I don't think it is something I am doing.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/12789369/12069755/b902ac3e-affe-11e5-841a-1105d6cdecec.png)\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/170076188","html_url":"https://github.com/dotnet/roslyn/issues/7750#issuecomment-170076188","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/7750","id":170076188,"user":{"login":"sharwell","id":1408396,"avatar_url":"https://avatars.githubusercontent.com/u/1408396?v=3","gravatar_id":"","url":"https://api.github.com/users/sharwell","html_url":"https://github.com/sharwell","followers_url":"https://api.github.com/users/sharwell/followers","following_url":"https://api.github.com/users/sharwell/following{/other_user}","gists_url":"https://api.github.com/users/sharwell/gists{/gist_id}","starred_url":"https://api.github.com/users/sharwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharwell/subscriptions","organizations_url":"https://api.github.com/users/sharwell/orgs","repos_url":"https://api.github.com/users/sharwell/repos","events_url":"https://api.github.com/users/sharwell/events{/privacy}","received_events_url":"https://api.github.com/users/sharwell/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T18:05:06Z","updated_at":"2016-01-08T18:05:06Z","body":"The problem lies in the way the batch fixer determines which diagnostics to fix. We unintentionally fixed it in DotNetAnalyzers/StyleCopAnalyzers@39948d9d5d574a4bd00a393ffafb3c3eed571787 while trying to do something else.\r\n\r\n@paul1956 I recommend you take our [`CustomBatchFixAllProvider`](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/Helpers/CustomBatchFixAllProvider.cs) (which is just `BatchFixAllProvider` with some bug fixes), [`CustomFixAllProviders`](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/Helpers/CustomFixAllProviders.cs) and [`FixAllContextHelper`](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/Helpers/FixAllContextHelper.cs) (a dependency of our batch fixer). Then [update your test suite](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/544b14b41df268c787dc86e7ae67a251ab693550/StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/CodeFixVerifier.cs#L88) to ensure you aren't shipping anything that depends on the buggy implementation.\r\n"}}