127 references to ContainsDiagnostics
Microsoft.CodeAnalysis (2)
Syntax\SyntaxNode.cs (1)
1631if (!this.ContainsDiagnostics)
Syntax\SyntaxNodeOrToken.cs (1)
452return _nodeOrParent.ContainsDiagnostics;
Microsoft.CodeAnalysis.CodeStyle (2)
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
52if (node.ContainsDiagnostics && node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
54if (node.ContainsDiagnostics)
Microsoft.CodeAnalysis.CSharp (4)
Binder\InMethodBinder.cs (1)
248Debug.Assert(oldLocation != newLocation || oldLocation == Location.None || newLocation.SourceTree?.GetRoot().ContainsDiagnostics == true,
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
636if (treelessSyntax.ContainsDiagnostics && sourceLocation.SourceTree.ReportDocumentationCommentDiagnostics())
Parser\Blender.Reader.cs (1)
242(nodeOrToken.IsToken && ((CSharpSyntaxNode)nodeOrToken.AsToken().Node).ContainsSkippedText && nodeOrToken.Parent.ContainsDiagnostics))
Syntax\SyntaxFactory.cs (1)
2355if (lastNode.HasTrailingTrivia && lastNode.ContainsDiagnostics && HasUnterminatedMultiLineComment(lastNode.GetTrailingTrivia()))
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
50if (node.ContainsDiagnostics)
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
49if (node.ContainsDiagnostics)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (3)
356if (statementOrExpression.ContainsDiagnostics) 371if (firstStatement.ContainsDiagnostics || lastStatement.ContainsDiagnostics)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
56!cast.WalkUpParentheses().ContainsDiagnostics && 63if (cast.WalkUpParentheses().ContainsDiagnostics) 176Contract.ThrowIfTrue(castNode.WalkUpParentheses().ContainsDiagnostics);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
160if (stringNode.ContainsDiagnostics)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
186if (index != 0 && declarationList[index - 1].ContainsDiagnostics && AreBracesMissing(declarationList[index - 1]))
Microsoft.CodeAnalysis.CSharp.Features (11)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
73if (localDeclarationStatement.ContainsDiagnostics ||
Diagnostics\Analyzers\CSharpSimplifyTypeNamesDiagnosticAnalyzer.cs (1)
97if (node.ContainsDiagnostics)
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (1)
158return parsedType.IsKind(SyntaxKind.GenericName) && !parsedType.ContainsDiagnostics;
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
50if (node.ContainsDiagnostics)
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
49if (node.ContainsDiagnostics)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (3)
356if (statementOrExpression.ContainsDiagnostics) 371if (firstStatement.ContainsDiagnostics || lastStatement.ContainsDiagnostics)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
160if (stringNode.ContainsDiagnostics)
StringIndentation\CSharpStringIndentationService.cs (1)
97if (interpolatedString.ContainsDiagnostics)
Structure\Providers\StringLiteralExpressionStructureProvider.cs (1)
21if (node.IsKind(SyntaxKind.StringLiteralExpression) && !node.ContainsDiagnostics)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (30)
IncrementalParsing\GrammarAmbiguities.cs (1)
91Assert.False(originalTree.GetCompilationUnitRoot().ContainsDiagnostics);
Parsing\LocalFunctionParsingTests.cs (3)
1289Assert.True(file.DescendantNodes().Any(n => n.Kind() == SyntaxKind.LocalFunctionStatement && !n.ContainsDiagnostics)); 1298Assert.False(s1.ContainsDiagnostics); 1302Assert.False(s1.ContainsDiagnostics);
Parsing\NameParsingTests.cs (7)
632Assert.True(arg.ContainsDiagnostics); 657Assert.True(arg.ContainsDiagnostics); 683Assert.True(arg.ContainsDiagnostics); 710Assert.True(arg.ContainsDiagnostics); 716Assert.False(arg2.ContainsDiagnostics); 741Assert.True(arg.ContainsDiagnostics); 766Assert.True(arg.ContainsDiagnostics);
Parsing\ParsingErrorRecoveryTests.cs (10)
6581Assert.False(getBodyStmts[0].ContainsDiagnostics); 6963Assert.True(file.ContainsDiagnostics); 6974Assert.True(file.ContainsDiagnostics); 6993Assert.True(file.ContainsDiagnostics); 7018Assert.False(file.ContainsDiagnostics); 7034Assert.False(file.ContainsDiagnostics); 7059Assert.True(file.ContainsDiagnostics); 7198Assert.True(file.ContainsDiagnostics); 7214Assert.True(file.ContainsDiagnostics); 7235Assert.False(file.ContainsDiagnostics);
Parsing\ScriptParsingTests.cs (4)
191Assert.True(tree.GetCompilationUnitRoot().ContainsDiagnostics); 233Assert.True(tree.GetCompilationUnitRoot().ContainsDiagnostics); 2644Assert.False(tree.GetCompilationUnitRoot().ContainsDiagnostics); 2676Assert.False(tree.GetCompilationUnitRoot().ContainsDiagnostics);
Syntax\SyntaxRewriterTests.cs (5)
562Assert.True(expr1.ContainsDiagnostics); 580Assert.False(expr2.ContainsDiagnostics); //gone after rewrite 608Assert.True(expr1.ContainsDiagnostics); 626Assert.False(expr2.ContainsDiagnostics); //gone after rewrite 710Assert.False(red.ContainsDiagnostics);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (3)
56!cast.WalkUpParentheses().ContainsDiagnostics && 63if (cast.WalkUpParentheses().ContainsDiagnostics) 176Contract.ThrowIfTrue(castNode.WalkUpParentheses().ContainsDiagnostics);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
186if (index != 0 && declarationList[index - 1].ContainsDiagnostics && AreBracesMissing(declarationList[index - 1]))
Microsoft.CodeAnalysis.Features (5)
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (1)
191if (attribute.ContainsDiagnostics)
ConvertLinq\ConvertForEachToLinqQuery\AbstractConvertForEachToLinqQueryProvider.cs (1)
75if (forEachStatement.ContainsDiagnostics)
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
52if (node.ContainsDiagnostics && node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
54if (node.ContainsDiagnostics)
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (1)
51if (receiver.ContainsDiagnostics)
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\VisualBasicWarningStateMap.vb (1)
81If currentCode.IsMissing OrElse currentCode.ContainsDiagnostics Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (1)
220If node.ContainsDiagnostics Then
Microsoft.CodeAnalysis.VisualBasic.Features (7)
Diagnostics\Analyzers\VisualBasicSimplifyTypeNamesDiagnosticAnalyzer.vb (1)
89If expression.ContainsDiagnostics Then
Highlighting\KeywordHighlighters\XmlCDataHighlighter.vb (1)
24If Not .ContainsDiagnostics AndAlso
Highlighting\KeywordHighlighters\XmlCommentHighlighter.vb (1)
24If Not .ContainsDiagnostics AndAlso
Highlighting\KeywordHighlighters\XmlDocumentPrologueHighlighter.vb (1)
24If Not .ContainsDiagnostics AndAlso
Highlighting\KeywordHighlighters\XmlEmbeddedExpressionHighlighter.vb (1)
24If Not .ContainsDiagnostics AndAlso
Highlighting\KeywordHighlighters\XmlProcessingInstructionHighlighter.vb (1)
24If Not .ContainsDiagnostics AndAlso
Structure\Providers\StringLiteralExpressionStructureProvider.vb (1)
20Not node.ContainsDiagnostics Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (39)
IncrementalParser\IncrementalParser.vb (9)
87Assert.Equal(False, root.ContainsDiagnostics) 108Assert.Equal(False, tree.GetRoot().ContainsDiagnostics) 748Assert.Equal(False, oldTree.GetRoot().ContainsDiagnostics) 749Assert.Equal(False, newTree.GetRoot().ContainsDiagnostics) 750Assert.Equal(False, incTree.GetRoot().ContainsDiagnostics) 774Assert.Equal(False, expectedTree.GetRoot().ContainsDiagnostics) 775Assert.Equal(False, incrementalTree.GetRoot().ContainsDiagnostics) 799Assert.Equal(True, expectedTree.GetRoot().ContainsDiagnostics) 800Assert.Equal(True, incrementalTree.GetRoot().ContainsDiagnostics)
Parser\DeclarationTests.vb (1)
16Assert.False(tree.GetRoot().ContainsDiagnostics)
Parser\ParseExpression.vb (7)
33Assert.Equal(expectsErrors, prog.ContainsDiagnostics) 50Assert.Equal(expectsErrors, expr.ContainsDiagnostics) 221Assert.True(exp.ContainsDiagnostics) 235Assert.True(exp.ContainsDiagnostics) 246Assert.True(exp.ContainsDiagnostics) 1024Assert.False(tree.ContainsDiagnostics, errors) 2022Assert.True(name.ContainsDiagnostics)
Parser\ParseStatements.vb (14)
1895Assert.Equal(False, statement.ContainsDiagnostics) 1904Assert.Equal(True, statement.ContainsDiagnostics) 1913Assert.Equal(True, statement.ContainsDiagnostics) 1922Assert.Equal(False, statement.ContainsDiagnostics) 1928Assert.Equal(False, statement.ContainsDiagnostics) 1934Assert.Equal(False, statement.ContainsDiagnostics) 1949Assert.Equal(False, statement.ContainsDiagnostics) 1966Assert.Equal(True, statement.ContainsDiagnostics) 1983Assert.Equal(False, statement.ContainsDiagnostics) 2000Assert.Equal(True, statement.ContainsDiagnostics) 2180Assert.False(compilation.ContainsDiagnostics) 2219Assert.False(compilation.ContainsDiagnostics) 2254Assert.False(compilation.ContainsDiagnostics) 2296Assert.Equal(False, statement.ContainsDiagnostics)
Scanner\ScanErrorTests.vb (1)
29Assert.Equal(True, t.ContainsDiagnostics)
Syntax\SyntaxFactsTest.vb (3)
1017Assert.False(cu.ContainsDiagnostics, "Baseline has diagnostics.") 1106Assert.False(cu.ContainsDiagnostics, "Transformed tree has diagnostics.") 1116Assert.False(cu.ContainsDiagnostics, "Baseline has diagnostics.")
Syntax\SyntaxRewriterTests.vb (2)
463Assert.False(red.ContainsDiagnostics) 749Assert.False(red.ContainsDiagnostics)
TestSyntaxNodes.vb (2)
957Assert.True(node.ContainsDiagnostics) 959Assert.False(node.ContainsDiagnostics)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (3)
ParserTestUtilities.vb (3)
86Assert.Equal(root.ContainsDiagnostics, errors.Builder.Length > 0) 87Assert.False(root.ContainsDiagnostics, errors.ToStringAndFree()) 89Assert.True(root.ContainsDiagnostics, "Tree was expected to contain errors.")
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (1)
332Return Not parsedNode.ContainsDiagnostics()
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
548If name.ContainsDiagnostics Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (1)
220If node.ContainsDiagnostics Then
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
CommandLineProject\CommandLineProjectWorkspaceTests.cs (1)
46Assert.False(tree.ContainsDiagnostics);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ChangeSignature\CSharpChangeSignatureViewModelFactoryService.cs (1)
55public override bool IsTypeNameValid(string typeName) => !SyntaxFactory.ParseTypeName(typeName, options: s_langVersionLatestParseOptions).ContainsDiagnostics;
Snippets\CSharpSnippetExpansionLanguageHelper.cs (1)
141else if (candidateUsing.ContainsDiagnostics && !namespaceToImport.Contains("="))
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
ChangeSignature\VisualBasicChangeSignatureViewModelFactoryService.vb (1)
47Return Not SyntaxFactory.ParseTypeName(typeName, options:=visualBasicParseOptions).ContainsDiagnostics
CodeModel\VisualBasicCodeModelService.CodeModelEventCollector.vb (1)
133If member.ContainsDiagnostics Then