Skip to content

Commit 92fbfd7

Browse files
committed
Fix warnings
1 parent f6ea5c4 commit 92fbfd7

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

PropertyChangedAnalyzers.Test/DocumentationTests.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#pragma warning disable CA1056 // Uri properties should not be strings
2+
#pragma warning disable CA1307 // Specify StringComparison for clarity
23
namespace PropertyChangedAnalyzers.Test
34
{
45
using System;
@@ -70,10 +71,7 @@ public static void TitleId(DescriptorInfo descriptorInfo)
7071
public static void Title(DescriptorInfo descriptorInfo)
7172
{
7273
var expected = $"## {descriptorInfo.Descriptor.Title}";
73-
var actual = descriptorInfo.DocumentationFile.AllLines
74-
.Skip(1)
75-
.First()
76-
.Replace("`", string.Empty);
74+
var actual = descriptorInfo.DocumentationFile.AllLines[1].Replace("`", string.Empty);
7775
Assert.AreEqual(expected, actual);
7876
}
7977

@@ -318,7 +316,7 @@ public CodeFile(string name)
318316

319317
public string Name { get; }
320318

321-
public string Uri => "https://github.com/DotNetAnalyzers/PropertyChangedAnalyzers/blob/master" + this.Name.Substring(SolutionDirectory.FullName.Length)
319+
public string Uri => "https://github.com/DotNetAnalyzers/PropertyChangedAnalyzers/blob/master" + this.Name[SolutionDirectory.FullName.Length..]
322320
.Replace("\\", "/");
323321

324322
public static CodeFile Find(Type type)

0 commit comments

Comments
 (0)