95 references to WithGeneralDiagnosticOption
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
CSharpCompiler.cs (1)
203
csharpCompilationOptions = csharpCompilationOptions.
WithGeneralDiagnosticOption
(reportDiagnostic);
Microsoft.CodeAnalysis.CSharp (1)
CSharpCompilationOptions.cs (1)
443
protected override CompilationOptions CommonWithGeneralDiagnosticOption(ReportDiagnostic value) =>
WithGeneralDiagnosticOption
(value);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
15658
var comp = CreateCompilation(src, options: TestOptions.DebugExe.
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress));
15794
var 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)
5571
var options = TestOptions.DebugDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
5616
var options = TestOptions.DebugDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (13)
Attributes\AttributeTests_WellKnownAttributes.cs (4)
8787
verify(TestOptions.DebugDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Warn),
8793
verify(TestOptions.DebugDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error),
8799
verify(TestOptions.DebugDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden),
8804
verify(TestOptions.DebugDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress));
Diagnostics\DiagnosticAnalyzerTests.cs (9)
200
var options = TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
286
var options = TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
399
var options = TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Default);
404
options = TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
410
options = TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Warn);
417
options = TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Info);
424
options = TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden);
431
options = TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress);
1552
var options = compilation.Options.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (50)
Semantics\NullableReferenceTypesTests.cs (48)
125115
comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().
WithGeneralDiagnosticOption
(option));
125144
comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.
WithGeneralDiagnosticOption
(ReportDiagnostic.Default));
125155
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125175
WithGeneralDiagnosticOption
(ReportDiagnostic.Default));
125185
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125201
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125206
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress));
125221
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125231
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden));
125242
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden));
125298
comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().
WithGeneralDiagnosticOption
(option));
125317
comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.
WithGeneralDiagnosticOption
(ReportDiagnostic.Default));
125322
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125330
WithGeneralDiagnosticOption
(ReportDiagnostic.Default));
125334
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125343
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125347
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress));
125355
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125359
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden));
125364
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden));
125479
comp = CreateCompilation(new[] { source, source2 }, options: options.
WithGeneralDiagnosticOption
(ReportDiagnostic.Default));
125490
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125510
WithGeneralDiagnosticOption
(ReportDiagnostic.Default));
125520
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125536
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125541
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress));
125556
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
125566
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden));
125577
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden));
126008
comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.
WithGeneralDiagnosticOption
(ReportDiagnostic.Default));
126014
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
126024
WithGeneralDiagnosticOption
(ReportDiagnostic.Default));
126029
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
126040
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
126045
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress));
126055
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
126060
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden));
126066
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden));
126083
comp = CreateCompilation(new[] { source, source2 }, options: WithNullableDisable().
WithGeneralDiagnosticOption
(option));
126154
comp = CreateCompilation(new[] { source, source2 }, options: options.
WithGeneralDiagnosticOption
(ReportDiagnostic.Default));
126160
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
126170
WithGeneralDiagnosticOption
(ReportDiagnostic.Default));
126175
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
126186
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
126191
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress));
126201
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
126206
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden));
126212
WithGeneralDiagnosticOption
(ReportDiagnostic.Hidden));
Semantics\SemanticErrorTests.cs (1)
23620
CreateCompilation(builder.ToString(), null, TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress)).VerifyEmitDiagnostics(
Semantics\UninitializedNonNullableFieldTests.cs (1)
2785
options = options.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Compilation\CompilationAPITests.cs (1)
72
.
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress);
Compilation\CSharpCompilationOptionsTests.cs (3)
122
TestProperty((old, value) => old.
WithGeneralDiagnosticOption
(value), opt => opt.GeneralDiagnosticOption, ReportDiagnostic.Suppress);
196
Assert.Equal(ReportDiagnostic.Error, new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error).GeneralDiagnosticOption);
197
Assert.Equal(ReportDiagnostic.Default, new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithGeneralDiagnosticOption
(ReportDiagnostic.Default).GeneralDiagnosticOption);
Compilation\GetUnusedImportDirectivesTests.cs (1)
379
var comp = CreateCompilation(source, options: TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error));
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
7116
var compOptions = TestOptions.ReleaseDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (18)
Diagnostics\DiagnosticTest.cs (18)
577
option = TestOptions.ReleaseExe.
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
584
option = TestOptions.ReleaseExe.
WithGeneralDiagnosticOption
(ReportDiagnostic.Default).WithSpecificDiagnosticOptions(warnings);
646
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
693
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
750
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
806
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
862
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
920
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
978
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
1043
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
1119
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
1184
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
1237
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
1290
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
1344
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
1388
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
1445
option = commonoption.WithWarningLevel(2).
WithGeneralDiagnosticOption
(ReportDiagnostic.Error);
2146
var options = TestOptions.DebugDll.
WithGeneralDiagnosticOption
(ReportDiagnostic.Suppress);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
143
.
WithGeneralDiagnosticOption
(generalDiagnosticOption)