diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1114ParameterListMustFollowDeclaration.cs b/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1114ParameterListMustFollowDeclaration.cs index 02069de88..3f1222394 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1114ParameterListMustFollowDeclaration.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1114ParameterListMustFollowDeclaration.cs @@ -5,12 +5,10 @@ namespace StyleCop.Analyzers.ReadabilityRules { using System; using System.Collections.Immutable; - using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; - using StyleCop.Analyzers.Helpers; using StyleCop.Analyzers.Lightup; /// @@ -311,7 +309,16 @@ private static bool SpanMultipleLines(SyntaxToken startToken, SyntaxNode endNode static int EndOfLineTriviaCount(SyntaxTriviaList list) { - return list.Count(trivia => trivia.IsKind(SyntaxKind.EndOfLineTrivia)); + int count = 0; + foreach (var trivia in list) + { + if (trivia.IsKind(SyntaxKind.EndOfLineTrivia)) + { + count++; + } + } + + return count; } } }