public IEnumerable <CodeInspectionResultBase> GetInspectionResults(SyntaxTreeNode node) { var identifiers = node.FindAllDeclarations() .Where(declaration => !declaration.Instruction.Line.IsMultiline) .SelectMany(declaration => declaration.ChildNodes.Cast <IdentifierNode>()) .Where(identifier => !identifier.IsTypeSpecified); return(identifiers.Select(identifier => new VariableTypeNotDeclaredInspectionResult(Name, identifier, Severity))); }
public IEnumerable <CodeInspectionResultBase> GetInspectionResults(SyntaxTreeNode node) { return(node.FindAllDeclarations() .Where(declaration => declaration.ChildNodes.Count() > 1) .Select(declaration => new MultipleDeclarationsInspectionResult(Name, declaration, Severity))); }