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)
15647var comp = CreateCompilation(src, options: TestOptions.DebugExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 15783var 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)
125241comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 125270comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125281WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125301WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125311WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125327WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125332WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125347WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125357WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125368WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125424comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 125443comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125448WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125456WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125460WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125469WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125473WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125481WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125485WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125490WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125605comp = CreateCompilation(new[] { source, source2 }, options: options.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125616WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125636WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125646WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125662WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125667WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125682WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125692WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125703WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126134comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126140WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126150WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126155WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126166WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126171WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126181WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126186WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126192WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126209comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 126280comp = CreateCompilation(new[] { source, source2 }, options: options.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126286WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126296WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126301WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126312WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126317WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126327WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126332WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126338WithGeneralDiagnosticOption(ReportDiagnostic.Hidden));
Semantics\SemanticErrorTests.cs (1)
23721CreateCompilation(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)
579option = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 586option = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Default).WithSpecificDiagnosticOptions(warnings); 648option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 695option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 752option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 808option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 864option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 922option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 980option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1045option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1121option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1186option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1239option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1292option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1346option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1390option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1447option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 2148var options = TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
144.WithGeneralDiagnosticOption(generalDiagnosticOption)