Beispiel #1
0
        public override List <SolutionStyleError> FindErrors(SyntaxTree userSolution, SemanticModel semanticModel)
        {
            var bracesPairs = userSolution.BuildBracesPairs().ToArray();

            return(bracesPairs
                   .Select(ReportWhenExistExcessLineBetweenDeclaration)
                   .Concat(bracesPairs.SelectMany(ReportWhenExistExcessLineBetweenBraces))
                   .Concat(bracesPairs.Select(ReportWhenNotExistLineBetweenBlocks))
                   .Where(x => x != null)
                   .OrderBy(e => e.Span.StartLinePosition.Line)
                   .ToList());
        }