51 references to WithSpecificDiagnosticOptions
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (2)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeFixVerifier`2+Test.cs (1)
104
return compilationOptions.
WithSpecificDiagnosticOptions
(compilationOptions.SpecificDiagnosticOptions.SetItems(CSharpVerifierHelper.NullableWarnings));
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeRefactoringVerifier`1+Test.cs (1)
111
return compilationOptions.
WithSpecificDiagnosticOptions
(compilationOptions.SpecificDiagnosticOptions.SetItems(CSharpVerifierHelper.NullableWarnings));
Microsoft.CodeAnalysis.CSharp (1)
CSharpCompilationOptions.cs (1)
446
WithSpecificDiagnosticOptions
(specificDiagnosticOptions);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (14)
Attributes\AttributeTests_WellKnownAttributes.cs (6)
8807
verify(TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Warn)),
8813
verify(TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Error)),
8819
verify(TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Hidden)),
8825
verify(TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Suppress)));
8828
verify(TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS0618", ReportDiagnostic.Error)),
8834
verify(TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS0618", ReportDiagnostic.Suppress)),
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4195
.
WithSpecificDiagnosticOptions
(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add(AnalyzerWithDisabledRules.Rule.Id, ReportDiagnostic.Warn))
Diagnostics\DiagnosticSuppressorTests.cs (2)
314
compilation = compilation.WithOptions(compilation.Options.
WithSpecificDiagnosticOptions
(specificDiagnosticOptions));
362
compilation = compilation.WithOptions(compilation.Options.
WithSpecificDiagnosticOptions
(specificDiagnosticOptions));
FieldKeywordTests.cs (4)
4052
options: includeStructInitializationWarnings ? TestOptions.ReleaseExe.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings) : TestOptions.ReleaseExe,
4203
options: includeStructInitializationWarnings ? TestOptions.ReleaseExe.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings) : TestOptions.ReleaseExe,
4335
options: includeStructInitializationWarnings ? TestOptions.ReleaseExe.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings) : TestOptions.ReleaseExe,
4469
options: includeStructInitializationWarnings ? TestOptions.ReleaseExe.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings) : TestOptions.ReleaseExe,
FlowAnalysis\FlowDiagnosticTests.cs (1)
1460
comp = CreateCompilation(text, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings), parseOptions: TestOptions.Regular11);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1062
var compilationOptions = TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (27)
Semantics\InitOnlyMemberTests.cs (2)
3467
options: TestOptions.ReleaseDll.
WithSpecificDiagnosticOptions
(
3566
options: TestOptions.ReleaseDll.
WithSpecificDiagnosticOptions
(
Semantics\RefFieldTests.cs (4)
30330
options: TestOptions.DebugExe.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings),
30384
options: TestOptions.DebugExe.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings),
30452
options: TestOptions.DebugExe.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings),
30515
options: TestOptions.DebugExe.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings),
Semantics\StructConstructorTests.cs (15)
3895
CreateCompilation(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings), parseOptions: TestOptions.Regular11)
3990
CreateCompilation(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings), parseOptions: TestOptions.Regular11)
4021
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings), parseOptions: TestOptions.Regular11);
4064
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings), parseOptions: TestOptions.Regular11);
4202
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
4241
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
4274
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
4309
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
4349
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
4399
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
4443
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
4486
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
4527
var comp = CreateCompilation(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
4549
var comp = CreateCompilation(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
4591
var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings));
Semantics\WarningVersionTests.cs (6)
190
.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings),
269
.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings),
360
.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings),
478
.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings),
565
.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings),
652
.
WithSpecificDiagnosticOptions
(ReportStructInitializationWarnings),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\CompilationAPITests.cs (1)
148
options = options.
WithSpecificDiagnosticOptions
(
Compilation\CSharpCompilationOptionsTests.cs (2)
125
TestProperty((old, value) => old.
WithSpecificDiagnosticOptions
(value), opt => opt.SpecificDiagnosticOptions,
237
Assert.Equal(0, new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithSpecificDiagnosticOptions
(null).SpecificDiagnosticOptions.Count);
Compilation\UsedAssembliesTests.cs (1)
295
options = options.
WithSpecificDiagnosticOptions
(options.SpecificDiagnosticOptions.Add("CS1591", ReportDiagnostic.Suppress));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
TestOptions.cs (2)
174
return options.
WithSpecificDiagnosticOptions
(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add(key, value));
179
return options.
WithSpecificDiagnosticOptions
(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add(key1, value).Add(key2, value));