222 references to WithLocation
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (5)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (5)
1230Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p1").WithLocation(5, 15), 1231Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p2").WithLocation(5, 23), 1232Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p3").WithLocation(13, 23), 1233Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p4").WithLocation(13, 31), 1234Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p5").WithLocation(19, 17));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (5)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (5)
1230Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p1").WithLocation(5, 15), 1231Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p2").WithLocation(5, 23), 1232Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p3").WithLocation(13, 23), 1233Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p4").WithLocation(13, 31), 1234Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p5").WithLocation(19, 17));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (82)
Compilation\CompilationAPITests.cs (81)
59Diagnostic(ErrorCode.WRN_BadXMLRefSyntax, "x").WithArguments("x...y").WithLocation(2, 16), 62Diagnostic(ErrorCode.WRN_ErrorOverride, "").WithArguments("Unexpected character '.'", "1056").WithLocation(2, 17)); 84Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").WithLocation(1, 22)); 96Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").WithLocation(1, 22), 99Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").WithLocation(1, 16)); 106Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").WithLocation(1, 16)); 124Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").WithLocation(4, 6)); 132Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").WithLocation(4, 6)); 145Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").WithLocation(1, 16) 156Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").WithLocation(1, 16), 159Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").WithLocation(1, 22).WithWarningAsError(true)); 178Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").WithLocation(1, 23).WithWarningAsError(true), 181Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("D._f").WithLocation(1, 17), 184Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").WithLocation(1, 17) 201Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").WithLocation(1, 17) 214Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").WithLocation(1, 23), 217Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").WithLocation(1, 17) 228Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").WithLocation(1, 39) 244Diagnostic(ErrorCode.ERR_OptionMustBeAbsolutePath).WithArguments("CryptoKeyFile").WithLocation(1, 1), 246Diagnostic(ErrorCode.ERR_PublicSignButNoKey).WithLocation(1, 1) 256Diagnostic(ErrorCode.ERR_PublicSignButNoKey).WithLocation(1, 1)); 265Diagnostic(ErrorCode.ERR_OptionMustBeAbsolutePath).WithArguments("CryptoKeyFile").WithLocation(1, 1), 267Diagnostic(ErrorCode.ERR_PublicSignButNoKey).WithLocation(1, 1)); 278Diagnostic(ErrorCode.WRN_NoRuntimeMetadataVersion).WithLocation(1, 1), 280Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").WithLocation(1, 1), 282Diagnostic(ErrorCode.ERR_NoEntryPoint).WithLocation(1, 1) 286Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").WithLocation(1, 1) 291Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").WithLocation(1, 1) 295Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").WithLocation(1, 1) 299Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").WithLocation(1, 1) 303Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name cannot start with whitespace.").WithLocation(1, 1) 307Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").WithLocation(1, 1) 311Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name cannot be empty.").WithLocation(1, 1) 315Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name cannot start with whitespace.").WithLocation(1, 1) 319Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").WithLocation(1, 1) 323Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").WithLocation(1, 1) 410Diagnostic(ErrorCode.ERR_InvalidDebugInformationFormat).WithArguments("-1").WithLocation(1, 1), 412Diagnostic(ErrorCode.ERR_InvalidOutputName).WithArguments("Name cannot start with whitespace.").WithLocation(1, 1), 414Diagnostic(ErrorCode.ERR_InvalidFileAlignment).WithArguments("513").WithLocation(1, 1), 416Diagnostic(ErrorCode.ERR_InvalidSubsystemVersion).WithArguments("1000000.-1000000").WithLocation(1, 1), 418Diagnostic(ErrorCode.ERR_InvalidHashAlgorithmName).WithArguments("invalid hash algorithm name").WithLocation(1, 1)); 655Diagnostic(ErrorCode.ERR_BadDirectivePlacement, "#").WithLocation(1, 21), 658Diagnostic(ErrorCode.ERR_CloseParenExpected, "").WithLocation(1, 61), 661Diagnostic(ErrorCode.ERR_SemicolonExpected, "").WithLocation(1, 61), 664Diagnostic(ErrorCode.ERR_LocalFunctionMissingBody, "Alias").WithArguments("Alias()").WithLocation(1, 14), 667Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "alias").WithArguments("alias").WithLocation(1, 8), 670Diagnostic(ErrorCode.WRN_ExternMethodNoImplementation, "Alias").WithArguments("Alias()").WithLocation(1, 14), 673Diagnostic(ErrorCode.WRN_UnreferencedLocalFunction, "Alias").WithArguments("Alias").WithLocation(1, 14) 723Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion6, "extern alias Alias(*#$@^%*&); class D : Alias(*#$@^%*&).C {}").WithArguments("top-level statements", "9.0").WithLocation(1, 1), 726Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion6, "extern").WithArguments("extern local functions", "9.0").WithLocation(1, 1), 729Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion6, "Alias").WithArguments("local functions", "7.0").WithLocation(1, 14), 732Diagnostic(ErrorCode.ERR_BadDirectivePlacement, "#").WithLocation(1, 21), 735Diagnostic(ErrorCode.ERR_CloseParenExpected, "").WithLocation(1, 61), 738Diagnostic(ErrorCode.ERR_SemicolonExpected, "").WithLocation(1, 61), 741Diagnostic(ErrorCode.ERR_LocalFunctionMissingBody, "Alias").WithArguments("Alias()").WithLocation(1, 14), 744Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "alias").WithArguments("alias").WithLocation(1, 8), 747Diagnostic(ErrorCode.WRN_ExternMethodNoImplementation, "Alias").WithArguments("Alias()").WithLocation(1, 14), 750Diagnostic(ErrorCode.WRN_UnreferencedLocalFunction, "Alias").WithArguments("Alias").WithLocation(1, 14) 1793Diagnostic(ErrorCode.WRN_MainIgnored, "Main").WithArguments("A.Main()").WithLocation(4, 17)); 1803Diagnostic(ErrorCode.WRN_MainIgnored, "Main").WithArguments("A.Main()").WithLocation(4, 17)); 1840Diagnostic(ErrorCode.WRN_MainIgnored, "Main").WithArguments("A.Main()").WithLocation(4, 17)); 1852Diagnostic(ErrorCode.WRN_MainIgnored, "Main").WithArguments("A.Main()").WithLocation(4, 17)); 1908Diagnostic(ErrorCode.WRN_LowerCaseTypeName, "alias").WithArguments("alias").WithLocation(2, 7), 1911Diagnostic(ErrorCode.ERR_DuplicateAlias, "using alias=alias;").WithArguments("alias").WithLocation(2, 1), 1914Diagnostic(ErrorCode.ERR_AmbigContext, "alias").WithArguments("alias", "<global namespace>", "<global namespace>").WithLocation(3, 17)); 2240Diagnostic(ErrorCode.ERR_LinkedNetmoduleMetadataMustProvideFullPEImage).WithArguments("ModuleCS00").WithLocation(1, 1)); 2262Diagnostic(ErrorCode.ERR_DuplicateImport).WithArguments("System (net461)", "System.v5.0.5.0_silverlight.dll").WithLocation(1, 1)); 2319Diagnostic(ErrorCode.ERR_DuplicateImport).WithArguments("System (net461)", "System.v5.0.5.0_silverlight.dll").WithLocation(1, 1), 2322Diagnostic(ErrorCode.ERR_MissingTypeInAssembly, "C.Goo").WithArguments("System.Runtime.Versioning.FrameworkName", "System").WithLocation(1, 52)); 3125Diagnostic(ErrorCode.ERR_AddModuleAssembly).WithArguments("<in-memory module>").WithLocation(1, 1)); 3146Diagnostic(ErrorCode.ERR_ImportNonAssembly).WithArguments("<in-memory assembly>").WithLocation(1, 1)); 3183Diagnostic(ErrorCode.ERR_ExpressionExpected, "").WithLocation(1, 7), 3186Diagnostic(ErrorCode.ERR_SemicolonExpected, "").WithLocation(1, 7)); 3214Diagnostic(ErrorCode.ERR_SemicolonExpected, "").WithLocation(1, 10)); 3229Diagnostic(ErrorCode.ERR_NoImplicitConv, "await System.Threading.Tasks.Task.FromResult(42)").WithArguments("int", "System.Threading.Tasks.Task<int>").WithLocation(1, 8)); 3240Diagnostic(ErrorCode.ERR_BadAsyncReturnExpression, "System.Threading.Tasks.Task.FromResult(42)").WithArguments("int", "System.Threading.Tasks.Task<int>").WithLocation(1, 8)); 3273Diagnostic(ErrorCode.WRN_UnreachableCode, "System").WithLocation(6, 1)); 3285Diagnostic(ErrorCode.WRN_UnreachableCode, "System").WithLocation(6, 1)); 3367Diagnostic(ErrorCode.ERR_NoImplicitConv, @"""Who returns a string?""").WithArguments("string", "int").WithLocation(1, 8), 3370Diagnostic(ErrorCode.WRN_UnreachableCode, "42").WithLocation(3, 1)); 3447Diagnostic(ErrorCode.ERR_DuplicateNameInNS, "C").WithArguments("C", "N").WithLocation(3, 8 + accessibility.Length)
Compilation\UsedAssembliesTests.cs (1)
225allocateOutput(input, ref output)[i] = old.WithLocation(old.LocationLine, old.LocationCharacter + 7);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (52)
LexicalAndXml\LexicalTests.cs (15)
274TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").WithLocation(1, 1)); 298TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").WithLocation(1, 1)); 322TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").WithLocation(1, 1)); 342TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").WithLocation(1, 1), 344TestBase.Diagnostic(ErrorCode.ERR_OpenEndedComment).WithLocation(1, 1)); 364TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").WithLocation(1, 1), 366TestBase.Diagnostic(ErrorCode.ERR_OpenEndedComment).WithLocation(1, 1)); 386TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").WithLocation(1, 1), 388TestBase.Diagnostic(ErrorCode.ERR_OpenEndedComment).WithLocation(1, 1)); 408TestBase.Diagnostic(ErrorCode.ERR_OpenEndedComment).WithLocation(1, 1)); 431TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").WithLocation(1, 1)); 456TestBase.Diagnostic(ErrorCode.ERR_ExpectedVerbatimLiteral).WithLocation(1, 1)); 483TestBase.Diagnostic(ErrorCode.ERR_ExpectedVerbatimLiteral).WithLocation(1, 1)); 517TestBase.Diagnostic(ErrorCode.ERR_ExpectedVerbatimLiteral).WithLocation(1, 1)); 575TestBase.Diagnostic(ErrorCode.ERR_ExpectedVerbatimLiteral).WithLocation(1, 1));
Parsing\StatementParsingTests.cs (4)
3465CSharpTestBase.Diagnostic(ErrorCode.ERR_SyntaxError, "if").WithArguments("when").WithLocation(7, 36)); 3535CSharpTestBase.Diagnostic(ErrorCode.ERR_CloseParenExpected, "").WithLocation(9, 10), 3538CSharpTestBase.Diagnostic(ErrorCode.ERR_SemicolonExpected, "").WithLocation(9, 10), 3541CSharpTestBase.Diagnostic(ErrorCode.ERR_RbraceExpected, "").WithLocation(9, 10));
Syntax\SyntaxNodeTests.cs (2)
364TestBase.Diagnostic(ErrorCode.ERR_BadDirectivePlacement, "#").WithLocation(1, 17), 367TestBase.Diagnostic(ErrorCode.ERR_EndifDirectiveExpected, "").WithLocation(1, 26));
Syntax\SyntaxTreeTests.cs (31)
367Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").WithLocation(1, 1), 370Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using ns1;").WithLocation(1, 1), 373Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").WithLocation(1, 14)); 436Diagnostic(ErrorCode.ERR_GlobalUsingInNamespace, "global").WithLocation(1, 16), 439Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").WithLocation(1, 16), 442Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using ns1;").WithLocation(1, 16), 445Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").WithLocation(1, 29)); 509Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").WithLocation(1, 1), 512Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using static ns1;").WithLocation(1, 1), 515Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").WithLocation(1, 21)); 580Diagnostic(ErrorCode.ERR_GlobalUsingInNamespace, "global").WithLocation(1, 16), 583Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").WithLocation(1, 16), 586Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using static ns1;").WithLocation(1, 16), 589Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").WithLocation(1, 36)); 661Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").WithLocation(1, 1), 664Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using alias = ns1;").WithLocation(1, 1), 667Diagnostic(ErrorCode.WRN_LowerCaseTypeName, "alias").WithArguments("alias").WithLocation(1, 14), 670Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").WithLocation(1, 22)); 749Diagnostic(ErrorCode.ERR_GlobalUsingInNamespace, "global").WithLocation(1, 16), 752Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").WithLocation(1, 16), 755Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using alias = ns1;").WithLocation(1, 16), 758Diagnostic(ErrorCode.WRN_LowerCaseTypeName, "alias").WithArguments("alias").WithLocation(1, 29), 761Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").WithLocation(1, 37)); 811Diagnostic(ErrorCode.ERR_UsingAfterElements, "global using ns1;").WithLocation(3, 1) 842Diagnostic(ErrorCode.ERR_ExternAfterElements, "extern").WithLocation(3, 1) 876Diagnostic(ErrorCode.ERR_UsingAfterElements, "global using ns1;").WithLocation(5, 5) 951Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "d").WithLocation(1, 1) 978Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "d").WithLocation(1, 1) 1006Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "p").WithLocation(1, 12) 1042Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "p").WithLocation(1, 19) 1083Diagnostic(ErrorCode.ERR_UsingAfterElements, "global using ns1;").WithLocation(3, 1)
Microsoft.CodeAnalysis.Test.Utilities (62)
Diagnostics\SuppressMessageAttributeTests.cs (62)
498Diagnostic("Token", "{").WithLocation(4, 1), 499Diagnostic("Token", "class").WithLocation(7, 9), 500Diagnostic("Token", "C").WithLocation(7, 15), 501Diagnostic("Token", "{").WithLocation(7, 17), 502Diagnostic("Token", "}").WithLocation(7, 18), 503Diagnostic("Token", "}").WithLocation(9, 1)); 520Diagnostic("Token", "{").WithLocation(4, 1), 521Diagnostic("Token", "}").WithLocation(9, 1)); 537Diagnostic("Token", "A").WithLocation(3, 11), 538Diagnostic("Token", "Class").WithLocation(5, 9), 539Diagnostic("Token", "C").WithLocation(5, 15), 540Diagnostic("Token", "End").WithLocation(6, 9), 541Diagnostic("Token", "Class").WithLocation(6, 13), 542Diagnostic("Token", "End").WithLocation(8, 1)); 558Diagnostic("Token", "A").WithLocation(3, 11), 559Diagnostic("Token", "End").WithLocation(8, 1)); 573diagnostics: Diagnostic("Comment", "' In root namespace").WithLocation(3, 1)); 601Diagnostic("Token", "{").WithLocation(5, 1), 602Diagnostic("Token", "}").WithLocation(20, 1)); 638Diagnostic("Token", "N").WithLocation(4, 11), 639Diagnostic("Token", "End").WithLocation(28, 1)); 759Diagnostic("Token", "{").WithLocation(5, 5), 760Diagnostic("Token", "remove").WithLocation(8, 9)); 799Diagnostic("Token", "}").WithLocation(6, 14), 800Diagnostic("Token", "}").WithLocation(9, 5)); 866Diagnostic("Token", "{").WithLocation(5, 1), 867Diagnostic("Token", "}").WithLocation(15, 1)); 892Diagnostic("Token", "C").WithLocation(4, 7), 893Diagnostic("Token", "End").WithLocation(17, 1)); 912Diagnostic("Token", "{").WithLocation(6, 5), 913Diagnostic("Token", "set").WithLocation(9, 9)); 934Diagnostic("Token", "Integer").WithLocation(4, 28), 935Diagnostic("Token", "Set").WithLocation(9, 9)); 954Diagnostic("Token", "{").WithLocation(6, 5), 955Diagnostic("Token", "set").WithLocation(9, 9)); 976Diagnostic("Token", "Get").WithLocation(7, 13), 977Diagnostic("Token", "End").WithLocation(12, 5)); 996Diagnostic("Token", ";").WithLocation(4, 10), 997Diagnostic("Token", "}").WithLocation(11, 1)); 1016Diagnostic("Token", "{").WithLocation(6, 5), 1017Diagnostic("Token", "set").WithLocation(9, 9)); 1036Diagnostic("Token", "}").WithLocation(7, 25), 1037Diagnostic("Token", "}").WithLocation(10, 5)); 1056Diagnostic("Token", "{").WithLocation(5, 1), 1057Diagnostic("Token", "}").WithLocation(11, 1)); 1077Diagnostic("Token", "C").WithLocation(4, 26), 1078Diagnostic("Token", "End").WithLocation(12, 1)); 1095Diagnostic("Token", "{").WithLocation(3, 1), 1096Diagnostic("Token", "}").WithLocation(9, 1)); 1111Diagnostic("Token", "C").WithLocation(2, 7), 1112Diagnostic("Token", "End").WithLocation(7, 1)); 1131Diagnostic("Token", "{").WithLocation(8, 1), 1132Diagnostic("Token", "}").WithLocation(11, 1)); 1146Diagnostic("Token", "C").WithLocation(2, 7), 1147Diagnostic("Token", "End").WithLocation(6, 1)); 1161Diagnostic("Token", "{").WithLocation(3, 1), 1162Diagnostic("Token", "}").WithLocation(6, 1)); 1181Diagnostic("Token", "{").WithLocation(3, 1), 1182Diagnostic("Token", "}").WithLocation(11, 1)); 1198Diagnostic("Token", "C").WithLocation(2, 7), 1199Diagnostic("Token", "End").WithLocation(8, 1)); 1359Diagnostic("TypeDeclaration", "C").WithLocation(9, 7));
Microsoft.CodeAnalysis.UnitTests (10)
Analyzers\AnalyzerConfigTests.cs (8)
1756Diagnostic("MultipleGlobalAnalyzerKeys").WithArguments("option1", "Global Section", "/.globalconfig1, /.globalconfig2").WithLocation(1, 1) 1777Diagnostic("MultipleGlobalAnalyzerKeys").WithArguments("option1", "/path/to/file1.cs", "/.globalconfig1, /.globalconfig2").WithLocation(1, 1) 1966Diagnostic("MultipleGlobalAnalyzerKeys").WithArguments("option1", "/path/to/file1.cs", "/.globalconfig1, /.globalconfig2").WithLocation(1, 1) 1985Diagnostic("MultipleGlobalAnalyzerKeys").WithArguments("option1", "Global Section", "/.globalconfig1, /.globalconfig2").WithLocation(1, 1) 2077Diagnostic("InvalidSeverityInAnalyzerConfig").WithArguments("cs000", "foo", "<Global Config>").WithLocation(1, 1) 2081Diagnostic("InvalidSeverityInAnalyzerConfig").WithArguments("cs001", "bar", "<Global Config>").WithLocation(1, 1) 2293Diagnostic("InvalidGlobalSectionName", isSuppressed: false).WithArguments(sectionName, "/.editorconfig").WithLocation(1, 1) 2545Diagnostic("MultipleGlobalAnalyzerKeys").WithArguments("option1", "Global Section", "/.globalconfig3, /.globalconfig4").WithLocation(1, 1)
Diagnostics\SuppressMessageAttributeCompilerTests.cs (2)
101var baseDiagnostic = Diagnostic("AD0001", null).WithLocation(1, 1); 169.WithLocation(1, 1);
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (6)
Parser\ParseDirectives.vb (6)
3216New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).WithLocation(10, 15)) 3222New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).WithLocation(10, 15).WithWarningAsError(True)) 3231New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).WithLocation(10, 15).WithWarningAsError(True)) 3323New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).WithLocation(10, 15)) 3329New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).WithLocation(10, 15).WithWarningAsError(True)) 3338New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).WithLocation(10, 15).WithWarningAsError(True))