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)
15658var comp = CreateCompilation(src, options: TestOptions.DebugExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 15794var 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)
5571var options = TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 5616var 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)
200var options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 286var options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 399var options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Default); 404options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 410options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Warn); 417options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Info); 424options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Hidden); 431options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress); 1552var options = compilation.Options.WithGeneralDiagnosticOption(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (50)
Semantics\NullableReferenceTypesTests.cs (48)
125115comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 125144comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125155WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125175WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125185WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125201WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125206WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125221WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125231WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125242WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125298comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 125317comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125322WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125330WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125334WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125343WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125347WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125355WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125359WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125364WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125479comp = CreateCompilation(new[] { source, source2 }, options: options.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125490WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125510WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125520WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125536WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125541WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125556WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125566WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125577WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126008comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126014WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126024WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126029WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126040WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126045WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126055WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126060WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126066WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126083comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 126154comp = CreateCompilation(new[] { source, source2 }, options: options.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126160WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126170WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126175WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126186WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126191WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126201WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126206WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126212WithGeneralDiagnosticOption(ReportDiagnostic.Hidden));
Semantics\SemanticErrorTests.cs (1)
23620CreateCompilation(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)
72.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)
7116var compOptions = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (18)
Diagnostics\DiagnosticTest.cs (18)
577option = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 584option = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Default).WithSpecificDiagnosticOptions(warnings); 646option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 693option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 750option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 806option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 862option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 920option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 978option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1043option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1119option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1184option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1237option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1290option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1344option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1388option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1445option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 2146var options = TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
143.WithGeneralDiagnosticOption(generalDiagnosticOption)