Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Code fix in CC0014 TernaryOperatorAnalyzer remove comments #551

@filippobottega

Description

@filippobottega

Code fix for CC0014 TernaryOperatorAnalyzer is not compatible with comments in VB code.
Example:
Original code:
If stackFrameItem.GetMethod.DeclaringType Is Nothing Then
declaringType = "" 'MLHIDE
Else
declaringType = stackFrameItem.GetMethod.DeclaringType.ToString
End If
Fixed code:
declaringType = If(stackFrameItem.GetMethod.DeclaringType Is Nothing, "", stackFrameItem.GetMethod.DeclaringType.ToString)

'MLHIDE comment was deleted.

Regards,
Filippo Bottega

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions