Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCode fix error in CC0014 TernaryOperatorAnalyzer (assignment) #550
Comments
|
Bug confirmed. It should be pulled into the master branch. |
|
It looks like we have 3 open bugs for CC0014 in VB at this point. I can take them unless @filippobottega wants to try his hand. |
|
@filippobottega do you? |
|
Really sorry but I'm only a tester for the moment... |
|
So, it is yours, @jwooley, I am assigning all 3 to you, I guess you will submit one PR for all 3, right? |
fix code-cracker#551 ternary operator retaining comments
|
@jwooley Sure! ;) |
Code fix for CC0014 TernaryOperatorAnalyzer is not compatible with += operator in VB code.
Example:
Original code:
If values = String.Empty Then
values = valueString
Else
values += ", " & valueString
End If
Fixed code:
values = If(values = String.Empty, valueString, ", " & valueString)