701 references to Error
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.Diagnostics.cs (1)
19DiagnosticSeverity.Error,
CodeStyleConfigFileGenerator (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (2)
28DiagnosticSeverity.Error => ReportDiagnostic.Error, 39DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
ConfigurationSchemaGenerator (1)
DiagnosticDescriptors.cs (1)
41defaultSeverity: DiagnosticSeverity.Error,
CSharpSyntaxGenerator (2)
SourceGenerator.cs (2)
39defaultSeverity: DiagnosticSeverity.Error, 47defaultSeverity: DiagnosticSeverity.Error,
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticAnalyzerRunner.cs (1)
86diags = diags.Where(d => d.Severity == DiagnosticSeverity.Error || analyzer.SupportedDiagnostics.Any(s => s.Id.Equals(d.Id))).ToImmutableArray();
DiagnosticVerifier.cs (1)
109diags = diags.Where(d => d.Severity == DiagnosticSeverity.Error || analyzer.SupportedDiagnostics.Any(s => s.Id.Equals(d.Id))).ToImmutableArray();
Microsoft.AspNetCore.App.Analyzers (7)
DiagnosticDescriptors.cs (6)
61DiagnosticSeverity.Error, 70DiagnosticSeverity.Error, 79DiagnosticSeverity.Error, 169DiagnosticSeverity.Error, 178DiagnosticSeverity.Error, 205DiagnosticSeverity.Error,
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (1)
193if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
Microsoft.AspNetCore.Components.Analyzers (2)
DiagnosticDescriptors.cs (2)
16DiagnosticSeverity.Error, 43DiagnosticSeverity.Error,
Microsoft.AspNetCore.Components.Analyzers.Tests (11)
ComponentParameterSettersShouldBePublicTest.cs (3)
80Severity = DiagnosticSeverity.Error, 90Severity = DiagnosticSeverity.Error, 100Severity = DiagnosticSeverity.Error,
ComponentParametersShouldBePublicCodeFixProviderTest.cs (4)
47Severity = DiagnosticSeverity.Error, 87Severity = DiagnosticSeverity.Error, 97Severity = DiagnosticSeverity.Error, 107Severity = DiagnosticSeverity.Error,
ComponentParametersShouldBePublicTest.cs (4)
65Severity = DiagnosticSeverity.Error, 75Severity = DiagnosticSeverity.Error, 85Severity = DiagnosticSeverity.Error, 95Severity = DiagnosticSeverity.Error,
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
DiagnosticDescriptors.cs (2)
20DiagnosticSeverity.Error, 47DiagnosticSeverity.Error,
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (11)
ComponentParameterSettersShouldBePublicTest.cs (3)
80Severity = DiagnosticSeverity.Error, 90Severity = DiagnosticSeverity.Error, 100Severity = DiagnosticSeverity.Error,
ComponentParametersShouldBePublicCodeFixProviderTest.cs (4)
47Severity = DiagnosticSeverity.Error, 87Severity = DiagnosticSeverity.Error, 97Severity = DiagnosticSeverity.Error, 107Severity = DiagnosticSeverity.Error,
ComponentParametersShouldBePublicTest.cs (4)
65Severity = DiagnosticSeverity.Error, 75Severity = DiagnosticSeverity.Error, 85Severity = DiagnosticSeverity.Error, 95Severity = DiagnosticSeverity.Error,
Microsoft.AspNetCore.Mvc.Analyzers (1)
DiagnosticDescriptors.cs (1)
66DiagnosticSeverity.Error,
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
CompilationFailedExceptionFactory.cs (1)
54.Where(diagnostic => diagnostic.IsWarningAsError || diagnostic.Severity == DiagnosticSeverity.Error)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
CompilerFailedExceptionFactoryTest.cs (1)
329defaultSeverity: DiagnosticSeverity.Error,
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (18)
DiagnosticDescriptors.cs (18)
19defaultSeverity: DiagnosticSeverity.Error, 35defaultSeverity: DiagnosticSeverity.Error, 43defaultSeverity: DiagnosticSeverity.Error, 51defaultSeverity: DiagnosticSeverity.Error, 59defaultSeverity: DiagnosticSeverity.Error, 67defaultSeverity: DiagnosticSeverity.Error, 75defaultSeverity: DiagnosticSeverity.Error, 83defaultSeverity: DiagnosticSeverity.Error, 91defaultSeverity: DiagnosticSeverity.Error, 109defaultSeverity: DiagnosticSeverity.Error, 117defaultSeverity: DiagnosticSeverity.Error, 125defaultSeverity: DiagnosticSeverity.Error, 133defaultSeverity: DiagnosticSeverity.Error, 141defaultSeverity: DiagnosticSeverity.Error, 149defaultSeverity: DiagnosticSeverity.Error, 157defaultSeverity: DiagnosticSeverity.Error, 165defaultSeverity: DiagnosticSeverity.Error, 173defaultSeverity: DiagnosticSeverity.Error,
Microsoft.CodeAnalysis (44)
Binding\BindingDiagnosticBag.cs (3)
249if (info.Severity == DiagnosticSeverity.Error) 308return info.Severity == DiagnosticSeverity.Error; 361if ((diagnostic as DiagnosticWithInfo)?.HasLazyInfo != true && diagnostic.Severity == DiagnosticSeverity.Error)
Binding\UseSiteInfo.cs (9)
60Debug.Assert(diagnosticInfo?.Severity != DiagnosticSeverity.Error || (primaryDependency is null && secondaryDependencies?.IsEmpty != false)); 75if (diagnosticInfo?.Severity == DiagnosticSeverity.Error) 81Debug.Assert(DiagnosticInfo?.Severity != DiagnosticSeverity.Error); 211Debug.Assert(_hasErrors == (_diagnostics?.Any(d => d.Severity == DiagnosticSeverity.Error) ?? false)); 245info.DiagnosticInfo?.Severity == DiagnosticSeverity.Error) 282if (_diagnostics.Add(diagnosticInfo) && diagnosticInfo?.Severity == DiagnosticSeverity.Error) 474Debug.Assert(diagnosticInfo is null || diagnosticInfo.Severity == DiagnosticSeverity.Error); 487Debug.Assert(primaryDependency == useSiteInfo.PrimaryDependency || useSiteInfo.DiagnosticInfo?.Severity == DiagnosticSeverity.Error); 500if (diagnosticInfo?.Severity == DiagnosticSeverity.Error)
CommandLine\CommonCompiler.cs (1)
585if (diag.Severity == DiagnosticSeverity.Error)
CommandLine\SarifErrorLogger.cs (1)
64case DiagnosticSeverity.Error:
Compilation\Compilation.cs (1)
253if (previousScriptCompilation.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
Compilation\LoadDirective.cs (1)
22RoslynDebug.Assert(diagnostics.IsEmpty || diagnostics.All(d => d.Severity == DiagnosticSeverity.Error));
Diagnostic\CommonMessageProvider.cs (1)
139return diagnosticInfo.GetInstanceWithSeverity(DiagnosticSeverity.Error);
Diagnostic\Diagnostic.cs (7)
333/// Gets the warning level. This is 0 for diagnostics with severity <see cref="DiagnosticSeverity.Error"/>, 378/// and <see cref="Severity"/> = <see cref="DiagnosticSeverity.Error"/>. 385this.Severity == DiagnosticSeverity.Error; 535return this.WithSeverity(DiagnosticSeverity.Error); 566case DiagnosticSeverity.Error: 590=> DefaultSeverity == DiagnosticSeverity.Error && IsNotConfigurable(); 596=> Severity == DiagnosticSeverity.Error && !IsSuppressed;
Diagnostic\Diagnostic_SimpleDiagnostic.cs (2)
40if ((warningLevel == 0 && severity != DiagnosticSeverity.Error) || 41(warningLevel != 0 && severity == DiagnosticSeverity.Error))
Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
Diagnostic\DiagnosticBag.cs (2)
74if (diagnostic.DefaultSeverity == DiagnosticSeverity.Error) 102if ((diagnostic as DiagnosticWithInfo)?.HasLazyInfo != true && diagnostic.DefaultSeverity == DiagnosticSeverity.Error)
Diagnostic\DiagnosticDescriptor.cs (2)
259case DiagnosticSeverity.Error: 271return DiagnosticSeverity.Error;
Diagnostic\DiagnosticFormatter.cs (1)
96case DiagnosticSeverity.Error:
Diagnostic\DiagnosticInfo.cs (7)
158_effectiveSeverity = DiagnosticSeverity.Error; 197/// If IsWarningsAsError is true, then this returns <see cref="DiagnosticSeverity.Error"/>, while <see cref="DefaultSeverity"/> returns <see cref="DiagnosticSeverity.Warning"/>. 220/// Gets the warning level. This is 0 for diagnostics with severity <see cref="DiagnosticSeverity.Error"/>, 240/// True implies <see cref="Severity"/> = <see cref="DiagnosticSeverity.Error"/> and 248this.Severity == DiagnosticSeverity.Error; 274return defaultSeverity == DiagnosticSeverity.Error ? 282return _defaultSeverity == DiagnosticSeverity.Error;
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1051d.DefaultSeverity != DiagnosticSeverity.Error &&
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (1)
1894/// 2. Diagnostic's <see cref="Diagnostic.DefaultSeverity"/> is not <see cref="DiagnosticSeverity.Error"/>.
DiagnosticAnalyzer\DiagnosticSuppressor.cs (1)
35/// 2. Diagnostic's <see cref="Diagnostic.DefaultSeverity"/> is not <see cref="DiagnosticSeverity.Error"/>.
Operations\OperationExtensions.cs (1)
63return model.GetDiagnostics(operation.Syntax.Span, cancellationToken).Any(static d => d.DefaultSeverity == DiagnosticSeverity.Error);
Syntax\SyntaxNode.cs (1)
1643info => info.Severity == DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.CodeStyle (13)
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
115?.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
52if (node.ContainsDiagnostics && node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
130if (root.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
620if (tree.GetDiagnostics(cancellationToken).Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
81if (syntax.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
124if (context.Operation.Syntax.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\Compilers\Core\Portable\Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
195DiagnosticSeverity.Error => NotificationOption2.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (1)
61DiagnosticSeverity.Error => Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
16DiagnosticSeverity.Error => NotificationOption2.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (2)
28DiagnosticSeverity.Error => ReportDiagnostic.Error, 39DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (1)
30return DiagnosticSeverity.Error;
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
185diag => diag.Severity == DiagnosticSeverity.Error && !ignoreErrorCode.Contains(diag.Id));
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (1)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpVerifierHelper.cs (1)
18/// diagnostics at <see cref="DiagnosticSeverity.Error"/>. This map contains all compiler diagnostic IDs
Microsoft.CodeAnalysis.CSharp (36)
Binder\Binder_Crefs.cs (1)
1015if (diag.Severity == DiagnosticSeverity.Error)
Binder\Binder_Expressions.cs (1)
8919wasError = (result.Error.Severity == DiagnosticSeverity.Error);
Binder\Binder_InterpolatedString.cs (1)
73!interpolation.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error) &&
Binder\Binder_Lookup.cs (1)
725if (info.Severity == DiagnosticSeverity.Error)
Binder\Binder_Symbols.cs (2)
1711if (severity == DiagnosticSeverity.Error) 1852if (severity == DiagnosticSeverity.Error)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
584Debug.Assert(diagInfo.Severity == DiagnosticSeverity.Error); 612Debug.Assert(bad.Member.GetUseSiteInfo().DiagnosticInfo.Severity == DiagnosticSeverity.Error,
Compilation\CSharpCompilation.cs (1)
4687return (diagnostic == null) || (diagnostic.Severity != DiagnosticSeverity.Error);
Compilation\SyntaxAndDeclarationManager.cs (1)
211Debug.Assert(!directive.IsActive || tree.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error));
Emitter\Model\PEModuleBuilder.cs (1)
1099if (diagnosticInfo != null && diagnosticInfo.Severity == DiagnosticSeverity.Error)
Emitter\NoPia\EmbeddedTypesManager.cs (1)
100if (info.DiagnosticInfo?.Severity == DiagnosticSeverity.Error)
Errors\DiagnosticBagExtensions.cs (1)
95if (info.Severity == DiagnosticSeverity.Error)
Errors\ErrorFacts.cs (1)
130return DiagnosticSeverity.Error;
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
73if (info?.Severity != DiagnosticSeverity.Error && !binder.AreNullableAnnotationsEnabled(questionToken))
Errors\MessageProvider.cs (1)
73severity == DiagnosticSeverity.Error || isWarningAsError ? "error" : "warning",
FlowAnalysis\DefiniteAssignment.cs (1)
589if (diagnostic.Severity != DiagnosticSeverity.Error || compatDiagnosticSet.Contains(diagnostic))
FlowAnalysis\FlowAnalysisPass.cs (1)
90IEnumerable<Diagnostic> getErrorsOnly(IEnumerable<Diagnostic> diags) => diags.Where(d => d.Severity == DiagnosticSeverity.Error);
Lowering\LocalRewriter\LocalRewriter_Field.cs (1)
105if (useSiteInfo.DiagnosticInfo?.Severity != DiagnosticSeverity.Error)
Lowering\SyntheticBoundNodeFactory.cs (1)
376if (useSiteInfo.DiagnosticInfo?.DefaultSeverity == DiagnosticSeverity.Error)
Parser\LanguageParser.cs (1)
14155if (diagnostic.Severity == DiagnosticSeverity.Error)
Symbols\ConstraintsHelper.cs (1)
1301if (info.Severity == DiagnosticSeverity.Error)
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
785if (info.DiagnosticInfo?.Severity != DiagnosticSeverity.Error)
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
685if (useSiteInfo.DiagnosticInfo?.Severity == DiagnosticSeverity.Error)
Symbols\ReducedExtensionMethodSymbol.cs (1)
62if (diag.Severity == DiagnosticSeverity.Error)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
814if (useSiteDiagnostic?.Severity == DiagnosticSeverity.Error)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
250reportedAnError = implementingMemberAndDiagnostics.Diagnostics.Diagnostics.Any(static d => d.Severity == DiagnosticSeverity.Error); 288if (useSiteDiagnostic != null && useSiteDiagnostic.DefaultSeverity == DiagnosticSeverity.Error) 1797if (diagnostic.Severity == DiagnosticSeverity.Error && diagnostic.Code is not ((int)ErrorCode.ERR_ImplicitImplementationOfNonPublicInterfaceMember or (int)ErrorCode.ERR_ImplicitImplementationOfInaccessibleInterfaceMember))
Symbols\Symbol.cs (5)
1052return info.DiagnosticInfo?.Severity == DiagnosticSeverity.Error; 1121if (info.Severity == DiagnosticSeverity.Error && IsHighestPriorityUseSiteErrorCode(info.Code)) 1128if (result == null || result.Severity == DiagnosticSeverity.Warning && info.Severity == DiagnosticSeverity.Error) 1148if (diagnosticInfo?.Severity == DiagnosticSeverity.Error) 1186return info.Severity == DiagnosticSeverity.Error;
Symbols\Tuples\TupleTypeSymbol.cs (1)
499if (useSiteInfo.DiagnosticInfo?.Severity != DiagnosticSeverity.Error)
Symbols\TypeSymbol.cs (1)
2038useSiteDiagnostic.DefaultSeverity == DiagnosticSeverity.Error)
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
51if (switchStatement.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
72if (arrowExpressionClause.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
43if (conditionalExpression.GetRequiredParent().GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
62if (current.ContainsDiagnostics && current.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
94if (topMostExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
99if (localDeclaration.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
51if (expression.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
184if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
96if (parsed.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (3)
src\Analyzers\CSharp\Tests\ConvertToRecord\ConvertToRecordCodeFixTests.cs (1)
169DiagnosticSeverity.Error,
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (1)
2422diagnosticSeverity: DiagnosticSeverity.Error);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
1952diagnosticSeverity: DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (41)
CommandLineTests.cs (41)
13129var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Error, configurable: true); 13802var expectedExitCode = !analyzerShouldBeSkipped && defaultSeverity == DiagnosticSeverity.Error ? 1 : 0; 13820[InlineData(false, false, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, null, DiagnosticSeverity.Error)] 13822[InlineData(false, true, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, null, DiagnosticSeverity.Error)] 13825[InlineData(false, false, DiagnosticSeverity.Info, null, DiagnosticSeverity.Warning, DiagnosticSeverity.Error)] 13827[InlineData(false, true, DiagnosticSeverity.Info, null, DiagnosticSeverity.Warning, DiagnosticSeverity.Error)] 13830[InlineData(false, false, DiagnosticSeverity.Warning, null, null, DiagnosticSeverity.Error)] 13832[InlineData(false, true, DiagnosticSeverity.Warning, null, null, DiagnosticSeverity.Error)] 13835[InlineData(false, false, DiagnosticSeverity.Warning, DiagnosticSeverity.Error, null, DiagnosticSeverity.Error)] 13836[InlineData(true, false, DiagnosticSeverity.Warning, DiagnosticSeverity.Error, null, DiagnosticSeverity.Warning)] 13837[InlineData(false, true, DiagnosticSeverity.Warning, DiagnosticSeverity.Error, null, DiagnosticSeverity.Error)] 13838[InlineData(true, true, DiagnosticSeverity.Warning, DiagnosticSeverity.Error, null, DiagnosticSeverity.Warning)] 13840[InlineData(false, false, DiagnosticSeverity.Info, DiagnosticSeverity.Error, null, DiagnosticSeverity.Error)] 13841[InlineData(true, false, DiagnosticSeverity.Info, DiagnosticSeverity.Error, null, DiagnosticSeverity.Error)] 13842[InlineData(false, true, DiagnosticSeverity.Info, DiagnosticSeverity.Error, null, DiagnosticSeverity.Error)] 13843[InlineData(true, true, DiagnosticSeverity.Info, DiagnosticSeverity.Error, null, DiagnosticSeverity.Error)] 13845[InlineData(false, false, DiagnosticSeverity.Info, null, DiagnosticSeverity.Error, DiagnosticSeverity.Error)] 13846[InlineData(true, false, DiagnosticSeverity.Info, null, DiagnosticSeverity.Error, DiagnosticSeverity.Error)] 13847[InlineData(false, true, DiagnosticSeverity.Info, null, DiagnosticSeverity.Error, DiagnosticSeverity.Error)] 13848[InlineData(true, true, DiagnosticSeverity.Info, null, DiagnosticSeverity.Error, DiagnosticSeverity.Error)] 13849[InlineData(false, false, DiagnosticSeverity.Warning, null, DiagnosticSeverity.Error, DiagnosticSeverity.Error)] 13850[InlineData(true, false, DiagnosticSeverity.Warning, null, DiagnosticSeverity.Error, DiagnosticSeverity.Error)] 13851[InlineData(false, true, DiagnosticSeverity.Warning, null, DiagnosticSeverity.Error, DiagnosticSeverity.Error)] 13852[InlineData(true, true, DiagnosticSeverity.Warning, null, DiagnosticSeverity.Error, DiagnosticSeverity.Error)] 13903case DiagnosticSeverity.Error: 16026internal static readonly DiagnosticDescriptor Error01 = new DiagnosticDescriptor("Error01", "", "Throwing a diagnostic for #pragma disable", "", DiagnosticSeverity.Error, isEnabledByDefault: true); 16027internal static readonly DiagnosticDescriptor Error02 = new DiagnosticDescriptor("Error02", "", "Throwing a diagnostic for something else", "", DiagnosticSeverity.Error, isEnabledByDefault: true);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
Interactive\CSharpSendToInteractiveSubmissionProvider.cs (1)
33!tree.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error);
StringCopyPaste\StringCopyPasteHelpers.cs (2)
46if (diagnostic.Severity == DiagnosticSeverity.Error) 70if (diagnostic.Severity == DiagnosticSeverity.Error)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Formatting\CodeCleanupTests.cs (1)
742[InlineData(DiagnosticSeverity.Error)]
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
327Assert.Empty(result.Diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Emit\NumericIntPtrTests.cs (2)
9017if (expectedDiagnostics.Any(d => ErrorFacts.GetSeverity((ErrorCode)d.Code) == DiagnosticSeverity.Error)) 9062if (expectedDiagnostics.Any(d => ErrorFacts.GetSeverity((ErrorCode)d.Code) == DiagnosticSeverity.Error))
PDB\CSharpPDBTestBase.cs (1)
28compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (23)
Diagnostics\DiagnosticAnalyzerTests.cs (8)
306var errorDiagDescriptor = new DiagnosticDescriptor("XX0004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Error, isEnabledByDefault: true); 327Assert.True(effectiveDiag.Severity == DiagnosticSeverity.Error); 372case DiagnosticSeverity.Error: 390var errorDiagDescriptor = new DiagnosticDescriptor("XX0004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Error, isEnabledByDefault: true); 414Assert.Equal(1, effectiveDiags.Count(d => d.Severity == DiagnosticSeverity.Error)); 421Assert.Equal(1, effectiveDiags.Count(d => d.Severity == DiagnosticSeverity.Error)); 428Assert.Equal(1, effectiveDiags.Count(d => d.Severity == DiagnosticSeverity.Error)); 435Assert.Equal(1, effectiveDiags.Count(d => d.Severity == DiagnosticSeverity.Error));
Diagnostics\DiagnosticSuppressorTests.cs (2)
347effectiveSeverity == DiagnosticSeverity.Error && 369if (defaultSeverity == DiagnosticSeverity.Error || !configurable)
Diagnostics\GetDiagnosticsTests.cs (2)
123var error = diag.WithSeverity(DiagnosticSeverity.Error); 124Assert.Equal(DiagnosticSeverity.Error, error.Severity);
FlowAnalysis\FlowDiagnosticTests.cs (11)
158Assert.Equal(0, count[(int)DiagnosticSeverity.Error]); 186Assert.Equal(0, count[(int)DiagnosticSeverity.Error]); 355Assert.Equal(0, count[(int)DiagnosticSeverity.Error]); 391Assert.Equal(0, count[(int)DiagnosticSeverity.Error]); 496Assert.NotEmpty(this.FlowDiagnostics(comp).Where(e => e.Severity >= DiagnosticSeverity.Error)); 514Assert.Empty(this.FlowDiagnostics(comp).Where(e => e.Severity >= DiagnosticSeverity.Error)); 535Assert.NotEmpty(this.FlowDiagnostics(comp).Where(e => e.Severity >= DiagnosticSeverity.Error)); 552Assert.Empty(this.FlowDiagnostics(comp).Where(e => e.Severity >= DiagnosticSeverity.Error)); 573Assert.NotEmpty(this.FlowDiagnostics(comp).Where(e => e.Severity >= DiagnosticSeverity.Error)); 591Assert.NotEmpty(this.FlowDiagnostics(comp).Where(e => e.Severity >= DiagnosticSeverity.Error)); 636Assert.NotEmpty(this.FlowDiagnostics(comp).Where(e => e.Severity >= DiagnosticSeverity.Error));
Microsoft.CodeAnalysis.CSharp.Features (12)
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (1)
372if (namespaceDecl.Name.GetDiagnostics().Any(diag => diag.DefaultSeverity == DiagnosticSeverity.Error))
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
93!_semanticModel.GetDiagnostics(_source.Span, _cancellationToken).Any(static diagnostic => diagnostic.DefaultSeverity == DiagnosticSeverity.Error))
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (1)
72if (stringExpression.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
51if (switchStatement.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
72if (arrowExpressionClause.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
43if (conditionalExpression.GetRequiredParent().GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
62if (current.ContainsDiagnostics && current.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
94if (topMostExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
99if (localDeclaration.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
51if (expression.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
StringIndentation\CSharpStringIndentationService.cs (2)
82if (token.ContainsDiagnostics && token.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)) 99var errors = interpolatedString.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (5)
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (1)
4758DiagnosticSeverity.Error,
Diagnostics\Suppression\SuppressionTests.cs (1)
803new DiagnosticDescriptor("ErrorDiagnostic", "ErrorDiagnostic", "ErrorDiagnostic", "ErrorDiagnostic", DiagnosticSeverity.Error, isEnabledByDefault: true);
src\Analyzers\CSharp\Tests\ConvertToRecord\ConvertToRecordCodeFixTests.cs (1)
169DiagnosticSeverity.Error,
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (1)
2422diagnosticSeverity: DiagnosticSeverity.Error);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
1952diagnosticSeverity: DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (37)
Semantics\ImportsTests.cs (1)
147comp.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
Semantics\InterpolationTests.cs (12)
533Assert.True(SyntaxFactory.ParseSyntaxTree(source + normal).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 534Assert.True(SyntaxFactory.ParseSyntaxTree(source + normal + " ").GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 535Assert.True(SyntaxFactory.ParseSyntaxTree(source + normal + "{").GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 536Assert.True(SyntaxFactory.ParseSyntaxTree(source + normal + "{ ").GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 537Assert.True(SyntaxFactory.ParseSyntaxTree(source + verbat).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 538Assert.True(SyntaxFactory.ParseSyntaxTree(source + verbat + " ").GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 539Assert.True(SyntaxFactory.ParseSyntaxTree(source + verbat + "{").GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 540Assert.True(SyntaxFactory.ParseSyntaxTree(source + verbat + "{ ").GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 558Assert.True(SyntaxFactory.ParseSyntaxTree(source).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 576Assert.True(SyntaxFactory.ParseSyntaxTree(source).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 595Assert.True(SyntaxFactory.ParseSyntaxTree(source).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 1489Assert.True(SyntaxFactory.ParseSyntaxTree(text).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error));
Semantics\MethodBodyModelTests.cs (2)
134Assert.Equal(2, count[(int)DiagnosticSeverity.Error]); 618Assert.Equal(0, diags.Count(d => d.Severity == DiagnosticSeverity.Error));
Semantics\NativeIntegerTests.cs (2)
13267if (expectedDiagnostics.Any(d => ErrorFacts.GetSeverity((ErrorCode)d.Code) == DiagnosticSeverity.Error)) 13310if (expectedDiagnostics.Any(d => ErrorFacts.GetSeverity((ErrorCode)d.Code) == DiagnosticSeverity.Error))
Semantics\NullableReferenceTypesTests.cs (6)
125171Assert.Equal(DiagnosticSeverity.Error, diagnostics.Single().Severity); 125182Assert.Equal(DiagnosticSeverity.Error, diagnostics.Single().Severity); 125192Assert.Equal(DiagnosticSeverity.Error, diagnostics.Single().Severity); 125506Assert.Equal(DiagnosticSeverity.Error, diagnostics.Single().Severity); 125517Assert.Equal(DiagnosticSeverity.Error, diagnostics.Single().Severity); 125527Assert.Equal(DiagnosticSeverity.Error, diagnostics.Single().Severity);
Semantics\OperatorTests.cs (2)
6272CreateCompilation(text).GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify( 6293CreateCompilation(text).GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
Semantics\RawInterpolationTests.cs (8)
559Assert.True(SyntaxFactory.ParseSyntaxTree(source + normal).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 560Assert.True(SyntaxFactory.ParseSyntaxTree(source + normal + " ").GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 561Assert.True(SyntaxFactory.ParseSyntaxTree(source + normal + "{").GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 562Assert.True(SyntaxFactory.ParseSyntaxTree(source + normal + "{ ").GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 580Assert.True(SyntaxFactory.ParseSyntaxTree(source).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 598Assert.True(SyntaxFactory.ParseSyntaxTree(source).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 617Assert.True(SyntaxFactory.ParseSyntaxTree(source).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)); 1163Assert.True(SyntaxFactory.ParseSyntaxTree(text).GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error));
Semantics\RefEscapingTests.cs (1)
48Assert.True(comp.GetDiagnostics().All(d => d.Severity != DiagnosticSeverity.Error));
Semantics\UnsafeTests.cs (1)
5190if (expectError != compilationDiagnostics.Any(diag => diag.Severity == DiagnosticSeverity.Error))
Semantics\VarianceTests.cs (2)
114var errors = comp.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error); 227var errors = comp.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\SemanticModelAPITests.cs (1)
4366compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
Compilation\UsedAssembliesTests.cs (2)
109if (!after.Any(d => ErrorFacts.GetSeverity((ErrorCode)d.Code) == DiagnosticSeverity.Error)) 282Assert.True(diagnostics.Any(d => d.DefaultSeverity == DiagnosticSeverity.Error));
Symbols\TypeTests.cs (1)
1198Assert.Equal(0, comp.GetDeclarationDiagnostics().Count(e => e.Severity >= DiagnosticSeverity.Error));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Diagnostics\DiagnosticTest.cs (2)
73Assert.Equal(DiagnosticSeverity.Error, di1.Severity); 2790return DiagnosticSeverity.Error;
Parsing\SyntaxExtensions.cs (1)
112if (item.Severity == (errorsOnly ? DiagnosticSeverity.Error : DiagnosticSeverity.Warning))
Syntax\LambdaUtilitiesTests.cs (1)
44compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1365if (!compileDiagnostics.Any(d => d.DefaultSeverity == DiagnosticSeverity.Error) &&
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
184if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
96if (parsed.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\AddImportsTests.cs (1)
795Assert.Empty(compilerDiagnostics.Where(d => d.Severity == DiagnosticSeverity.Error));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Squiggles\TestDiagnosticTagProducer.cs (2)
37severity: DiagnosticSeverity.Error, 38defaultSeverity: DiagnosticSeverity.Error,
Workspaces\NoCompilationDocumentDiagnosticAnalyzer.cs (1)
20"NC0000", "No Compilation Syntax Error", "No Compilation Syntax Error", "Error", DiagnosticSeverity.Error, isEnabledByDefault: true);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (9)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (9)
915internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("syntax", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 916internal static readonly DiagnosticDescriptor s_semanticRule = new DiagnosticDescriptor("semantic", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 917internal static readonly DiagnosticDescriptor s_compilationRule = new DiagnosticDescriptor("compilation", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 931internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("syntax", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: false); 932internal static readonly DiagnosticDescriptor s_semanticRule = new DiagnosticDescriptor("semantic", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: false); 933internal static readonly DiagnosticDescriptor s_compilationRule = new DiagnosticDescriptor("compilation", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: false); 947internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("syntax", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 1009internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("leak", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 1025private static readonly DiagnosticDescriptor s_rule = new DiagnosticDescriptor("project", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (3)
InlineDiagnostics\InlineDiagnosticsTaggerProvider.cs (2)
48diagnostic.Severity is DiagnosticSeverity.Warning or DiagnosticSeverity.Error && 81if (diagnostic.Severity == DiagnosticSeverity.Error)
Suggestions\SuggestedActionsSource.cs (1)
261DiagnosticSeverity.Error => PredefinedSuggestedActionCategoryNames.ErrorFix,
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
68Public Shared Rule As New DiagnosticDescriptor("OA1001", "Options test", "Serialization support has not been requested", "Test", DiagnosticSeverity.Error, True)
Diagnostics\DiagnosticProviderTests.vb (1)
336Return CreateDiagnostic(id, message, DiagnosticSeverity.Error, docId, projId, mappedLine, originalLine, mappedColumn, originalColumn, mappedFile, originalFile)
Diagnostics\DiagnosticServiceTests.vb (1)
314Assert.Equal(DiagnosticSeverity.Error, diagnostics(0).Severity)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (3)
EvaluationContextBase.cs (3)
60var errors = diagnostics.AsEnumerable().Where(d => d.Severity == DiagnosticSeverity.Error); 133get { return DiagnosticSeverity.Error; } 138get { return DiagnosticSeverity.Error; }
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Internal\Diagnostics\FSharpDocumentDiagnosticAnalyzer.cs (1)
62dummyDescriptors.Add(new DiagnosticDescriptor(String.Format("FS{0:D4}", i), String.Empty, String.Empty, String.Empty, DiagnosticSeverity.Error, true, null, null));
Microsoft.CodeAnalysis.Features (27)
CodeFixes\Suppression\SuppressionHelpers.cs (1)
55case DiagnosticSeverity.Error:
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (1)
195if (diagnostic.Severity == DiagnosticSeverity.Error)
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
42if (from.GetDiagnostics().Any(d => d.DefaultSeverity == DiagnosticSeverity.Error))
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (1)
81if (ifStatement == null || ifStatement.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
ConvertLinq\ConvertForEachToLinqQuery\AbstractConvertForEachToLinqQueryProvider.cs (1)
94.Any(static diagnostic => diagnostic.DefaultSeverity == DiagnosticSeverity.Error))
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (2)
59if (stringToken.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)) 100if (interpolatedString.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (1)
49if (literalExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
54DiagnosticSeverity.Error,
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
571var syntaxError = syntaxDiagnostics.FirstOrDefault(d => d.Severity == DiagnosticSeverity.Error);
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (3)
57void AddRudeEdit(RudeEditKind kind, string resourceName, DiagnosticSeverity severity = DiagnosticSeverity.Error) 60void AddGeneralDiagnostic(EditAndContinueErrorCode code, string resourceName, DiagnosticSeverity severity = DiagnosticSeverity.Error) 198DiagnosticSeverity.Error,
EditAndContinue\EditSessionTelemetry.cs (1)
127=> LogProjectAnalysisSummary(summary, projectTelemetryId, emitDiagnostics.SelectAsArray(d => d.Severity == DiagnosticSeverity.Error, d => d.Id));
EditAndContinue\RudeEditDiagnostic.cs (2)
54=> kind.GetSeverity() == DiagnosticSeverity.Error; 57=> diagnostic.Descriptor.DefaultSeverity == DiagnosticSeverity.Error;
EditAndContinue\SolutionUpdate.cs (1)
55if (diagnostic.Severity == DiagnosticSeverity.Error)
EditAndContinue\Utilities\Extensions.cs (2)
125DiagnosticSeverity.Error => ManagedHotReloadDiagnosticSeverity.RestartRequired, 131: (data.Severity == DiagnosticSeverity.Error)
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
115?.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
52if (node.ContainsDiagnostics && node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
130if (root.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
620if (tree.GetDiagnostics(cancellationToken).Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
81if (syntax.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
124if (context.Operation.Syntax.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
Wrapping\AbstractWrapper.cs (1)
66=> declaration.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error && d.Location.SourceSpan.OverlapsWith(headerSpan));
Wrapping\AbstractWrappingCodeRefactoringProvider.cs (1)
51var containsSyntaxError = node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.Features.UnitTests (7)
EditAndContinue\EmitSolutionUpdateResultsTests.cs (3)
99severity: DiagnosticSeverity.Error, 116severity: DiagnosticSeverity.Error, 117defaultSeverity: DiagnosticSeverity.Error,
FindUsages\DefinitionItemFactoryTests.cs (4)
935Assert.Empty(compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error)); 1340Assert.Empty(compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error)); 1400Assert.Empty(compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error)); 1515Assert.Empty(compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error));
Microsoft.CodeAnalysis.InteractiveHost (2)
Interactive\Core\InteractiveHost.Service.cs (2)
532var writer = (error.Severity == DiagnosticSeverity.Error) ? Console.Error : Console.Out; 667if (diagnostics.Any(static d => d.Severity == DiagnosticSeverity.Error))
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Extensions\ProtocolConversions.Diagnostics.cs (1)
219DiagnosticSeverity.Error => LSP.DiagnosticSeverity.Error,
Features\CodeFixes\CodeFixService.cs (1)
131var preferredMap = diagnostic.Severity == DiagnosticSeverity.Error
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
417case DiagnosticSeverity.Error:
Handler\Breakpoints\ValidateBreakableRangeHandler.cs (1)
62if (tree.GetDiagnostics(cancellationToken).Any(d => d.Severity == DiagnosticSeverity.Error))
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
375"TS01", "TS error", "TS error", "Error", DiagnosticSeverity.Error, isEnabledByDefault: true);
Diagnostics\DiagnosticsPullCacheTests.cs (2)
123return Task.FromResult<ImmutableArray<DiagnosticData>>([new DiagnosticData(Id, category: "category", context.Document!.Name, DiagnosticSeverity.Error, DiagnosticSeverity.Error,
Diagnostics\PullDiagnosticTests.cs (2)
1283severity: DiagnosticSeverity.Error, 1284defaultSeverity: DiagnosticSeverity.Error,
Microsoft.CodeAnalysis.Scripting (3)
Hosting\CommandLine\CommandLineRunner.cs (1)
393Console.SetForegroundColor(diagnostic.Severity == DiagnosticSeverity.Error ? ConsoleColor.Red : ConsoleColor.Yellow);
Script.cs (1)
371return ImmutableArray.CreateRange(e.Diagnostics.Where(d => d.Severity is DiagnosticSeverity.Error or DiagnosticSeverity.Warning));
ScriptBuilder.cs (1)
109var filtered = diagnostics.AsEnumerable().Where(d => d.Severity == DiagnosticSeverity.Error).AsImmutable();
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
ScriptingTestHelpers.cs (1)
91e.Diagnostics.Any(d => d.Severity == DiagnosticSeverity.Error && e.Message == d.ToString());
Microsoft.CodeAnalysis.Test.Utilities (19)
Diagnostics\CommonDiagnosticAnalyzers.cs (15)
47defaultSeverity: DiagnosticSeverity.Error, 109var effectiveSeverity1 = warnAsError || Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning"; 110var effectiveSeverity2 = warnAsError || Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning"; 151""defaultLevel"": """ + (Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 165""defaultLevel"": """ + (Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 192""level"": """ + (Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 216""level"": """ + (Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 228""defaultLevel"": """ + (Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 242""defaultLevel"": """ + (Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 264var effectiveSeverity1 = warnAsError || Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning"; 265var effectiveSeverity2 = warnAsError || Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning"; 326""level"": """ + (Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 358""level"": """ + (Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 487""level"": """ + (Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""" 1491DiagnosticSeverity.Error,
Diagnostics\DiagnosticExtensions.cs (3)
249expected.EffectiveSeverity.Value == DiagnosticSeverity.Error; 258var newEffectiveSeverity = expected.EffectiveSeverity.Value == DiagnosticSeverity.Error ? 260DiagnosticSeverity.Error;
SourceGeneration\TestGenerators.cs (1)
54new DiagnosticDescriptor(nameof(DiagnosticProducingGenerator), "Diagnostic Title", "Diagnostic Format", "Test", DiagnosticSeverity.Error, isEnabledByDefault: true);
Microsoft.CodeAnalysis.UnitTests (3)
Diagnostics\DiagnosticCreationTests.cs (1)
18var effectiveSeverity = DiagnosticSeverity.Error;
Diagnostics\SarifErrorLoggerTests.cs (2)
38var descriptor = new DiagnosticDescriptor("TST", "_TST_", "", "", DiagnosticSeverity.Error, false); 70new DiagnosticDescriptor("TST002", "", "", "", DiagnosticSeverity.Error /*003*/, true),
Microsoft.CodeAnalysis.VisualBasic (24)
Binding\Binder_Expressions.vb (3)
1110If diag.Severity = DiagnosticSeverity.Error Then 3108If di.Severity = DiagnosticSeverity.Error Then 4940If diag.Severity = DiagnosticSeverity.Error Then
Binding\Binder_Invocation.vb (1)
1942If diagnostic.Severity <> DiagnosticSeverity.Error Then
Binding\Binder_Lookup.vb (1)
265Debug.Assert(diagInfo.Severity = DiagnosticSeverity.Error)
Binding\Binder_Symbols.vb (2)
958reportedAnError = (lookupResult.Diagnostic.Severity = DiagnosticSeverity.Error) 1049reportedAnError = (lookupResult.Diagnostic.Severity = DiagnosticSeverity.Error)
Binding\Binder_Utils.vb (1)
122If diag.Severity = DiagnosticSeverity.Error Then
Binding\BindingDiagnosticBag.vb (1)
77Debug.Assert(diagnosticInfo.Severity = DiagnosticSeverity.Error)
Declarations\DeclarationTreeBuilder.vb (1)
852If Not modifier.GetDiagnostics().Any(Function(d) d.Severity = DiagnosticSeverity.Error) Then
Errors\DiagnosticBagExtensions.vb (1)
96Debug.Assert(info.Severity = DiagnosticSeverity.Error)
Errors\MessageProvider.vb (2)
63Return DiagnosticSeverity.Error 113If(severity = DiagnosticSeverity.Error OrElse isWarningAsError, "error", "warning"), id)
GlobalImport.vb (1)
80Dim firstError = errors.AsEnumerable().FirstOrDefault(Function(diag) diag.Severity = DiagnosticSeverity.Error)
OptionsValidator.vb (1)
55If Not errors.Any(Function(diag) diag.Severity = DiagnosticSeverity.Error) Then
Symbols\ConstraintsHelper.vb (1)
747Debug.Assert(info.Severity = DiagnosticSeverity.Error)
Symbols\EventSymbol.vb (1)
232Debug.Assert(errorInfo.Severity = DiagnosticSeverity.Error)
Symbols\ExtendedErrorTypeSymbol.vb (2)
50Debug.Assert(errorInfo Is Nothing OrElse errorInfo.Severity = DiagnosticSeverity.Error) 78Debug.Assert(errorInfo Is Nothing OrElse errorInfo.Severity = DiagnosticSeverity.Error)
Symbols\FieldSymbol.vb (1)
307Debug.Assert(errorInfo.Severity = DiagnosticSeverity.Error)
Symbols\InstanceTypeSymbol.vb (1)
173Debug.Assert(errorInfo.Severity = DiagnosticSeverity.Error)
Symbols\MethodSymbol.vb (1)
720Debug.Assert(errorInfo Is Nothing OrElse errorInfo.Severity = DiagnosticSeverity.Error)
Symbols\PropertySymbol.vb (1)
458Debug.Assert(errorInfo Is Nothing OrElse errorInfo.Severity = DiagnosticSeverity.Error)
Symbols\Source\SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb (1)
87If diag.Severity = DiagnosticSeverity.Error Then
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (40)
CommandLineTests.vb (40)
9962Dim analyzer = New CompilationAnalyzerWithSeverity(DiagnosticSeverity.Error, configurable:=True) 10229Dim expectedExitCode = If(Not analyzerShouldBeSkipped AndAlso defaultSeverity = DiagnosticSeverity.[Error], 1, 0) 10244<InlineData(False, False, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, Nothing, DiagnosticSeverity.Error)> 10246<InlineData(False, True, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, Nothing, DiagnosticSeverity.Error)> 10248<InlineData(False, False, DiagnosticSeverity.Info, Nothing, DiagnosticSeverity.Warning, DiagnosticSeverity.Error)> 10250<InlineData(False, True, DiagnosticSeverity.Info, Nothing, DiagnosticSeverity.Warning, DiagnosticSeverity.Error)> 10252<InlineData(False, False, DiagnosticSeverity.Warning, Nothing, Nothing, DiagnosticSeverity.Error)> 10254<InlineData(False, True, DiagnosticSeverity.Warning, Nothing, Nothing, DiagnosticSeverity.Error)> 10256<InlineData(False, False, DiagnosticSeverity.Warning, DiagnosticSeverity.Error, Nothing, DiagnosticSeverity.Error)> 10257<InlineData(True, False, DiagnosticSeverity.Warning, DiagnosticSeverity.Error, Nothing, DiagnosticSeverity.Warning)> 10258<InlineData(False, True, DiagnosticSeverity.Warning, DiagnosticSeverity.Error, Nothing, DiagnosticSeverity.Error)> 10259<InlineData(True, True, DiagnosticSeverity.Warning, DiagnosticSeverity.Error, Nothing, DiagnosticSeverity.Warning)> 10260<InlineData(False, False, DiagnosticSeverity.Info, DiagnosticSeverity.Error, Nothing, DiagnosticSeverity.Error)> 10261<InlineData(True, False, DiagnosticSeverity.Info, DiagnosticSeverity.Error, Nothing, DiagnosticSeverity.Error)> 10262<InlineData(False, True, DiagnosticSeverity.Info, DiagnosticSeverity.Error, Nothing, DiagnosticSeverity.Error)> 10263<InlineData(True, True, DiagnosticSeverity.Info, DiagnosticSeverity.Error, Nothing, DiagnosticSeverity.Error)> 10264<InlineData(False, False, DiagnosticSeverity.Info, Nothing, DiagnosticSeverity.Error, DiagnosticSeverity.Error)> 10265<InlineData(True, False, DiagnosticSeverity.Info, Nothing, DiagnosticSeverity.Error, DiagnosticSeverity.Error)> 10266<InlineData(False, True, DiagnosticSeverity.Info, Nothing, DiagnosticSeverity.Error, DiagnosticSeverity.Error)> 10267<InlineData(True, True, DiagnosticSeverity.Info, Nothing, DiagnosticSeverity.Error, DiagnosticSeverity.Error)> 10268<InlineData(False, False, DiagnosticSeverity.Warning, Nothing, DiagnosticSeverity.Error, DiagnosticSeverity.Error)> 10269<InlineData(True, False, DiagnosticSeverity.Warning, Nothing, DiagnosticSeverity.Error, DiagnosticSeverity.Error)> 10270<InlineData(False, True, DiagnosticSeverity.Warning, Nothing, DiagnosticSeverity.Error, DiagnosticSeverity.Error)> 10271<InlineData(True, True, DiagnosticSeverity.Warning, Nothing, DiagnosticSeverity.Error, DiagnosticSeverity.Error)> 10314Case DiagnosticSeverity.[Error] 11074Friend Shared ReadOnly Error01 As DiagnosticDescriptor = New DiagnosticDescriptor("Error01", "", "Throwing a diagnostic for #Disable", "", DiagnosticSeverity.Error, isEnabledByDefault:=True)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
CompilationContext.vb (1)
248If local.GetUseSiteInfo().DiagnosticInfo?.Severity = DiagnosticSeverity.Error Then
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (2)
Diagnostics\Suppression\SuppressionTests.vb (1)
882Private ReadOnly _descriptor As New DiagnosticDescriptor("ErrorDiagnostic", "ErrorDiagnostic", "ErrorDiagnostic", "ErrorDiagnostic", DiagnosticSeverity.[Error], isEnabledByDefault:=True)
SimplifyThisOrMe\SimplifyThisOrMeTests.vb (1)
66diagnosticSeverity:=DiagnosticSeverity.Error)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (10)
Diagnostics\DiagnosticAnalyzerTests.vb (8)
52Dim errorDiagDescriptor = New DiagnosticDescriptor("XX0004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Error, isEnabledByDefault:=True) 72Assert.True(effectiveDiag.Severity = DiagnosticSeverity.Error) 115Case DiagnosticSeverity.Error 133Dim errorDiagDescriptor = New DiagnosticDescriptor("XX0004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.[Error], isEnabledByDefault:=True) 157Assert.Equal(1, effectiveDiags.Count(Function(d) d.Severity = DiagnosticSeverity.Error)) 164Assert.Equal(1, effectiveDiags.Count(Function(d) d.Severity = DiagnosticSeverity.Error)) 171Assert.Equal(1, effectiveDiags.Count(Function(d) d.Severity = DiagnosticSeverity.Error)) 178Assert.Equal(1, effectiveDiags.Count(Function(d) d.Severity = DiagnosticSeverity.Error))
Diagnostics\GetDiagnosticsTests.vb (2)
107Dim [error] = diag.WithSeverity(DiagnosticSeverity.Error) 108Assert.Equal(DiagnosticSeverity.Error, [error].Severity)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
SymbolsTests\SymbolErrorTests.vb (1)
7910Assert.Equal(DiagnosticSeverity.Error, DirectCast(test.ReturnType, ErrorTypeSymbol).ErrorInfo.Severity)
UsedAssembliesTests.vb (1)
133Assert.True(diagnostics.Any(Function(d) d.DefaultSeverity = DiagnosticSeverity.Error))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
TestSyntaxNodes.vb (2)
1068Return DiagnosticSeverity.Error 1767Assert.Equal(DiagnosticSeverity.Error, tree.GetDiagnostics(node)(0).Severity)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
CompilationTestUtils.vb (2)
96If Not compileDiagnostics.Any(Function(d) d.DefaultSeverity = DiagnosticSeverity.Error) Then 763Dim diags As ImmutableArray(Of Diagnostic) = errors.WhereAsArray(Function(e) e.Severity = DiagnosticSeverity.Error)
Microsoft.CodeAnalysis.Workspaces (10)
Diagnostics\DiagnosticData.cs (1)
318return DiagnosticSeverity.Error;
src\Compilers\Core\Portable\Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
195DiagnosticSeverity.Error => NotificationOption2.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (1)
61DiagnosticSeverity.Error => Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
16DiagnosticSeverity.Error => NotificationOption2.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (2)
28DiagnosticSeverity.Error => ReportDiagnostic.Error, 39DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (1)
30return DiagnosticSeverity.Error;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
185diag => diag.Severity == DiagnosticSeverity.Error && !ignoreErrorCode.Contains(diag.Id));
Workspace\WorkspaceDiagnosticDescriptors.cs (1)
22defaultSeverity: DiagnosticSeverity.Error,
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
375.Where(d => d.Severity is DiagnosticSeverity.Error or DiagnosticSeverity.Warning) 2308var errs = comp.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error);
Microsoft.DotNet.CodeAnalysis (6)
Analyzers\AppContextDefaultsAnalyzer.cs (3)
27new DiagnosticDescriptor(DiagnosticIds.BCL0010.ToString(), s_title, CreateDiagnosticMessage(s_defaultValueNotInitializedToTrue, DiagnosticIds.BCL0010.ToString()), s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description); 30new DiagnosticDescriptor(DiagnosticIds.BCL0011.ToString(), s_title, CreateDiagnosticMessage(s_defaultValueInsideUnexpectedIfCondition, DiagnosticIds.BCL0011.ToString()), s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description); 33new DiagnosticDescriptor(DiagnosticIds.BCL0012.ToString(), s_title, CreateDiagnosticMessage(s_defaultValueDefinedOutsideIfCondition, DiagnosticIds.BCL0012.ToString()), s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description);
Analyzers\MembersMustExistAnalyzer.cs (1)
26new DiagnosticDescriptor(DiagnosticIds.BCL0001.ToString(), s_title, s_messageFormat, s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description, customTags: WellKnownDiagnosticTags.CompilationEnd);
Analyzers\PinvokeAnalyzer.cs (1)
24private static DiagnosticDescriptor InvalidPinvokeCall = new DiagnosticDescriptor(DiagnosticIds.BCL0015.ToString(), Title, MessageFormat, AnalyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
Analyzers\ResourceUsageAnalyzer.cs (1)
19private static DiagnosticDescriptor InvalidSRFormatCall = new DiagnosticDescriptor(DiagnosticIds.BCL0020.ToString(), Title, "", AnalyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
Microsoft.Extensions.Logging.Generators (17)
DiagnosticDescriptors.cs (17)
17DiagnosticSeverity.Error, 33DiagnosticSeverity.Error, 41DiagnosticSeverity.Error, 57DiagnosticSeverity.Error, 65DiagnosticSeverity.Error, 81DiagnosticSeverity.Error, 89DiagnosticSeverity.Error, 113DiagnosticSeverity.Error, 129DiagnosticSeverity.Error, 137DiagnosticSeverity.Error, 153DiagnosticSeverity.Error, 161DiagnosticSeverity.Error, 169DiagnosticSeverity.Error, 177DiagnosticSeverity.Error, 185DiagnosticSeverity.Error, 193DiagnosticSeverity.Error, 209defaultSeverity: DiagnosticSeverity.Error,
Microsoft.Extensions.Options.SourceGeneration (2)
DiagDescriptors.cs (1)
114defaultSeverity: DiagnosticSeverity.Error);
DiagDescriptorsBase.cs (1)
18DiagnosticSeverity defaultSeverity = DiagnosticSeverity.Error,
Microsoft.Gen.ContextualOptions (2)
Model\OptionsContextType.cs (1)
21public bool ShouldEmit => Diagnostics.TrueForAll(diag => diag.Severity != DiagnosticSeverity.Error);
src\Generators\Shared\DiagDescriptorsBase.cs (1)
22DiagnosticSeverity defaultSeverity = DiagnosticSeverity.Error,
Microsoft.Gen.Logging (2)
Parsing\Parser.cs (1)
749if (d.Severity == DiagnosticSeverity.Error)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
22DiagnosticSeverity defaultSeverity = DiagnosticSeverity.Error,
Microsoft.Gen.Metrics (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
22DiagnosticSeverity defaultSeverity = DiagnosticSeverity.Error,
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
22DiagnosticSeverity defaultSeverity = DiagnosticSeverity.Error,
Microsoft.Interop.ComInterfaceGenerator (36)
ComInterfaceGenerator.cs (2)
511.Where(context => context.Diagnostics.All(diag => diag.Descriptor.DefaultSeverity != DiagnosticSeverity.Error)) 613.Where(context => context.UnmanagedToManagedStub.Diagnostics.All(diag => diag.Descriptor.DefaultSeverity != DiagnosticSeverity.Error))
GeneratorDiagnostics.cs (34)
42DiagnosticSeverity.Error, 53DiagnosticSeverity.Error, 64DiagnosticSeverity.Error, 75DiagnosticSeverity.Error, 86DiagnosticSeverity.Error, 97DiagnosticSeverity.Error, 108DiagnosticSeverity.Error, 119DiagnosticSeverity.Error, 130DiagnosticSeverity.Error, 141DiagnosticSeverity.Error, 151DiagnosticSeverity.Error, 162DiagnosticSeverity.Error, 173DiagnosticSeverity.Error, 184DiagnosticSeverity.Error, 195DiagnosticSeverity.Error, 206DiagnosticSeverity.Error, 217DiagnosticSeverity.Error, 228DiagnosticSeverity.Error, 239DiagnosticSeverity.Error, 250DiagnosticSeverity.Error, 261DiagnosticSeverity.Error, 272DiagnosticSeverity.Error, 283DiagnosticSeverity.Error, 294DiagnosticSeverity.Error, 305DiagnosticSeverity.Error, 316DiagnosticSeverity.Error, 327DiagnosticSeverity.Error, 338DiagnosticSeverity.Error, 349DiagnosticSeverity.Error, 360DiagnosticSeverity.Error, 371DiagnosticSeverity.Error, 382DiagnosticSeverity.Error, 393DiagnosticSeverity.Error, 404DiagnosticSeverity.Error,
Microsoft.Interop.JavaScript.JSImportGenerator (15)
GeneratorDiagnostics.cs (15)
39DiagnosticSeverity.Error, 49DiagnosticSeverity.Error, 59DiagnosticSeverity.Error, 69DiagnosticSeverity.Error, 79DiagnosticSeverity.Error, 89DiagnosticSeverity.Error, 99DiagnosticSeverity.Error, 109DiagnosticSeverity.Error, 119DiagnosticSeverity.Error, 129DiagnosticSeverity.Error, 139DiagnosticSeverity.Error, 149DiagnosticSeverity.Error, 159DiagnosticSeverity.Error, 169DiagnosticSeverity.Error, 179DiagnosticSeverity.Error,
Microsoft.Interop.LibraryImportGenerator (47)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (28)
49DiagnosticSeverity.Error, 60DiagnosticSeverity.Error, 71DiagnosticSeverity.Error, 82DiagnosticSeverity.Error, 93DiagnosticSeverity.Error, 104DiagnosticSeverity.Error, 115DiagnosticSeverity.Error, 126DiagnosticSeverity.Error, 137DiagnosticSeverity.Error, 148DiagnosticSeverity.Error, 159DiagnosticSeverity.Error, 170DiagnosticSeverity.Error, 181DiagnosticSeverity.Error, 192DiagnosticSeverity.Error, 203DiagnosticSeverity.Error, 214DiagnosticSeverity.Error, 225DiagnosticSeverity.Error, 236DiagnosticSeverity.Error, 247DiagnosticSeverity.Error, 258DiagnosticSeverity.Error, 269DiagnosticSeverity.Error, 280DiagnosticSeverity.Error, 291DiagnosticSeverity.Error, 302DiagnosticSeverity.Error, 313DiagnosticSeverity.Error, 379DiagnosticSeverity.Error, 390DiagnosticSeverity.Error, 401DiagnosticSeverity.Error,
Analyzers\NativeMarshallingAttributeAnalyzer.cs (3)
30DiagnosticSeverity.Error, 40DiagnosticSeverity.Error, 50DiagnosticSeverity.Error,
GeneratorDiagnostics.cs (16)
38DiagnosticSeverity.Error, 49DiagnosticSeverity.Error, 60DiagnosticSeverity.Error, 71DiagnosticSeverity.Error, 82DiagnosticSeverity.Error, 93DiagnosticSeverity.Error, 104DiagnosticSeverity.Error, 115DiagnosticSeverity.Error, 126DiagnosticSeverity.Error, 137DiagnosticSeverity.Error, 148DiagnosticSeverity.Error, 159DiagnosticSeverity.Error, 170DiagnosticSeverity.Error, 181DiagnosticSeverity.Error, 192DiagnosticSeverity.Error, 203DiagnosticSeverity.Error,
Microsoft.Interop.LibraryImportGenerator.Downlevel (16)
GeneratorDiagnostics.cs (16)
38DiagnosticSeverity.Error, 49DiagnosticSeverity.Error, 60DiagnosticSeverity.Error, 71DiagnosticSeverity.Error, 82DiagnosticSeverity.Error, 93DiagnosticSeverity.Error, 104DiagnosticSeverity.Error, 115DiagnosticSeverity.Error, 126DiagnosticSeverity.Error, 137DiagnosticSeverity.Error, 148DiagnosticSeverity.Error, 159DiagnosticSeverity.Error, 170DiagnosticSeverity.Error, 181DiagnosticSeverity.Error, 192DiagnosticSeverity.Error, 203DiagnosticSeverity.Error,
Microsoft.Maui.Controls.BindingSourceGen (9)
DiagnosticsFactory.cs (9)
26 defaultSeverity: DiagnosticSeverity.Error, 37 defaultSeverity: DiagnosticSeverity.Error, 48 defaultSeverity: DiagnosticSeverity.Error, 70 defaultSeverity: DiagnosticSeverity.Error, 81 defaultSeverity: DiagnosticSeverity.Error, 92 defaultSeverity: DiagnosticSeverity.Error, 103 defaultSeverity: DiagnosticSeverity.Error, 114 defaultSeverity: DiagnosticSeverity.Error, 125 defaultSeverity: DiagnosticSeverity.Error,
Microsoft.Maui.Controls.SourceGen (1)
Descriptors.cs (1)
13 defaultSeverity: DiagnosticSeverity.Error,
Microsoft.ML.CodeAnalyzer.Tests (10)
Code\BestFriendTest.cs (1)
47new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation(23, 21).WithMessage("'D.D(float)' is inaccessible due to its protection level"),
Code\ContractsCheckTest.cs (9)
29new DiagnosticResult("CS0051", DiagnosticSeverity.Error).WithLocation(15, 16).WithMessage("Inconsistent accessibility: parameter type 'IHostEnvironment' is less accessible than method 'TypeName.TypeName(IHostEnvironment, float, int)'"), 42new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 24, 752, 35).WithMessage("'ICancelable' is inaccessible due to its protection level"), 43new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 67, 752, 77).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"), 129new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 24, 752, 35).WithMessage("'ICancelable' is inaccessible due to its protection level"), 130new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 67, 752, 77).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"), 131new DiagnosticResult("CS1503", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 753, 90, 753, 93).WithMessage("Argument 2: cannot convert from 'Microsoft.ML.Runtime.IHostEnvironment' to 'Microsoft.ML.Runtime.IExceptionContext'"), 149new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 24, 752, 35).WithMessage("'ICancelable' is inaccessible due to its protection level"), 150new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 67, 752, 77).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"), 151new DiagnosticResult("CS1503", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 753, 90, 753, 93).WithMessage("Argument 2: cannot convert from 'Microsoft.ML.Runtime.IHostEnvironment' to 'Microsoft.ML.Runtime.IExceptionContext'"),
Microsoft.VisualStudio.LanguageServices (6)
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (1)
301if (tree.GetDiagnostics(cancellationToken).Any(d => d.Severity == DiagnosticSeverity.Error))
PreviewPane\PreviewPaneService.cs (1)
46case DiagnosticSeverity.Error:
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
243CodeAnalysis.DiagnosticSeverity.Error => RpcContracts.DiagnosticManagement.DiagnosticSeverity.Error,
TaskList\ProjectExternalErrorReporter.cs (3)
217VSTASKPRIORITY.TP_HIGH => DiagnosticSeverity.Error, 308warningLevel: (severity == DiagnosticSeverity.Error) ? 0 : 1, 350=> error.fError != 0 ? DiagnosticSeverity.Error : DiagnosticSeverity.Warning;
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
SolutionExplorer\AnalyzerCommandHandlerTests.vb (1)
21defaultSeverity:=DiagnosticSeverity.Error,
SolutionExplorer\DiagnosticItemTests.vb (1)
46defaultSeverity:=DiagnosticSeverity.Error,
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
ProjectSystemShim\TempPECompiler.TempPEProject.vb (1)
52Return emitResult.Diagnostics.Where(Function(d) d.Severity = DiagnosticSeverity.Error).Count()
Mvc.Analyzers.Test (2)
TagHelpersInCodeBlocksAnalyzerTest.cs (2)
17private static readonly DiagnosticResult CS4033Result = new("CS4033", DiagnosticSeverity.Error); 18private static readonly DiagnosticResult CS4034Result = new("CS4034", DiagnosticSeverity.Error);
Roslyn.Test.PdbUtilities (2)
EditAndContinue\EditAndContinueTest.cs (1)
102diff.EmitResult.Diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error).Verify(expectedErrors);
Reader\PdbValidation.cs (1)
536result.Diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
Roslyn.VisualStudio.Next.UnitTests (3)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (3)
101Assert.Equal(isHostAnalyzer ? DiagnosticSeverity.Error : DiagnosticSeverity.Info, diagnostics[0].Severity); 266ImmutableArray.Create(new DiagnosticDescriptor("test", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true)); 286ImmutableArray.Create(new DiagnosticDescriptor("test", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true));
SemanticSearch.BuildTask.UnitTests (3)
GenerateFilteredReferenceAssembliesTaskTests.cs (3)
130c.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify( 178c.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify( 227c.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify(
System.Private.CoreLib.Generators (4)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (4)
34private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 38private static readonly DiagnosticDescriptor RuleHelper = new DiagnosticDescriptor(DiagnosticIdHelper, Title, MessageHelperFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 42private static readonly DiagnosticDescriptor RuleCantParse = new DiagnosticDescriptor(DiagnosticIdConditionParsing, Title, MessageNonParseableConditionFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 46private static readonly DiagnosticDescriptor RuleAttributeNotSpecificEnough = new DiagnosticDescriptor(DiagnosticIdAttributeNotSpecificEnough, Title, MessageAttributeNotSpecificEnoughFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
System.Text.Json.SourceGeneration (4)
JsonSourceGenerator.DiagnosticDescriptors.cs (4)
44defaultSeverity: DiagnosticSeverity.Error, 60defaultSeverity: DiagnosticSeverity.Error, 68defaultSeverity: DiagnosticSeverity.Error, 100defaultSeverity: DiagnosticSeverity.Error,
System.Text.RegularExpressions.Generator (4)
DiagnosticDescriptors.cs (4)
18DiagnosticSeverity.Error, 27DiagnosticSeverity.Error, 36DiagnosticSeverity.Error, 45DiagnosticSeverity.Error,
System.Windows.Forms.Analyzers.CSharp (4)
System\Windows\Forms\CSharp\Analyzers\Diagnostics\CSharpDiagnosticDescriptors.cs (4)
17defaultSeverity: DiagnosticSeverity.Error, 25defaultSeverity: DiagnosticSeverity.Error, 33defaultSeverity: DiagnosticSeverity.Error, 41defaultSeverity: DiagnosticSeverity.Error,
System.Windows.Forms.Analyzers.CSharp.Tests (1)
Analyzers\Verifiers\CSharpVerifierHelper.cs (1)
15/// diagnostics at <see cref="DiagnosticSeverity.Error"/>. This map contains all compiler diagnostic IDs
System.Windows.Forms.Analyzers.VisualBasic (1)
Diagnostic\VisualBasicDiagnosticDescriptors.vb (1)
15defaultSeverity:=DiagnosticSeverity.Error,
System.Windows.Forms.PrivateSourceGenerators (2)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (2)
191context.ReportDiagnostic(Diagnostic.Create("EV1", nameof(EnumValidationGenerator), $"Can't validate an enum that has no elements", DiagnosticSeverity.Error, DiagnosticSeverity.Error, true, 4));
System.Windows.Forms.PrivateSourceGenerators.Tests (1)
EnumValidationTests.cs (1)
309Assert.False(diagnostics.Any(d => d.Severity == DiagnosticSeverity.Error), $"Failed: {diagnostics.FirstOrDefault()?.GetMessage()}");
VBCSCompiler.UnitTests (1)
AnalyzerConsistencyCheckerTests.cs (1)
73Assert.Empty(emitResult.Diagnostics.Where(x => x.Severity == DiagnosticSeverity.Error));