Skip to content

Commit 6e752bb

Browse files
committed
Feedback
1 parent 3800377 commit 6e752bb

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1648UnitTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.Test.DocumentationRules
66
using System.Threading;
77
using System.Threading.Tasks;
88
using Microsoft.CodeAnalysis.Testing;
9-
using Microsoft.VisualBasic.Devices;
109
using StyleCop.Analyzers.DocumentationRules;
1110
using StyleCop.Analyzers.Test.Helpers;
1211
using StyleCop.Analyzers.Test.Verifiers;
@@ -215,6 +214,7 @@ public async Task TestTypeWithEmptyBaseListAndCrefAttributeAsync(string declarat
215214
}
216215

217216
[Theory]
217+
[InlineData("Test(int ignored) { }")]
218218
[InlineData("void Foo() { }")]
219219
[InlineData("string foo;")]
220220
[InlineData("string Foo { get; set; }")]

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1648InheritDocMustBeUsedWithInheritingClass.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,10 @@ private static void HandleMemberDeclaration(SyntaxNodeAnalysisContext context)
225225
/// <returns><see langword="true"/> if any base type constructor's signature matches the signature of <paramref name="constructorMethodSymbol"/>, <see langword="false"/> otherwise.</returns>
226226
private static bool HasMatchingSignature(ImmutableArray<IMethodSymbol> baseConstructorSymbols, IMethodSymbol constructorMethodSymbol)
227227
{
228-
bool found = false;
229-
230228
foreach (IMethodSymbol baseConstructorMethod in baseConstructorSymbols)
231229
{
232230
// Constructors must have the same number of parameters.
233-
if (constructorMethodSymbol.Parameters.Count() != baseConstructorMethod.Parameters.Count())
231+
if (constructorMethodSymbol.Parameters.Length != baseConstructorMethod.Parameters.Length)
234232
{
235233
continue;
236234
}
@@ -252,12 +250,11 @@ private static bool HasMatchingSignature(ImmutableArray<IMethodSymbol> baseConst
252250

253251
if (success)
254252
{
255-
found = true;
256-
break;
253+
return true;
257254
}
258255
}
259256

260-
return found;
257+
return false;
261258
}
262259

263260
private static bool HasXmlCrefAttribute(XmlNodeSyntax inheritDocElement)

0 commit comments

Comments
 (0)