dotnet / dotnet/msbuild

[Built-in analyzer] String comparison is not properly quoted

Open
#9,892 8 comments 2 reactions 0 assignees View on GitHub
Area: BuildCheck BuildCheck Suggestion triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.