Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -708,9 +708,6 @@ dotnet_diagnostic.CA1014.severity = none
# CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
dotnet_diagnostic.CA1824.severity = none

# CA1820: Test for empty strings using string length
dotnet_diagnostic.CA1820.severity = suggestion

# CA1508: Avoid dead conditional code
dotnet_diagnostic.CA1508.severity = suggestion

Expand Down Expand Up @@ -885,7 +882,7 @@ dotnet_diagnostic.IDE0016.severity = suggestion
# IDE0039: Use local function
dotnet_diagnostic.IDE0039.severity = suggestion

# IDE0220:
# IDE0220:
dotnet_diagnostic.IDE0220.severity = suggestion

# IDE0031: Null check can be simplified
Expand Down Expand Up @@ -913,4 +910,4 @@ dotnet_diagnostic.CA1724.severity = suggestion
dotnet_diagnostic.SA1028.severity = suggestion

# IL3000: always returns an empty string for assemblies embedded in a single-file app.
dotnet_diagnostic.IL3000.severity = suggestion
dotnet_diagnostic.IL3000.severity = suggestion
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private void ParseSection(SectionType sectionType, List<string> lines, Dictionar
{
line = lines[0].TrimEnd();
lines.RemoveAt(0);
if (line.Trim().Equals(string.Empty))
if (string.IsNullOrEmpty(line.Trim()))
{
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private static bool ParseDependency(string dependency, out string packageName, o
version = versionMatch.Success ? versionMatch.Value : null;
source = sourceMatch.Success ? sourceMatch.Value : null;

if (source == string.Empty)
if (string.IsNullOrEmpty(source))
{
source = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ComparatorSet(string spec)
this.comparators = new List<Comparator> { };

spec = spec.Trim();
if (spec == string.Empty)
if (string.IsNullOrEmpty(spec))
{
spec = "*";
}
Expand Down Expand Up @@ -78,16 +78,16 @@ private ComparatorSet(IEnumerable<Comparator> comparators)
public bool IsSatisfied(SemVersion version)
{
var satisfied = this.comparators.All(c => c.IsSatisfied(version));
if (version.Prerelease != string.Empty)
if (!string.IsNullOrEmpty(version.Prerelease))
{
// If the version is a pre-release, then one of the
// comparators must have the same version and also include
// a pre-release tag.
return satisfied && this.comparators.Any(c =>
c.Version.Prerelease != string.Empty &&
c.Version.Major == version.Major &&
c.Version.Minor == version.Minor &&
c.Version.Patch == version.Patch);
!string.IsNullOrEmpty(c.Version.Prerelease) &&
c.Version.Major == version.Major &&
c.Version.Minor == version.Minor &&
c.Version.Patch == version.Patch);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public PartialVersion(string input)
{
string[] xValues = { "X", "x", "*" };

if (input.Trim() == string.Empty)
if (string.IsNullOrEmpty(input.Trim()))
{
// Empty input means any version
return;
Expand Down