478 references to Error
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.Diagnostics.cs (1)
19DiagnosticSeverity.Error,
Aspire.Hosting.Integration.Analyzers (4)
AspireExportAnalyzer.Diagnostics.cs (4)
19DiagnosticSeverity.Error, 29DiagnosticSeverity.Error, 39DiagnosticSeverity.Error, 49DiagnosticSeverity.Error,
CodeStyleConfigFileGenerator (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
18DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
ConfigurationSchemaGenerator (1)
DiagnosticDescriptors.cs (1)
41defaultSeverity: DiagnosticSeverity.Error,
dotnet-format (5)
Analyzers\Extensions.cs (2)
69ReportDiagnostic.Error => DiagnosticSeverity.Error, 92if (severity == DiagnosticSeverity.Error)
Commands\FormatCommandCommon.cs (2)
301"" => DiagnosticSeverity.Error, 302FixSeverity.Error => DiagnosticSeverity.Error,
Logging\ILoggerExtensions.cs (1)
12private static readonly string s_errorSeverityString = DiagnosticSeverity.Error.ToString().ToLower();
GenerateDocumentationAndConfigFiles (11)
Program.cs (3)
751case DiagnosticSeverity.Error: 1466severity = DiagnosticSeverity.Error; 1591DiagnosticSeverity.Error => "error",
src\roslyn\src\Compilers\Core\Portable\Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
187DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (1)
60DiagnosticSeverity.Error => Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
15DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
18DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
27DiagnosticSeverity.Error => ReportDiagnostic.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
28return DiagnosticSeverity.Error;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
194diag => diag.Severity == DiagnosticSeverity.Error && !ignoreErrorCode.Contains(diag.Id));
Infrastructure.Tests (1)
ExtractTestPartitions\MockAssemblyBuilder.cs (1)
276.Where(d => d.Severity == DiagnosticSeverity.Error)
Microsoft.AspNetCore.App.Analyzers (7)
DiagnosticDescriptors.cs (6)
61DiagnosticSeverity.Error, 69DiagnosticSeverity.Error, 77DiagnosticSeverity.Error, 157DiagnosticSeverity.Error, 165DiagnosticSeverity.Error, 189DiagnosticSeverity.Error,
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (1)
193if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
Microsoft.AspNetCore.Components.Analyzers (2)
DiagnosticDescriptors.cs (2)
21DiagnosticSeverity.Error, 48DiagnosticSeverity.Error,
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
DiagnosticDescriptors.cs (2)
25DiagnosticSeverity.Error, 52DiagnosticSeverity.Error,
Microsoft.AspNetCore.Mvc.Analyzers (1)
DiagnosticDescriptors.cs (1)
69DiagnosticSeverity.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)
574if (diag.Severity == DiagnosticSeverity.Error)
CommandLine\SarifErrorLogger.cs (1)
64case DiagnosticSeverity.Error:
Compilation\Compilation.cs (1)
274if (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)
334/// Gets the warning level. This is 0 for diagnostics with severity <see cref="DiagnosticSeverity.Error"/>, 379/// and <see cref="Severity"/> = <see cref="DiagnosticSeverity.Error"/>. 386this.Severity == DiagnosticSeverity.Error; 536return this.WithSeverity(DiagnosticSeverity.Error); 567case DiagnosticSeverity.Error: 591=> DefaultSeverity == DiagnosticSeverity.Error && IsNotConfigurable(); 597=> Severity == DiagnosticSeverity.Error && !IsSuppressed;
Diagnostic\Diagnostic_SimpleDiagnostic.cs (2)
41if ((warningLevel == 0 && severity != DiagnosticSeverity.Error) || 42(warningLevel != 0 && severity == DiagnosticSeverity.Error))
Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
Diagnostic\DiagnosticBag.cs (2)
75if (diagnostic.DefaultSeverity == DiagnosticSeverity.Error) 103if ((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)
159_effectiveSeverity = DiagnosticSeverity.Error; 198/// If IsWarningsAsError is true, then this returns <see cref="DiagnosticSeverity.Error"/>, while <see cref="DefaultSeverity"/> returns <see cref="DiagnosticSeverity.Warning"/>. 221/// Gets the warning level. This is 0 for diagnostics with severity <see cref="DiagnosticSeverity.Error"/>, 241/// True implies <see cref="Severity"/> = <see cref="DiagnosticSeverity.Error"/> and 249this.Severity == DiagnosticSeverity.Error; 275return defaultSeverity == DiagnosticSeverity.Error ? 283return _defaultSeverity == DiagnosticSeverity.Error;
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1061d.DefaultSeverity != DiagnosticSeverity.Error &&
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (1)
1905/// 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)
1680info => info.Severity == DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.Analyzers (13)
ImplementationIsObsoleteAnalyzer.cs (1)
27DiagnosticSeverity.Error,
InternalImplementationOnlyAnalyzer.cs (1)
30DiagnosticSeverity.Error,
MetaAnalyzers\DoNotUseFileTypesForAnalyzersOrGenerators.cs (1)
22DiagnosticSeverity.Error,
MetaAnalyzers\SymbolIsBannedInAnalyzersAnalyzer.cs (1)
25defaultSeverity: DiagnosticSeverity.Error,
src\roslyn\src\Compilers\Core\Portable\Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RuleLevel.cs (1)
19/// <see cref="DiagnosticSeverity.Error"/>.
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
187DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (1)
60DiagnosticSeverity.Error => Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
15DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
18DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
27DiagnosticSeverity.Error => ReportDiagnostic.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
28return DiagnosticSeverity.Error;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
194diag => diag.Severity == DiagnosticSeverity.Error && !ignoreErrorCode.Contains(diag.Id));
Microsoft.CodeAnalysis.AnalyzerUtilities (8)
src\roslyn\src\Compilers\Core\Portable\Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\Extensions\ControlFlowGraphExtensions.cs (1)
28if (cfg.OriginalOperation.Syntax.GetDiagnostics().Any(d => d.DefaultSeverity == DiagnosticSeverity.Error) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
187DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (1)
60DiagnosticSeverity.Error => Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
15DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
18DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
27DiagnosticSeverity.Error => ReportDiagnostic.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
28return DiagnosticSeverity.Error;
Microsoft.CodeAnalysis.CodeStyle (13)
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
115?.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)
src\roslyn\src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
56if (node.ContainsDiagnostics && node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
130if (root.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
774if (tree.GetDiagnostics(cancellationToken).Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
81if (syntax.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
128if (context.Operation.Syntax.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Compilers\Core\Portable\Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
187DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (1)
60DiagnosticSeverity.Error => Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
15DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
18DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
27DiagnosticSeverity.Error => ReportDiagnostic.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
28return DiagnosticSeverity.Error;
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
194diag => diag.Severity == DiagnosticSeverity.Error && !ignoreErrorCode.Contains(diag.Id));
Microsoft.CodeAnalysis.CSharp (41)
Binder\Binder_Crefs.cs (1)
1216if (diag.Severity == DiagnosticSeverity.Error)
Binder\Binder_Expressions.cs (1)
9561wasError = (result.Error.Severity == DiagnosticSeverity.Error);
Binder\Binder_InterpolatedString.cs (1)
73!interpolation.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error) &&
Binder\Binder_Lookup.cs (1)
749if (info.Severity == DiagnosticSeverity.Error)
Binder\Binder_Patterns.cs (3)
189if (hasValueProperty?.GetUseSiteInfo().DiagnosticInfo?.DefaultSeverity == DiagnosticSeverity.Error) 324declaredMethod.GetUseSiteInfo().DiagnosticInfo?.DefaultSeverity != DiagnosticSeverity.Error && 416return HasTryGetValueSignature(method) && method.GetUseSiteInfo().DiagnosticInfo?.DefaultSeverity != DiagnosticSeverity.Error &&
Binder\Binder_Symbols.cs (3)
1775if (severity == DiagnosticSeverity.Error) 1869if (useSiteInfo.DiagnosticInfo?.Severity == DiagnosticSeverity.Error) 1936if (severity == DiagnosticSeverity.Error)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
607Debug.Assert(diagInfo.Severity == DiagnosticSeverity.Error); 635Debug.Assert(bad.Member.GetUseSiteInfo().DiagnosticInfo.Severity == DiagnosticSeverity.Error,
Compilation\CSharpCompilation.cs (1)
4899return (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)
1251if (diagnosticInfo != null && diagnosticInfo.Severity == DiagnosticSeverity.Error)
Emitter\NoPia\EmbeddedTypesManager.cs (1)
107if (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)
549if (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)
389if (useSiteInfo.DiagnosticInfo?.DefaultSeverity == DiagnosticSeverity.Error)
Parser\LanguageParser.cs (1)
14712if (diagnostic.Severity == DiagnosticSeverity.Error)
Symbols\ConstraintsHelper.cs (1)
1328if (info.Severity == DiagnosticSeverity.Error)
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
785if (info.DiagnosticInfo?.Severity != DiagnosticSeverity.Error)
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1531_containingType.GetUseSiteInfo().DiagnosticInfo?.DefaultSeverity == DiagnosticSeverity.Error))
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
696if (useSiteInfo.DiagnosticInfo?.Severity == DiagnosticSeverity.Error)
Symbols\ReducedExtensionMethodSymbol.cs (1)
63if (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) 1869if (diagnostic.Severity == DiagnosticSeverity.Error && diagnostic.Code is not ((int)ErrorCode.ERR_ImplicitImplementationOfNonPublicInterfaceMember or (int)ErrorCode.ERR_ImplicitImplementationOfInaccessibleInterfaceMember))
Symbols\Symbol.cs (5)
1069return info.DiagnosticInfo?.Severity == DiagnosticSeverity.Error; 1138if (info.Severity == DiagnosticSeverity.Error && IsHighestPriorityUseSiteErrorCode(info.Code)) 1145if (result == null || result.Severity == DiagnosticSeverity.Warning && info.Severity == DiagnosticSeverity.Error) 1165if (diagnosticInfo?.Severity == DiagnosticSeverity.Error) 1203return info.Severity == DiagnosticSeverity.Error;
Symbols\Tuples\TupleTypeSymbol.cs (1)
498if (useSiteInfo.DiagnosticInfo?.Severity != DiagnosticSeverity.Error)
Symbols\TypeSymbol.cs (1)
2065useSiteDiagnostic.DefaultSeverity == DiagnosticSeverity.Error)
Microsoft.CodeAnalysis.CSharp.CodeStyle (12)
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
47if (switchStatement.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
77if (arrowExpressionClause.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
43if (conditionalExpression.GetRequiredParent().GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
61if (current.ContainsDiagnostics && current.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\UnnecessaryNullableWarningSuppressionsUtilities.cs (1)
22=> diagnostics.Any(d => d.Severity is DiagnosticSeverity.Error or DiagnosticSeverity.Warning);
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryUnsafeModifier\UnnecessaryUnsafeModifierUtilities.cs (1)
23=> diagnostics.Any(d => d.Severity is DiagnosticSeverity.Error);
src\roslyn\src\Analyzers\CSharp\Analyzers\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorDiagnosticAnalyzer.cs (1)
41accessorList.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
94if (topMostExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
104if (localDeclaration.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
50if (expression.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
182if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
118if (parsed.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
Microsoft.CodeAnalysis.CSharp.Features (17)
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (1)
378if (namespaceDecl.Name.GetDiagnostics().Any(diag => diag.DefaultSeverity == DiagnosticSeverity.Error))
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
197if (type.GetDiagnostics().Any(d => d.Severity == 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))
Diagnostics\Analyzers\FileBasedPrograms\FileLevelDirectiveDiagnosticAnalyzer.cs (1)
29defaultSeverity: DiagnosticSeverity.Error,
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
47if (switchStatement.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
77if (arrowExpressionClause.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
43if (conditionalExpression.GetRequiredParent().GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
61if (current.ContainsDiagnostics && current.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\UnnecessaryNullableWarningSuppressionsUtilities.cs (1)
22=> diagnostics.Any(d => d.Severity is DiagnosticSeverity.Error or DiagnosticSeverity.Warning);
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryUnsafeModifier\UnnecessaryUnsafeModifierUtilities.cs (1)
23=> diagnostics.Any(d => d.Severity is DiagnosticSeverity.Error);
src\roslyn\src\Analyzers\CSharp\Analyzers\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorDiagnosticAnalyzer.cs (1)
41accessorList.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
94if (topMostExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
104if (localDeclaration.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
50if (expression.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
StringIndentation\CSharpStringIndentationService.cs (2)
83if (token.ContainsDiagnostics && token.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)) 100var errors = interpolatedString.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
182if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
118if (parsed.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
Microsoft.CodeAnalysis.Extensions.Package (2)
Diagnostics\DiagnosticSeverityExtensions.cs (1)
27DiagnosticSeverity.Error => ReportDiagnostic.Error,
Diagnostics\ReportDiagnosticExtensions.cs (1)
28return DiagnosticSeverity.Error;
Microsoft.CodeAnalysis.Features (32)
CodeFixes\Service\CodeFixService.cs (1)
132var preferredMap = diagnostic.Severity == DiagnosticSeverity.Error
CodeFixes\Suppression\SuppressionHelpers.cs (1)
53case 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)
83if (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)
65if (stringToken.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)) 119if (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)
53DiagnosticSeverity.Error,
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
558var syntaxError = syntaxDiagnostics.FirstOrDefault(d => d.Severity == DiagnosticSeverity.Error);
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (5)
75void AddRudeEdit(RudeEditKind kind, string resourceName, DiagnosticSeverity severity = DiagnosticSeverity.Error, bool noEffect = false) 78void AddGeneralDiagnostic(EditAndContinueErrorCode code, string resourceName, DiagnosticSeverity severity = DiagnosticSeverity.Error, bool noEffect = false) 86var severity = noEffect ? DiagnosticSeverity.Warning : DiagnosticSeverity.Error; 242DiagnosticSeverity.Error, 294=> kind.GetSeverity() == DiagnosticSeverity.Error;
EditAndContinue\EditSession.cs (2)
743hasBlockingRudeEdit |= diagnostic.Severity == DiagnosticSeverity.Error; 1420if (emitDiagnostic.Severity is DiagnosticSeverity.Error or DiagnosticSeverity.Warning)
EditAndContinue\EditSessionTelemetry.cs (1)
97if (diagnostic.Severity == DiagnosticSeverity.Error)
EditAndContinue\EmitSolutionUpdateResults.cs (3)
52DiagnosticSeverity.Error => EditAndContinueDiagnosticDescriptors.IsEncDiagnostic(diagnostic.Id) ? ManagedHotReloadDiagnosticSeverity.RestartRequired : ManagedHotReloadDiagnosticSeverity.Error, 212.Where(r => r.Diagnostics.Any(static d => d.Severity == DiagnosticSeverity.Error)) 395blocking |= diagnostic.IsEncDiagnostic() && diagnostic.Severity == DiagnosticSeverity.Error;
EditAndContinue\SolutionUpdate.cs (1)
70DiagnosticSeverity.Error => LogMessageSeverity.Error,
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (1)
192=> node.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error);
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
115?.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)
src\roslyn\src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
56if (node.ContainsDiagnostics && node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
130if (root.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
774if (tree.GetDiagnostics(cancellationToken).Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
81if (syntax.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
128if (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)
50var containsSyntaxError = node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.Razor.Compiler (5)
SourceGenerators\Diagnostics\RazorDiagnostics.cs (5)
20DiagnosticSeverity.Error); 27DiagnosticSeverity.Error); 69DiagnosticSeverity.Error); 76DiagnosticSeverity.Error); 101RazorDiagnosticSeverity.Error => DiagnosticSeverity.Error,
Microsoft.CodeAnalysis.ResxSourceGenerator (7)
src\roslyn\src\Compilers\Core\Portable\Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
187DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (1)
60DiagnosticSeverity.Error => Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
15DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
18DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
27DiagnosticSeverity.Error => ReportDiagnostic.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
28return DiagnosticSeverity.Error;
Microsoft.CodeAnalysis.Scripting (3)
Hosting\CommandLine\CommandLineRunner.cs (1)
391Console.SetForegroundColor(diagnostic.Severity == DiagnosticSeverity.Error ? ConsoleColor.Red : ConsoleColor.Yellow);
Script.cs (1)
370return 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.VisualBasic (24)
Binding\Binder_Expressions.vb (3)
1110If diag.Severity = DiagnosticSeverity.Error Then 3112If di.Severity = DiagnosticSeverity.Error Then 4944If 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)
233Debug.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.Workspaces (10)
Diagnostics\DiagnosticData.cs (1)
363return DiagnosticSeverity.Error;
src\roslyn\src\Compilers\Core\Portable\Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
187DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (1)
60DiagnosticSeverity.Error => Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
15DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
18DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
27DiagnosticSeverity.Error => ReportDiagnostic.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
28return DiagnosticSeverity.Error;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
194diag => diag.Severity == DiagnosticSeverity.Error && !ignoreErrorCode.Contains(diag.Id));
Workspace\WorkspaceDiagnosticDescriptors.cs (1)
20defaultSeverity: 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.DotNet.HotReload.Utils.Generator (1)
DeltaProject.cs (1)
98if (updates.PersistentDiagnostics.Any(d => d.Severity == DiagnosticSeverity.Error)) {
Microsoft.DotNet.HotReload.Watch (2)
HotReload\CompilationHandler.cs (2)
558ReportCompilationDiagnostics(DiagnosticSeverity.Error); 665DiagnosticSeverity.Error => MessageDescriptor.ApplyUpdate_Error,
Microsoft.Extensions.Logging.Generators (19)
DiagnosticDescriptors.cs (19)
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, 225DiagnosticSeverity.Error, 233DiagnosticSeverity.Error,
Microsoft.Extensions.Options.SourceGeneration (2)
DiagDescriptors.cs (1)
114defaultSeverity: DiagnosticSeverity.Error);
DiagDescriptorsBase.cs (1)
18DiagnosticSeverity defaultSeverity = DiagnosticSeverity.Error,
Microsoft.Gen.BuildMetadata (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
22DiagnosticSeverity 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.MetadataExtractor (1)
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 (39)
ComInterfaceGenerator.cs (3)
492.Where(context => context.UnmanagedToManagedStub.Diagnostics.All(diag => diag.Descriptor.DefaultSeverity != DiagnosticSeverity.Error))) 555.Where(context => context.UnmanagedToManagedStub.Diagnostics.All(diag => diag.Descriptor.DefaultSeverity != DiagnosticSeverity.Error))) 573unmanagedToManagedContext.Diagnostics.All(static d => d.Descriptor.DefaultSeverity != DiagnosticSeverity.Error))
GeneratorDiagnostics.cs (36)
42DiagnosticSeverity.Error, 53DiagnosticSeverity.Error, 64DiagnosticSeverity.Error, 75DiagnosticSeverity.Error, 86DiagnosticSeverity.Error, 97DiagnosticSeverity.Error, 108DiagnosticSeverity.Error, 119DiagnosticSeverity.Error, 130DiagnosticSeverity.Error, 141DiagnosticSeverity.Error, 151DiagnosticSeverity.Error, 161DiagnosticSeverity.Error, 172DiagnosticSeverity.Error, 182DiagnosticSeverity.Error, 193DiagnosticSeverity.Error, 204DiagnosticSeverity.Error, 215DiagnosticSeverity.Error, 226DiagnosticSeverity.Error, 237DiagnosticSeverity.Error, 248DiagnosticSeverity.Error, 259DiagnosticSeverity.Error, 270DiagnosticSeverity.Error, 281DiagnosticSeverity.Error, 292DiagnosticSeverity.Error, 303DiagnosticSeverity.Error, 314DiagnosticSeverity.Error, 325DiagnosticSeverity.Error, 336DiagnosticSeverity.Error, 347DiagnosticSeverity.Error, 358DiagnosticSeverity.Error, 369DiagnosticSeverity.Error, 380DiagnosticSeverity.Error, 391DiagnosticSeverity.Error, 402DiagnosticSeverity.Error, 413DiagnosticSeverity.Error, 424DiagnosticSeverity.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'"),
Roslyn.Diagnostics.Analyzers (10)
IRemoteJsonServiceParameterAnalyzer.cs (1)
29DiagnosticSeverity.Error,
src\roslyn\src\Compilers\Core\Portable\Diagnostic\DiagnosticArrayExtensions.cs (1)
15if (diagnostic.Severity == DiagnosticSeverity.Error)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
187DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (1)
60DiagnosticSeverity.Error => Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
15DiagnosticSeverity.Error => NotificationOption2.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
18DiagnosticSeverity.Error => EditorConfigSeverityStrings.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
27DiagnosticSeverity.Error => ReportDiagnostic.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
28return DiagnosticSeverity.Error;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
194diag => diag.Severity == DiagnosticSeverity.Error && !ignoreErrorCode.Contains(diag.Id));
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (1)
38DiagnosticSeverity.Error,
Roslyn.Diagnostics.CSharp.Analyzers (3)
CSharpDoNotCapturePrimaryContructorParameters.cs (1)
24DiagnosticSeverity.Error,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
182if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
118if (parsed.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error))
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
BasicInvokeTheCorrectPropertyToEnsureCorrectUseSiteDiagnostics.vb (1)
23DiagnosticSeverity.Error,
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)
19defaultSeverity: DiagnosticSeverity.Error); 28defaultSeverity: DiagnosticSeverity.Error); 37defaultSeverity: DiagnosticSeverity.Error); 46defaultSeverity: DiagnosticSeverity.Error,
System.Windows.Forms.Analyzers.VisualBasic (1)
Diagnostic\VisualBasicDiagnosticDescriptors.vb (1)
16defaultSeverity:=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));