Project Description
The aim of the project is to enable "Roslyn" diagnostics for the validation of the formatstrings supplied to String.Format at pre-compile time.

CA2241: Provide correct arguments to formatting methods

Code Example (From the link above.)
FormatStringValidator3.png

Methods Supported
String.Format
Console.Write
Console.WriteLine

Validation Rules Supported
  • Are the Argument Index supplied within range, of those supplied?
  • Is the Argument Index less than the limit of 1000000 (This is defined inside of the .net framework's implementation)
  • Is the Alignment with less than the limit of 1000000 (This is define inside of the .net framework's implementation)
  • Unexpected Characters
  • Unexpectedly reached the End Of Text
v1.6
Includes an idea of what the output*0 be like.
v1.6.png
*0 May display the variable names instead. I think it is good enough for an impression of the output.

Diagnostics available for both VB.net and C#

Last edited Jun 4, 2014 at 11:36 PM by AdamSpeight2008, version 13