@@ -9,22 +9,22 @@ void FormatTests()
99 String . Format ( "{0} {1} {2}" , 0 , 1 , 2 ) ;
1010
1111 // BAD: Missing arg {0}
12- String . Format ( "X" , 1 ) ; // $ Alert Sink
12+ String . Format ( "X" , 1 ) ; // $ Alert
1313
1414 // BAD: Missing {1}
15- String . Format ( "{0}" , 1 , 2 ) ; // $ Alert Sink
15+ String . Format ( "{0}" , 1 , 2 ) ; // $ Alert
1616
1717 // BAD: Missing {1}
18- String . Format ( "{0} {0}" , 1 , 2 ) ; // $ Alert Sink
18+ String . Format ( "{0} {0}" , 1 , 2 ) ; // $ Alert
1919
2020 // BAD: Missing {0}
21- String . Format ( "{1} {1}" , 1 , 2 ) ; // $ Alert Sink
21+ String . Format ( "{1} {1}" , 1 , 2 ) ; // $ Alert
2222
2323 // BAD: Missing {0}, {1} and {2}
24- String . Format ( "abcdefg" , 0 , 1 , 2 ) ; // $ Alert Sink
24+ String . Format ( "abcdefg" , 0 , 1 , 2 ) ; // $ Alert
2525
2626 // BAD: {0} is unused
27- String . Format ( "{{sdc}}" , 0 ) ; // $ Alert Sink
27+ String . Format ( "{{sdc}}" , 0 ) ; // $ Alert
2828
2929 // GOOD: {0} is used
3030 String . Format ( "{{{0:D}}}" , 0 ) ;
@@ -36,7 +36,7 @@ void FormatTests()
3636 String . Format ( "{0} {1} {2}" , ps ) ;
3737
3838 // BAD: Would display "{0}"
39- String . Format ( "{{0}}" , 1 ) ; // $ Alert Sink
39+ String . Format ( "{{0}}" , 1 ) ; // $ Alert
4040
4141 // GOOD: Ignore the empty string as it's often used as the default value
4242 // of GetResource().
@@ -50,35 +50,35 @@ void CompositeFormatTests()
5050 var format11 = CompositeFormat . Parse ( "{1}{1}" ) ; // $ Source=source6
5151
5252 // BAD: Unused arg {0}
53- String . Format < string > ( null , format , "" ) ; // $ Alert=source4 Sink=source4
53+ String . Format < string > ( null , format , "" ) ; // $ Alert=source4
5454
5555 // BAD: Unused arg {1}
56- String . Format < string , string > ( null , format00 , "" , "" ) ; // $ Alert=source5 Sink=source5
56+ String . Format < string , string > ( null , format00 , "" , "" ) ; // $ Alert=source5
5757
5858 // BAD: Unused arg {0}
59- String . Format < string , string > ( null , format11 , "" , "" ) ; // $ Alert=source6 Sink=source6
59+ String . Format < string , string > ( null , format11 , "" , "" ) ; // $ Alert=source6
6060
6161 // BAD: Unused arg {0}
62- sb . AppendFormat ( null , format , "" ) ; // $ Alert=source4 Sink=source4
63- sb . AppendFormat < string > ( null , format , "" ) ; // $ Alert=source4 Sink=source4
62+ sb . AppendFormat ( null , format , "" ) ; // $ Alert=source4
63+ sb . AppendFormat < string > ( null , format , "" ) ; // $ Alert=source4
6464
6565 // BAD: Unused arg {1}
66- sb . AppendFormat < string , string > ( null , format00 , "" , "" ) ; // $ Alert=source5 Sink=source5
66+ sb . AppendFormat < string , string > ( null , format00 , "" , "" ) ; // $ Alert=source5
6767
6868 // BAD: Unused arg {0}
69- sb . AppendFormat < string , string > ( null , format11 , "" , "" ) ; // $ Alert=source6 Sink=source6
69+ sb . AppendFormat < string , string > ( null , format11 , "" , "" ) ; // $ Alert=source6
7070
7171 var span = new Span < char > ( ) ;
7272
7373 // BAD: Unused arg {0}
74- span . TryWrite ( null , format , out _ , "" ) ; // $ Alert=source4 Sink=source4
75- span . TryWrite < string > ( null , format , out _ , "" ) ; // $ Alert=source4 Sink=source4
74+ span . TryWrite ( null , format , out _ , "" ) ; // $ Alert=source4
75+ span . TryWrite < string > ( null , format , out _ , "" ) ; // $ Alert=source4
7676
7777 // BAD: Unused arg {1}
78- span . TryWrite < string , string > ( null , format00 , out _ , "" , "" ) ; // $ Alert=source5 Sink=source5
78+ span . TryWrite < string , string > ( null , format00 , out _ , "" , "" ) ; // $ Alert=source5
7979
8080 // BAD: Unused arg {0}
81- span . TryWrite < string , string > ( null , format11 , out _ , "" , "" ) ; // $ Alert=source6 Sink=source6
81+ span . TryWrite < string , string > ( null , format11 , out _ , "" , "" ) ; // $ Alert=source6
8282 }
8383
8484 object [ ] ps ;
0 commit comments