VSDiagnostics
VSDiagnostics copied to clipboard
Implement StringDotFormatToInterpolatedString analyzer
Step away from the pre-C# 6 string.Format
and use an interpolated string instead. Take note that I'm not entirely sure yet if an interpolated string has all the capabilities string.Format
has. Something about a new type FormattableString
?
Relevant Roslyn issue: https://github.com/dotnet/roslyn/issues/7044
As the feature was being developed the community decided and ensure that the capabilities and internal syntax matched String.Format
. With exception that argument holes can use expressions within them.
Support for this has already been implement by the community.
@AdamSpeight2008 What exactly do you mean when you refer to "the community"?
@Vannevelj people who are interested and or develop Roslyn, Analysters etc.
Eg CSharp Essentials+ by Dustin Campbell
True, it has been implemented before. Still, I'd like to have it (eventually) in VSDiagnostics as well. Otherwise the user is basically forced to install multiple packages. Obviously this is a long-term view but it doesn't hurt to have it on the backlog.