CSharpEssentials icon indicating copy to clipboard operation
CSharpEssentials copied to clipboard

Add an option to convert all potential String.Format() calls to string interpolation

Open DustinCampbell opened this issue 10 years ago • 1 comments

DustinCampbell avatar Jul 21 '15 18:07 DustinCampbell

As for providing a fix all option, that'll take a bit more design. This is implemented as a refactoring rather than a diagnostic/code fix pair, so the "FixAllProvider" APIs aren't available. I chose to implement this as a refactoring because this operation struck me as something that you might not always want to do. So, it seemed a bit invasive to squiggle every potential String.Format() call that could be converted to string interpolation.

You are absolutely right, there should never be squiggles on all the String.Format calls. But I would still like the the convert all options to be available when I want them. Same with "Use Expression-Bodied Member", I'd like convert all available but hate all the messages. The FixAll options should be available independent of the warning level. Seems like a change to VS is needed.

Bryan-Legend avatar Jul 28 '15 05:07 Bryan-Legend