MindTouch / MindTouchRoslynAnalyzers

C# code analyzers built on the Roslyn compiler
Apache License 2.0
1 stars 4 forks source link

Confirm that the number of arguments provided to String.Format("...", args...) matches the expected format place holders inside the format string. #3

Open nataren opened 8 years ago

nataren commented 8 years ago

Good: string.Format("hello {0}!", "world"); Bad: string.Format("hello {1}!", "world");

yurigorokhov commented 8 years ago

Good: string.Format("hello {0}!", "world"); Bad: string.Format("hello {0} {1}!", "world");

bjorg commented 8 years ago

Resharper already does this.