Skip to content

Commit f886be6

Browse files
committed
Fixed multiple SyleCop Analyzer errors
* SA1633, SA1507, SA1633, SA1513, SA1623
1 parent 286a273 commit f886be6

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

src/ReferenceEqualityVerifier/ReferenceEqualityVerifier/Diagnostics.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
using System.Collections.Immutable;
1+
// -----------------------------------------------------------------------
2+
// <copyright file="Diagnostics.cs" company="Ubiquity.NET Contributors">
3+
// Copyright (c) Ubiquity.NET Contributors. All rights reserved.
4+
// </copyright>
5+
// -----------------------------------------------------------------------
6+
7+
using System.Collections.Immutable;
28

39
using Microsoft.CodeAnalysis;
410

src/ReferenceEqualityVerifier/ReferenceEqualityVerifier/ReferenceEqualityAnalyzer.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
using System;
1+
// -----------------------------------------------------------------------
2+
// <copyright file="ReferenceEqualityAnalyzer.cs" company="Ubiquity.NET Contributors">
3+
// Copyright (c) Ubiquity.NET Contributors. All rights reserved.
4+
// </copyright>
5+
// -----------------------------------------------------------------------
6+
7+
using System;
28
using System.Collections.Generic;
39
using System.Collections.Immutable;
410
using System.Diagnostics.CodeAnalysis;
@@ -24,7 +30,7 @@ public class ReferenceEqualityAnalyzer
2430
{
2531
private const string RelevantNamespaceName = "Ubiquity.NET.Llvm";
2632

27-
/// <summary>Diagnostics supported by this analyzer</summary>
33+
/// <summary>Gets the diagnostics supported by this analyzer</summary>
2834
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => Diagnostics.AllDiagnostics;
2935

3036
/// <summary>Initializes the analyzer to detect potentially incorrect use</summary>
@@ -109,7 +115,7 @@ private static bool IsDeclaredInNamespace( ITypeSymbol typeSym, string namespace
109115
// EX: `a.b.c` becomes the sequence:
110116
// 'a', 'a.b`, 'a.b.c'
111117
// This allows for easy namespace Hierarchy checks.
112-
static IEnumerable<string> GetNamespaceNames( ITypeSymbol sym )
118+
private static IEnumerable<string> GetNamespaceNames( ITypeSymbol sym )
113119
{
114120
return from part in sym.ContainingNamespace.ToDisplayParts()
115121
where part.Kind != SymbolDisplayPartKind.Punctuation
@@ -141,7 +147,6 @@ private static bool AreEquivalent( ITypeSymbol typeSymbol, ITypeSymbol lht, ITyp
141147
|| IsDerivedFrom( rht, typeSymbol );
142148
}
143149

144-
145150
private static bool IsDerivedFrom( ITypeSymbol derivedType, ITypeSymbol testBaseType )
146151
{
147152
if(testBaseType.TypeKind == TypeKind.Interface)
@@ -158,6 +163,7 @@ private static bool IsDerivedFrom( ITypeSymbol derivedType, ITypeSymbol testBase
158163
}
159164
}
160165
}
166+
161167
return false;
162168
}
163169

0 commit comments

Comments
 (0)