Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
MartyIX committed Dec 19, 2023
1 parent 3800377 commit 6e752bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.Test.DocumentationRules
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Testing;
using Microsoft.VisualBasic.Devices;
using StyleCop.Analyzers.DocumentationRules;
using StyleCop.Analyzers.Test.Helpers;
using StyleCop.Analyzers.Test.Verifiers;
Expand Down Expand Up @@ -215,6 +214,7 @@ public async Task TestTypeWithEmptyBaseListAndCrefAttributeAsync(string declarat
}

[Theory]
[InlineData("Test(int ignored) { }")]
[InlineData("void Foo() { }")]
[InlineData("string foo;")]
[InlineData("string Foo { get; set; }")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,10 @@ private static void HandleMemberDeclaration(SyntaxNodeAnalysisContext context)
/// <returns><see langword="true"/> if any base type constructor's signature matches the signature of <paramref name="constructorMethodSymbol"/>, <see langword="false"/> otherwise.</returns>
private static bool HasMatchingSignature(ImmutableArray<IMethodSymbol> baseConstructorSymbols, IMethodSymbol constructorMethodSymbol)
{
bool found = false;

foreach (IMethodSymbol baseConstructorMethod in baseConstructorSymbols)
{
// Constructors must have the same number of parameters.
if (constructorMethodSymbol.Parameters.Count() != baseConstructorMethod.Parameters.Count())
if (constructorMethodSymbol.Parameters.Length != baseConstructorMethod.Parameters.Length)
{
continue;
}
Expand All @@ -252,12 +250,11 @@ private static bool HasMatchingSignature(ImmutableArray<IMethodSymbol> baseConst

if (success)
{
found = true;
break;
return true;
}
}

return found;
return false;
}

private static bool HasXmlCrefAttribute(XmlNodeSyntax inheritDocElement)
Expand Down

0 comments on commit 6e752bb

Please sign in to comment.