-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Built-in analyzer] String comparison is not properly quoted #9892
Copy link
Copy link
Open
Labels
Area: BuildCheckBuildCheck SuggestionSuggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'Suggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'triaged
Description
Background
This issue tracks one of the BuildCheck analyzers we would like to ship in-box with MSBuild.
Goal
Implement an analyzer with the following rule: String comparison in conditions should use single quotes around the strings, e.g. '$(MyProp)' == ''.
Notes
While not strictly needed for non-empty strings, the use of quotes makes the condition work for empty strings as well and is considered a good practice.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: BuildCheckBuildCheck SuggestionSuggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'Suggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'triaged
Type
Fields
Give feedbackNo fields configured for issues without a type.