95 references to WithGeneralDiagnosticOption
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
CSharpCompiler.cs (1)
203csharpCompilationOptions = csharpCompilationOptions.WithGeneralDiagnosticOption(reportDiagnostic);
Microsoft.CodeAnalysis.CSharp (1)
CSharpCompilationOptions.cs (1)
443protected override CompilationOptions CommonWithGeneralDiagnosticOption(ReportDiagnostic value) => WithGeneralDiagnosticOption(value);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
15662var comp = CreateCompilation(src, options: TestOptions.DebugExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 15798var comp = CreateCompilation(src, options: TestOptions.DebugExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenTests.cs (1)
36.WithGeneralDiagnosticOption(ReportDiagnostic.Error);
Emit\CompilationEmitTests.cs (2)
5572var options = TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 5617var options = TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (13)
Attributes\AttributeTests_WellKnownAttributes.cs (4)
8787verify(TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Warn), 8793verify(TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error), 8799verify(TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Hidden), 8804verify(TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress));
Diagnostics\DiagnosticAnalyzerTests.cs (9)
201var options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 287var options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 400var options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Default); 405options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 411options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Warn); 418options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Info); 425options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Hidden); 432options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress); 1553var options = compilation.Options.WithGeneralDiagnosticOption(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (50)
Semantics\NullableReferenceTypesTests.cs (48)
125180comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 125209comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125220WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125240WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125250WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125266WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125271WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125286WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125296WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125307WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125363comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 125382comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125387WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125395WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125399WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125408WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125412WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125420WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125424WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125429WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125544comp = CreateCompilation(new[] { source, source2 }, options: options.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125555WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125575WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125585WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125601WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125606WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125621WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125631WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125642WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126073comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126079WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126089WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126094WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126105WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126110WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126120WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126125WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126131WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126148comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 126219comp = CreateCompilation(new[] { source, source2 }, options: options.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126225WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126235WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126240WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126251WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126256WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126266WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126271WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126277WithGeneralDiagnosticOption(ReportDiagnostic.Hidden));
Semantics\SemanticErrorTests.cs (1)
23674CreateCompilation(builder.ToString(), null, TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)).VerifyEmitDiagnostics(
Semantics\UninitializedNonNullableFieldTests.cs (1)
2785options = options.WithGeneralDiagnosticOption(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Compilation\CompilationAPITests.cs (1)
71.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress);
Compilation\CSharpCompilationOptionsTests.cs (3)
122TestProperty((old, value) => old.WithGeneralDiagnosticOption(value), opt => opt.GeneralDiagnosticOption, ReportDiagnostic.Suppress); 196Assert.Equal(ReportDiagnostic.Error, new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithGeneralDiagnosticOption(ReportDiagnostic.Error).GeneralDiagnosticOption); 197Assert.Equal(ReportDiagnostic.Default, new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithGeneralDiagnosticOption(ReportDiagnostic.Default).GeneralDiagnosticOption);
Compilation\GetUnusedImportDirectivesTests.cs (1)
379var comp = CreateCompilation(source, options: TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error));
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
8171var compOptions = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (18)
Diagnostics\DiagnosticTest.cs (18)
580option = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 587option = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Default).WithSpecificDiagnosticOptions(warnings); 649option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 696option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 753option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 809option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 865option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 923option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 981option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1046option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1122option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1187option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1240option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1293option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1347option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1391option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1448option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 2149var options = TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
144.WithGeneralDiagnosticOption(generalDiagnosticOption)