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)
15661var comp = CreateCompilation(src, options: TestOptions.DebugExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 15797var 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)
125157comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 125186comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125197WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125217WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125227WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125243WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125248WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125263WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125273WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125284WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125340comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 125359comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125364WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125372WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125376WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125385WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125389WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125397WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125401WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125406WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125521comp = CreateCompilation(new[] { source, source2 }, options: options.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125532WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125552WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 125562WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125578WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125583WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125598WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125608WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 125619WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126050comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126056WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126066WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126071WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126082WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126087WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126097WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126102WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126108WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126125comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().WithGeneralDiagnosticOption(option)); 126196comp = CreateCompilation(new[] { source, source2 }, options: options.WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126202WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126212WithGeneralDiagnosticOption(ReportDiagnostic.Default)); 126217WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126228WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126233WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126243WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126248WithGeneralDiagnosticOption(ReportDiagnostic.Hidden)); 126254WithGeneralDiagnosticOption(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)
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)
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)
143.WithGeneralDiagnosticOption(generalDiagnosticOption)