{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/2020","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/2020/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/2020/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/2020/events","html_url":"https://github.com/dotnet/roslyn/issues/2020","id":68778362,"number":2020,"title":"Applying code fixes outside Visual Studio","user":{"login":"daveaglick","id":1020407,"avatar_url":"https://avatars.githubusercontent.com/u/1020407?v=3","gravatar_id":"","url":"https://api.github.com/users/daveaglick","html_url":"https://github.com/daveaglick","followers_url":"https://api.github.com/users/daveaglick/followers","following_url":"https://api.github.com/users/daveaglick/following{/other_user}","gists_url":"https://api.github.com/users/daveaglick/gists{/gist_id}","starred_url":"https://api.github.com/users/daveaglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveaglick/subscriptions","organizations_url":"https://api.github.com/users/daveaglick/orgs","repos_url":"https://api.github.com/users/daveaglick/repos","events_url":"https://api.github.com/users/daveaglick/events{/privacy}","received_events_url":"https://api.github.com/users/daveaglick/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/API","name":"API","color":"fc2929"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Analyzers","name":"Area-Analyzers","color":"5319e7"},{"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/Discussion","name":"Discussion","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-15T20:23:29Z","updated_at":"2015-04-16T15:54:38Z","closed_at":null,"body":"I'm having a hard time tracking down how to do this, and I'm starting to wonder if it's even possible.\r\n\r\nIn finding all uses of `CodeFixProvider`, it looks isolated to the `Workspaces`, `Features`, and `Diagnostics` libraries. None of them appear to have an API for actually applying code fixes. In fact, in the `CodeFixTestBase` class I noticed that the application of a code fix appears to be performed manually by rigging up a `CodeFixContext` and calling the methods of `CodeFixProvider` directly.\r\n\r\nIf I haven't missed something, than my next question would be if there are plans to expose code fixes in the same way other functionality is exposed. For example, analyzers can be run (fairly) easily outside the confines of Visual Studio. If it's not already on the table, would this be a proposal the team would be amenable to considering (at which point I could write up a proposal)?"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/93770162","html_url":"https://github.com/dotnet/roslyn/issues/2020#issuecomment-93770162","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/2020","id":93770162,"user":{"login":"daveaglick","id":1020407,"avatar_url":"https://avatars.githubusercontent.com/u/1020407?v=3","gravatar_id":"","url":"https://api.github.com/users/daveaglick","html_url":"https://github.com/daveaglick","followers_url":"https://api.github.com/users/daveaglick/followers","following_url":"https://api.github.com/users/daveaglick/following{/other_user}","gists_url":"https://api.github.com/users/daveaglick/gists{/gist_id}","starred_url":"https://api.github.com/users/daveaglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveaglick/subscriptions","organizations_url":"https://api.github.com/users/daveaglick/orgs","repos_url":"https://api.github.com/users/daveaglick/repos","events_url":"https://api.github.com/users/daveaglick/events{/privacy}","received_events_url":"https://api.github.com/users/daveaglick/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T15:54:38Z","updated_at":"2015-04-16T15:54:38Z","body":"@mattwar I'm not sure that \"the only reasonable consumer of this API is one that also operates like the IDE\" (though I agree that's certainly the most obvious). It also happens to be the use case I'm currently looking at (writing, testing, and applying code fixes in LINQPad). However, I could envision scenarios where code fixes are used as a programmatic code re-writing system. Why create a new capability for identifying target locations, specifying transforms on the syntax tree, and applying them when we already have something that does exactly that?"}}