820 references to Warning
CodeStyleConfigFileGenerator (4)
ConfigurationSchemaGenerator (4)
CSharpSyntaxGenerator (1)
ILLink.RoslynAnalyzer (3)
Microsoft.Analyzers.Extra (14)
Microsoft.Analyzers.Local (9)
Microsoft.AspNetCore.Analyzers (3)
Microsoft.AspNetCore.App.Analyzers (15)
DiagnosticDescriptors.cs (15)
16DiagnosticSeverity.Warning,
25DiagnosticSeverity.Warning,
34DiagnosticSeverity.Warning,
43DiagnosticSeverity.Warning,
52DiagnosticSeverity.Warning,
88DiagnosticSeverity.Warning,
97DiagnosticSeverity.Warning,
106DiagnosticSeverity.Warning,
115DiagnosticSeverity.Warning,
133DiagnosticSeverity.Warning,
142DiagnosticSeverity.Warning,
160DiagnosticSeverity.Warning,
187DiagnosticSeverity.Warning,
196DiagnosticSeverity.Warning,
223DiagnosticSeverity.Warning,
Microsoft.AspNetCore.Components.Analyzers (5)
Microsoft.AspNetCore.Components.Analyzers.Tests (9)
Microsoft.AspNetCore.Components.SdkAnalyzers (4)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (7)
Microsoft.AspNetCore.Http.Extensions.Tests (11)
Microsoft.AspNetCore.Http.Microbenchmarks (2)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (13)
DiagnosticDescriptors.cs (13)
17DiagnosticSeverity.Warning,
26DiagnosticSeverity.Warning,
35DiagnosticSeverity.Warning,
44DiagnosticSeverity.Warning,
53DiagnosticSeverity.Warning,
62DiagnosticSeverity.Warning,
71DiagnosticSeverity.Warning,
80DiagnosticSeverity.Warning,
89DiagnosticSeverity.Warning,
98DiagnosticSeverity.Warning,
107DiagnosticSeverity.Warning,
116DiagnosticSeverity.Warning,
125DiagnosticSeverity.Warning,
Microsoft.AspNetCore.Mvc.Analyzers (5)
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
Microsoft.CodeAnalysis (22)
Microsoft.CodeAnalysis.CodeStyle (7)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (1)
Microsoft.CodeAnalysis.CSharp (5)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (42)
CommandLineTests.cs (42)
216var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
13062var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
13107analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: false);
13147[InlineData(DiagnosticSeverity.Warning, false)]
13247[InlineData(DiagnosticSeverity.Warning, false, false)]
13248[InlineData(DiagnosticSeverity.Warning, false, true)]
13337[InlineData(DiagnosticSeverity.Warning, false)]
13633var analyzer = new NamedTypeAnalyzerWithConfigurableEnabledByDefault(isEnabledByDefault, defaultSeverity: DiagnosticSeverity.Warning, customConfigurable, throwOnAllNamedTypes: false);
13812var prefix = defaultSeverity == DiagnosticSeverity.Warning ? "warning" : "error";
13820[InlineData(false, false, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, null, DiagnosticSeverity.Error)]
13821[InlineData(true, false, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, null, DiagnosticSeverity.Warning)]
13822[InlineData(false, true, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, null, DiagnosticSeverity.Error)]
13823[InlineData(true, true, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, null, DiagnosticSeverity.Warning)]
13825[InlineData(false, false, DiagnosticSeverity.Info, null, DiagnosticSeverity.Warning, DiagnosticSeverity.Error)]
13826[InlineData(true, false, DiagnosticSeverity.Info, null, DiagnosticSeverity.Warning, DiagnosticSeverity.Warning)]
13827[InlineData(false, true, DiagnosticSeverity.Info, null, DiagnosticSeverity.Warning, DiagnosticSeverity.Error)]
13828[InlineData(true, true, DiagnosticSeverity.Info, null, DiagnosticSeverity.Warning, DiagnosticSeverity.Warning)]
13830[InlineData(false, false, DiagnosticSeverity.Warning, null, null, DiagnosticSeverity.Error)]
13831[InlineData(true, false, DiagnosticSeverity.Warning, null, null, DiagnosticSeverity.Warning)]
13832[InlineData(false, true, DiagnosticSeverity.Warning, null, null, DiagnosticSeverity.Error)]
13833[InlineData(true, true, DiagnosticSeverity.Warning, null, null, DiagnosticSeverity.Warning)]
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)]
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)]
13899case DiagnosticSeverity.Warning:
14893private static readonly DiagnosticDescriptor _rule = new DiagnosticDescriptor("Id", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
15299var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
15985internal static readonly DiagnosticDescriptor Warning01 = new DiagnosticDescriptor("Warning01", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault: true);
16008internal static readonly DiagnosticDescriptor Warning02 = new DiagnosticDescriptor("Warning02", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault: true, helpLinkUri: "https://example.org/analyzer");
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (12)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (2)
217new DiagnosticDescriptor(ID, title: "Syntax", messageFormat: "Syntax", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true);
862var descriptor = new DiagnosticDescriptor(id, "Title", messageFormat: analyzerName, "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (2)
133var descriptor = new DiagnosticDescriptor(id: id, title: "", messageFormat: "", category: "Naming", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: false);
332var descriptor = new DiagnosticDescriptor(id: id, title: "", messageFormat: "", category: "Naming", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: false);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (86)
Diagnostics\DiagnosticAnalyzerTests.cs (31)
38new DiagnosticDescriptor(id: "CA9999_UseOfVariableThatStartsWithX", title: "CA9999_UseOfVariableThatStartsWithX", messageFormat: "Use of variable whose name starts with 'x': '{0}'", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true);
234private static readonly DiagnosticDescriptor s_descriptor = new DiagnosticDescriptor("XX0001", "My Syntax/Symbol Diagnostic", "My Syntax/Symbol Diagnostic for '{0}'", "Compiler", DiagnosticSeverity.Warning, isEnabledByDefault: true);
305var warningDiagDescriptor = new DiagnosticDescriptor("XX0003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true);
368case DiagnosticSeverity.Warning:
389var warningDiagDescriptor = new DiagnosticDescriptor("XX0003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true);
415Assert.Equal(1, effectiveDiags.Count(d => d.Severity == DiagnosticSeverity.Warning));
442var disabledDiagDescriptor = new DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false);
443var enabledDiagDescriptor = new DiagnosticDescriptor("XX002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true);
471public static DiagnosticDescriptor desc1 = new DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false);
472public static DiagnosticDescriptor desc2 = new DiagnosticDescriptor("XX002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false);
473public static DiagnosticDescriptor desc3 = new DiagnosticDescriptor("XX003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false, customTags: WellKnownDiagnosticTags.NotConfigurable);
487public static DiagnosticDescriptor desc1 = new DiagnosticDescriptor("XX003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false);
488public static DiagnosticDescriptor desc2 = new DiagnosticDescriptor("XX004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true);
502public static DiagnosticDescriptor desc1 = new DiagnosticDescriptor("DummyId", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false);
656internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true);
829public static DiagnosticDescriptor Descriptor1 = new DiagnosticDescriptor("MethodSymbolDiagnostic", "MethodSymbolDiagnostic", "{0}", "MethodSymbolDiagnostic", DiagnosticSeverity.Warning, isEnabledByDefault: true);
873new DiagnosticDescriptor("ID_1", "DummyTitle", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true);
876new DiagnosticDescriptor("ID_2", "DummyTitle", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true);
1294TestEffectiveSeverity(DiagnosticSeverity.Warning, ReportDiagnostic.Warn);
1305TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity: ReportDiagnostic.Warn, specificOptions: specificOptions, generalOption: generalOption);
1314TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity: generalOption, generalOption: generalOption);
1326TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity: specificOption, specificOptions: specificOptions, generalOption: generalOption);
1337TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity: ReportDiagnostic.Suppress, generalOption: generalOption, isEnabledByDefault: enabledByDefault);
1350TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity: specificOption, specificOptions: specificOptions, generalOption: generalOption, isEnabledByDefault: enabledByDefault);
1640DiagnosticSeverity.Warning,
2288DiagnosticSeverity.Warning,
2296DiagnosticSeverity.Warning,
3841internal static DiagnosticDescriptor Rule = new(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true);
4075internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true);
4114internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true);
4390[InlineData(SeverityFilter.Hidden | SeverityFilter.Info, DiagnosticSeverity.Warning)]
Diagnostics\DiagnosticSuppressorTests.cs (12)
233var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
256var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
282var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
304var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
346if (defaultSeverity == DiagnosticSeverity.Warning &&
391var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
433var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
479var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
532var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
585var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
634var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
674var analyzer = new CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable: true);
Diagnostics\GetDiagnosticsTests.cs (12)
120Assert.Equal(DiagnosticSeverity.Warning, diag.Severity);
125Assert.Equal(DiagnosticSeverity.Warning, error.DefaultSeverity);
128var warning = error.WithSeverity(DiagnosticSeverity.Warning);
129Assert.Equal(DiagnosticSeverity.Warning, warning.Severity);
130Assert.Equal(DiagnosticSeverity.Warning, warning.DefaultSeverity);
135Assert.Equal(DiagnosticSeverity.Warning, hidden.DefaultSeverity);
140Assert.Equal(DiagnosticSeverity.Warning, info.DefaultSeverity);
573Assert.Equal(DiagnosticSeverity.Warning, diagnostic.Severity);
621Assert.Equal(DiagnosticSeverity.Warning, diagnostic.Severity);
936defaultSeverity: DiagnosticSeverity.Warning,
944defaultSeverity: DiagnosticSeverity.Warning,
1712public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor("ID0001", "Title", "Message", "Category", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true);
Semantics\PrimaryConstructorTests.cs (16)
3747new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
4072new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
4158new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
4307new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
4497new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
4631new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
4811new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
4956new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
5135new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
5248new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
5475new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
5562new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
5675new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
5772new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
5830new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
5923new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
Semantics\RecordTests.cs (9)
26232new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
26555new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
26650new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
26815new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
27005new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
27139new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
27319new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
27464new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
27647new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (21)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (4)
57new DiagnosticDescriptor("Analyzer0168", "Variable is declared but never used", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
59new DiagnosticDescriptor("Analyzer0219", "Variable is assigned but its value is never used", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
114new DiagnosticDescriptor("CompilationEndId", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true,
1298new(DiagnosticId, "NonLocalDiagnosticTitle", "NonLocalDiagnosticMessage", "NonLocalDiagnosticCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (72)
Semantics\NullableReferenceTypesTests.cs (12)
125133Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125142Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125151Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125162Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125238Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125249Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125468Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125477Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125486Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125497Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125573Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
125584Assert.Equal(DiagnosticSeverity.Warning, diagnostics.Single().Severity);
Semantics\RecordStructTests.cs (8)
5947new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6176new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6272new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6401new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6498new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6556new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6649new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6810new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
Semantics\TopLevelStatementsTests.cs (13)
6424new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6523new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6598new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6707new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6788new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6846new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6904new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
6972new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
7052new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
7168new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
7262new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
7334new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
7401new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
SourceGeneration\GeneratorDriverTests.cs (36)
178new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
433DiagnosticDescriptor generatorDiagnostic = new DiagnosticDescriptor("TG001", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description);
662DiagnosticDescriptor generatorDiagnostic1 = new DiagnosticDescriptor("TG001", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description);
663DiagnosticDescriptor generatorDiagnostic2 = new DiagnosticDescriptor("TG002", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description);
664DiagnosticDescriptor generatorDiagnostic3 = new DiagnosticDescriptor("TG003", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description);
709DiagnosticDescriptor generatorDiagnostic1 = new DiagnosticDescriptor("TG001", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description);
710DiagnosticDescriptor generatorDiagnostic2 = new DiagnosticDescriptor("TG002", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description);
711DiagnosticDescriptor generatorDiagnostic3 = new DiagnosticDescriptor("TG003", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description);
1164c.ReportDiagnostic(CSDiagnostic.Create("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 2));
1165c.ReportDiagnostic(CSDiagnostic.Create("GEN002", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 3));
1215var gen001 = CSDiagnostic.Create("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 2);
1286var gen001 = CSDiagnostic.Create("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, isEnabledByDefault: true, warningLevel: 2);
3622DiagnosticSeverity.Warning,
3623DiagnosticSeverity.Warning,
3655DiagnosticSeverity.Warning,
3656DiagnosticSeverity.Warning,
3686DiagnosticSeverity.Warning,
3687DiagnosticSeverity.Warning,
3716DiagnosticSeverity.Warning,
3717DiagnosticSeverity.Warning,
3748DiagnosticSeverity.Warning,
3749DiagnosticSeverity.Warning,
3780DiagnosticSeverity.Warning,
3781DiagnosticSeverity.Warning,
3811DiagnosticSeverity.Warning,
3812DiagnosticSeverity.Warning,
3840DiagnosticSeverity.Warning,
3841DiagnosticSeverity.Warning,
3872DiagnosticSeverity.Warning,
3873DiagnosticSeverity.Warning,
3902DiagnosticSeverity.Warning,
3903DiagnosticSeverity.Warning,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Symbols\Source\NullablePublicAPITests.cs (4)
1157private static readonly DiagnosticDescriptor s_descriptor1 = new DiagnosticDescriptor(id: "CA9999_NullabilityPrinter", title: "CA9999_NullabilityPrinter", messageFormat: "Nullability of '{0}' is '{1}':'{2}'. Speculative flow state is '{3}'", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true);
1158private static readonly DiagnosticDescriptor s_descriptor2 = new DiagnosticDescriptor(id: "CA9998_NullabilityPrinter", title: "CA9998_NullabilityPrinter", messageFormat: "Declared nullability of '{0}' is '{1}'", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true);
1779new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
4835new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (12)
Diagnostics\LocationsTests.cs (6)
505var diagnostic = CodeAnalysis.Diagnostic.Create("CS0000", "", "msg", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 1, location: location);
523var diagnosticWithoutMapping = CodeAnalysis.Diagnostic.Create("CS0000", "", "msg", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 1, location: locationWithoutMapping);
526var diagnosticWithMapping = CodeAnalysis.Diagnostic.Create("CS0000", "", "msg", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 1, location: locationWithMapping);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
CodeFixes\CodeFixServiceTests.cs (4)
524var descriptor = new DiagnosticDescriptor(diagnosticId, "MockDiagnostic", "MockDiagnostic", category, DiagnosticSeverity.Warning, isEnabledByDefault: true);
605private readonly DiagnosticDescriptor s_descriptor = new(MockFixer.Id, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
911private readonly DiagnosticDescriptor _descriptor = new(DiagnosticId, "AdditionalFileAnalyzer", "AdditionalFileAnalyzer", "AdditionalFileAnalyzer", DiagnosticSeverity.Warning, isEnabledByDefault: true);
1171public static readonly DiagnosticDescriptor Descriptor = new("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (4)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (11)
Diagnostics\DiagnosticProviderTests.vb (1)
341Return CreateDiagnostic(id, message, DiagnosticSeverity.Warning, docId, projId, mappedLine, originalLine, mappedColumn, originalColumn, mappedFile, originalFile)
Diagnostics\DiagnosticServiceTests.vb (9)
1248Public Shared Descriptor1 As New DiagnosticDescriptor("MustOverrideMethodDiagnostic", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
1367Public Shared Descriptor1 As New DiagnosticDescriptor("FieldDeclarationDiagnostic", "DummyDescription", "{0}", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
1447DiagnosticSeverity.Warning,
1476DiagnosticSeverity.Warning,
1521DiagnosticSeverity.Warning,
1762DiagnosticSeverity.Warning,
1875DiagnosticSeverity.Warning,
2381Public Property Descriptor As New DiagnosticDescriptor("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
2496Public Shared s_descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
Microsoft.CodeAnalysis.Features (6)
Microsoft.CodeAnalysis.Features.UnitTests (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (8)
Diagnostics\BuildOnlyDiagnosticIdsHandlerTests.cs (2)
92private static readonly DiagnosticDescriptor s_descriptor = new(Id, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true, customTags: [WellKnownDiagnosticTags.CompilationEnd]);
104private static readonly DiagnosticDescriptor s_descriptor = new(Id, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Diagnostics\NonLocalDiagnosticTests.cs (2)
78public static readonly DiagnosticDescriptor NonLocalDescriptor = new("NonLocal0001", "Title1", "NonLocal0001", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
79public static readonly DiagnosticDescriptor CompilationEndDescriptor = new("NonLocal0002", "Title2", "NonLocal0002", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true, customTags: [WellKnownDiagnosticTags.CompilationEnd]);
Diagnostics\PullDiagnosticTests.cs (2)
130private readonly DiagnosticDescriptor _descriptor = new(RuleId, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
144private readonly DiagnosticDescriptor _descriptor = new(RuleId, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Microsoft.CodeAnalysis.Scripting (2)
Microsoft.CodeAnalysis.Test.Utilities (136)
Diagnostics\CommonDiagnosticAnalyzers.cs (57)
36defaultSeverity: DiagnosticSeverity.Warning,
538defaultSeverity: DiagnosticSeverity.Warning,
547defaultSeverity: DiagnosticSeverity.Warning,
587defaultSeverity: DiagnosticSeverity.Warning,
595defaultSeverity: DiagnosticSeverity.Warning,
646defaultSeverity: DiagnosticSeverity.Warning,
672public const DiagnosticSeverity Severity = DiagnosticSeverity.Warning;
711public const DiagnosticSeverity Severity = DiagnosticSeverity.Warning;
740defaultSeverity: DiagnosticSeverity.Warning,
755defaultSeverity: DiagnosticSeverity.Warning,
778public const DiagnosticSeverity Severity = DiagnosticSeverity.Warning;
818defaultSeverity: DiagnosticSeverity.Warning,
849defaultSeverity: DiagnosticSeverity.Warning,
870defaultSeverity: DiagnosticSeverity.Warning,
891defaultSeverity: DiagnosticSeverity.Warning,
927defaultSeverity: DiagnosticSeverity.Warning,
995defaultSeverity: DiagnosticSeverity.Warning,
1034defaultSeverity: DiagnosticSeverity.Warning,
1096DiagnosticSeverity.Warning,
1126DiagnosticSeverity.Warning,
1195DiagnosticSeverity.Warning,
1237defaultSeverity: DiagnosticSeverity.Warning,
1382defaultSeverity: DiagnosticSeverity.Warning,
1408defaultSeverity: DiagnosticSeverity.Warning,
1458defaultSeverity: DiagnosticSeverity.Warning,
1483DiagnosticSeverity.Warning,
1499DiagnosticSeverity.Warning,
1507DiagnosticSeverity.Warning,
1688DiagnosticSeverity.Warning,
1728DiagnosticSeverity.Warning,
1736DiagnosticSeverity.Warning,
1744DiagnosticSeverity.Warning,
1752DiagnosticSeverity.Warning,
1852defaultSeverity: DiagnosticSeverity.Warning,
1892defaultSeverity: DiagnosticSeverity.Warning,
1900defaultSeverity: DiagnosticSeverity.Warning,
1908defaultSeverity: DiagnosticSeverity.Warning,
1916defaultSeverity: DiagnosticSeverity.Warning,
1924defaultSeverity: DiagnosticSeverity.Warning,
1932defaultSeverity: DiagnosticSeverity.Warning,
1940defaultSeverity: DiagnosticSeverity.Warning,
1948defaultSeverity: DiagnosticSeverity.Warning,
1956defaultSeverity: DiagnosticSeverity.Warning,
2374severity: DiagnosticSeverity.Warning,
2375defaultSeverity: DiagnosticSeverity.Warning,
2411defaultSeverity: DiagnosticSeverity.Warning,
2476defaultSeverity: DiagnosticSeverity.Warning,
2557defaultSeverity: DiagnosticSeverity.Warning,
2586defaultSeverity: DiagnosticSeverity.Warning,
2632defaultSeverity: DiagnosticSeverity.Warning,
2674defaultSeverity: DiagnosticSeverity.Warning,
2705private static readonly DiagnosticDescriptor s_descriptor = new("ID0001", "Title", "{0}", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
2869defaultSeverity: DiagnosticSeverity.Warning,
2908new DiagnosticDescriptor(DiagnosticId, "test", "test", "test", DiagnosticSeverity.Warning, isEnabledByDefault: true);
2975private static readonly DiagnosticDescriptor s_descriptor = new("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
3082defaultSeverity: DiagnosticSeverity.Warning,
3231defaultSeverity: DiagnosticSeverity.Warning,
Diagnostics\OperationTestAnalyzer.cs (68)
27DiagnosticSeverity.Warning,
35DiagnosticSeverity.Warning,
43DiagnosticSeverity.Warning,
89DiagnosticSeverity.Warning,
130DiagnosticSeverity.Warning,
303DiagnosticSeverity.Warning,
311DiagnosticSeverity.Warning,
319DiagnosticSeverity.Warning,
499DiagnosticSeverity.Warning,
507DiagnosticSeverity.Warning,
515DiagnosticSeverity.Warning,
523DiagnosticSeverity.Warning,
616DiagnosticSeverity.Warning,
653DiagnosticSeverity.Warning,
693DiagnosticSeverity.Warning,
701DiagnosticSeverity.Warning,
739DiagnosticSeverity.Warning,
780DiagnosticSeverity.Warning,
820DiagnosticSeverity.Warning,
828DiagnosticSeverity.Warning,
877DiagnosticSeverity.Warning,
885DiagnosticSeverity.Warning,
935DiagnosticSeverity.Warning,
943DiagnosticSeverity.Warning,
969DiagnosticSeverity.Warning,
977DiagnosticSeverity.Warning,
985DiagnosticSeverity.Warning,
993DiagnosticSeverity.Warning,
1001DiagnosticSeverity.Warning,
1009DiagnosticSeverity.Warning,
1017DiagnosticSeverity.Warning,
1082DiagnosticSeverity.Warning,
1090DiagnosticSeverity.Warning,
1171DiagnosticSeverity.Warning,
1213DiagnosticSeverity.Warning,
1242DiagnosticSeverity.Warning,
1250DiagnosticSeverity.Warning,
1283DiagnosticSeverity.Warning,
1291DiagnosticSeverity.Warning,
1300DiagnosticSeverity.Warning,
1352DiagnosticSeverity.Warning,
1361DiagnosticSeverity.Warning,
1431DiagnosticSeverity.Warning,
1439DiagnosticSeverity.Warning,
1481DiagnosticSeverity.Warning,
1489DiagnosticSeverity.Warning,
1497DiagnosticSeverity.Warning,
1505DiagnosticSeverity.Warning,
1558DiagnosticSeverity.Warning,
1589DiagnosticSeverity.Warning,
1597DiagnosticSeverity.Warning,
1671DiagnosticSeverity.Warning,
1681DiagnosticSeverity.Warning,
1757DiagnosticSeverity.Warning,
1765DiagnosticSeverity.Warning,
1773DiagnosticSeverity.Warning,
1824DiagnosticSeverity.Warning,
1832DiagnosticSeverity.Warning,
1881DiagnosticSeverity.Warning,
1913DiagnosticSeverity.Warning,
1952DiagnosticSeverity.Warning,
1960DiagnosticSeverity.Warning,
1994DiagnosticSeverity.Warning,
2002DiagnosticSeverity.Warning,
2038DiagnosticSeverity.Warning,
2068DiagnosticSeverity.Warning,
2096DiagnosticSeverity.Warning,
2128DiagnosticSeverity.Warning,
Microsoft.CodeAnalysis.UnitTests (18)
Diagnostics\SarifErrorLoggerTests.cs (13)
55new DiagnosticDescriptor("TST001-001", "_TST001-001_", "", "", DiagnosticSeverity.Warning, true),
56new DiagnosticDescriptor("TST001", "_TST001_", "", "", DiagnosticSeverity.Warning, true),
57new DiagnosticDescriptor("TST001", "_TST001-002_", "", "", DiagnosticSeverity.Warning, true),
58new DiagnosticDescriptor("TST001", "_TST001-003_", "", "", DiagnosticSeverity.Warning, true),
61new DiagnosticDescriptor("TST002", "", "", "", DiagnosticSeverity.Warning, true),
62new DiagnosticDescriptor("TST002", "", "", "", DiagnosticSeverity.Warning, true),
65new DiagnosticDescriptor("TST002", "", "messageFormat", "", DiagnosticSeverity.Warning, true),
68new DiagnosticDescriptor("TST002", "title_001", "", "", DiagnosticSeverity.Warning, true),
69new DiagnosticDescriptor("TST002", "", "", "category_002", DiagnosticSeverity.Warning, true),
71new DiagnosticDescriptor("TST002", "", "", "", DiagnosticSeverity.Warning, isEnabledByDefault: false /*004*/),
72new DiagnosticDescriptor("TST002", "", "", "", DiagnosticSeverity.Warning, true, "description_005"),
119DiagnosticSeverity.Warning,
120DiagnosticSeverity.Warning,
Microsoft.CodeAnalysis.VisualBasic (5)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (38)
CommandLineTests.vb (38)
9896Dim analyzer = New CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable:=True)
9940analyzer = New CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable:=False)
10237Dim prefix = If(defaultSeverity = DiagnosticSeverity.Warning, "warning", "error")
10244<InlineData(False, False, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, Nothing, DiagnosticSeverity.Error)>
10245<InlineData(True, False, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, Nothing, DiagnosticSeverity.Warning)>
10246<InlineData(False, True, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, Nothing, DiagnosticSeverity.Error)>
10247<InlineData(True, True, DiagnosticSeverity.Info, DiagnosticSeverity.Warning, Nothing, DiagnosticSeverity.Warning)>
10248<InlineData(False, False, DiagnosticSeverity.Info, Nothing, DiagnosticSeverity.Warning, DiagnosticSeverity.Error)>
10249<InlineData(True, False, DiagnosticSeverity.Info, Nothing, DiagnosticSeverity.Warning, DiagnosticSeverity.Warning)>
10250<InlineData(False, True, DiagnosticSeverity.Info, Nothing, DiagnosticSeverity.Warning, DiagnosticSeverity.Error)>
10251<InlineData(True, True, DiagnosticSeverity.Info, Nothing, DiagnosticSeverity.Warning, DiagnosticSeverity.Warning)>
10252<InlineData(False, False, DiagnosticSeverity.Warning, Nothing, Nothing, DiagnosticSeverity.Error)>
10253<InlineData(True, False, DiagnosticSeverity.Warning, Nothing, Nothing, DiagnosticSeverity.Warning)>
10254<InlineData(False, True, DiagnosticSeverity.Warning, Nothing, Nothing, DiagnosticSeverity.Error)>
10255<InlineData(True, True, DiagnosticSeverity.Warning, Nothing, Nothing, DiagnosticSeverity.Warning)>
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)>
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)>
10312Case DiagnosticSeverity.Warning
10481Dim analyzer = New CompilationAnalyzerWithSeverity(DiagnosticSeverity.Warning, configurable:=True)
11024Friend Shared ReadOnly Warning01 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning01", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
11025Friend Shared ReadOnly Warning02 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning02", "", "Throwing a diagnostic for something else", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
11026Friend Shared ReadOnly Warning03 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning03", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
11050Friend Shared ReadOnly Warning04 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning04", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True, helpLinkUri:="https://example.org/analyzer")
11097Friend Shared ReadOnly Rule As DiagnosticDescriptor = New DiagnosticDescriptor("AdditionalFileDiagnostic", "", "Additional File Diagnostic: {0}", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (9)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (62)
Diagnostics\DiagnosticAnalyzerTests.vb (23)
27Private Shared ReadOnly s_CA9999_UseOfVariableThatStartsWithX As DiagnosticDescriptor = New DiagnosticDescriptor(id:="CA9999_UseOfVariableThatStartsWithX", title:="CA9999_UseOfVariableThatStartsWithX", messageFormat:="Use of variable whose name starts with 'x': '{0}'", category:="Test", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True)
51Dim warningDiagDescriptor = New DiagnosticDescriptor("XX0003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
111Case DiagnosticSeverity.Warning
132Dim warningDiagDescriptor = New DiagnosticDescriptor("XX0003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
158Assert.Equal(1, effectiveDiags.Count(Function(d) d.Severity = DiagnosticSeverity.Warning))
185Dim disabledDiagDescriptor = New DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=False)
186Dim enabledDiagDescriptor = New DiagnosticDescriptor("XX002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
215Public Shared desc1 As New DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=False)
216Public Shared desc2 As New DiagnosticDescriptor("XX002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=False)
231Public Shared desc1 As New DiagnosticDescriptor("XX003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=False)
232Public Shared desc2 As New DiagnosticDescriptor("XX004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
265Public Shared desc1 As New DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
303Public Shared desc1 As New DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
348Public Shared desc1 As New DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
497Public Shared desc1 As New DiagnosticDescriptor("FieldSymbolDiagnostic", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
562Public Shared desc1 As New DiagnosticDescriptor("FieldDeclarationDiagnostic", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
766TestEffectiveSeverity(DiagnosticSeverity.Warning, ReportDiagnostic.Warn)
776TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity:=ReportDiagnostic.Warn, specificOptions:=specificOptions, generalOption:=generalOption)
784TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity:=generalOption, generalOption:=generalOption)
795TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity:=specificOption, specificOptions:=specificOptions, generalOption:=generalOption)
805TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity:=ReportDiagnostic.Suppress, generalOption:=generalOption, isEnabledByDefault:=enabledByDefault)
817TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity:=specificOption, specificOptions:=specificOptions, generalOption:=generalOption, isEnabledByDefault:=enabledByDefault)
950Public Shared ReadOnly ExpressionDescriptor As New DiagnosticDescriptor("Expression", "Expression", "Expression found.", "Testing", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
Diagnostics\GetDiagnosticsTests.vb (10)
104Assert.Equal(DiagnosticSeverity.Warning, diag.Severity)
109Assert.Equal(DiagnosticSeverity.Warning, [error].DefaultSeverity)
112Dim warning = [error].WithSeverity(DiagnosticSeverity.Warning)
113Assert.Equal(DiagnosticSeverity.Warning, warning.Severity)
114Assert.Equal(DiagnosticSeverity.Warning, warning.DefaultSeverity)
119Assert.Equal(DiagnosticSeverity.Warning, hidden.DefaultSeverity)
124Assert.Equal(DiagnosticSeverity.Warning, info.DefaultSeverity)
587Public Shared ReadOnly Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("ID0001", "Title", "{0}", "Category", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True)
588Public Shared ReadOnly DescriptorForBlockEnd As DiagnosticDescriptor = New DiagnosticDescriptor("ID0002", "Title", "Message", "Category", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True)
711Public Shared ReadOnly Descriptor As New DiagnosticDescriptor("ID0001", "Title", "Message", "Category", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True)
SourceGeneration\GeneratorDriverTests.vb (28)
187c.ReportDiagnostic(VBDiagnostic.Create("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, True, 2))
188c.ReportDiagnostic(VBDiagnostic.Create("GEN002", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, True, 3))
221Dim gen001 = VBDiagnostic.Create("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, True, 2)
253Dim gen001 = VBDiagnostic.Create("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, True, 2)
308DiagnosticSeverity.Warning,
309DiagnosticSeverity.Warning,
339DiagnosticSeverity.Warning,
340DiagnosticSeverity.Warning,
370DiagnosticSeverity.Warning,
371DiagnosticSeverity.Warning,
400DiagnosticSeverity.Warning,
401DiagnosticSeverity.Warning,
430DiagnosticSeverity.Warning,
431DiagnosticSeverity.Warning,
460DiagnosticSeverity.Warning,
461DiagnosticSeverity.Warning,
491DiagnosticSeverity.Warning,
492DiagnosticSeverity.Warning,
520DiagnosticSeverity.Warning,
521DiagnosticSeverity.Warning,
550DiagnosticSeverity.Warning,
551DiagnosticSeverity.Warning,
580DiagnosticSeverity.Warning,
581DiagnosticSeverity.Warning,
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (4)
Parser\ParseDirectives.vb (4)
3183New DiagnosticDescriptor("sOMEID", "something1", "something2", "something3", DiagnosticSeverity.Warning, isEnabledByDefault:=True),
3290"something1", "something2", "something3", DiagnosticSeverity.Warning, isEnabledByDefault:=True),
3621New DiagnosticDescriptor("TestId", "something1", "something2", "something3", DiagnosticSeverity.Warning, isEnabledByDefault:=True),
3648New DiagnosticDescriptor("TestId", "something1", "something2", "something3", DiagnosticSeverity.Warning, isEnabledByDefault:=True),
Microsoft.CodeAnalysis.Workspaces (7)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.Extensions.Logging.Generators (7)
Microsoft.Extensions.Options.SourceGeneration (6)
Microsoft.Gen.ContextualOptions (1)
Microsoft.Gen.Logging (12)
Microsoft.Interop.ComInterfaceGenerator (7)
Microsoft.Interop.LibraryImportGenerator (7)
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
Microsoft.ML.CodeAnalyzer.Tests (1)
Microsoft.ML.InternalCodeAnalyzer (13)
Microsoft.VisualStudio.LanguageServices (6)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.UnitTests (6)
System.Text.Json.SourceGeneration (11)
JsonSourceGenerator.DiagnosticDescriptors.cs (11)
20defaultSeverity: DiagnosticSeverity.Warning,
28defaultSeverity: DiagnosticSeverity.Warning,
36defaultSeverity: DiagnosticSeverity.Warning,
52defaultSeverity: DiagnosticSeverity.Warning,
76defaultSeverity: DiagnosticSeverity.Warning,
84defaultSeverity: DiagnosticSeverity.Warning,
92defaultSeverity: DiagnosticSeverity.Warning,
108defaultSeverity: DiagnosticSeverity.Warning,
116defaultSeverity: DiagnosticSeverity.Warning,
124defaultSeverity: DiagnosticSeverity.Warning,
132defaultSeverity: DiagnosticSeverity.Warning,
System.Windows.Forms.Analyzers (2)
System.Windows.Forms.Analyzers.CSharp (1)
System.Windows.Forms.Analyzers.CSharp.Tests (1)
System.Windows.Forms.Analyzers.VisualBasic (1)