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)
125184comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 125213comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125224WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125244WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125254WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125270WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125275WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125290WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125300WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125311WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125367comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 125386comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125391WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125399WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125403WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125412WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125416WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125424WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125428WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125433WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125548comp = CreateCompilation(new[] { source, source2 }, options: options.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125559WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125579WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125589WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125605WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125610WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125625WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125635WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125646WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126077comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126083WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126093WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126098WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126109WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126114WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126124WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126129WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126135WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126152comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 126223comp = CreateCompilation(new[] { source, source2 }, options: options.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126229WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126239WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126244WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126255WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126260WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126270WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126275WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126281WithGeneralDiagnosticOption(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)