From ba2d46382afa2bb1a2594d4f6869c9453fe7f51d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Hellander?= Date: Sun, 19 Apr 2026 12:29:55 +0200 Subject: [PATCH 1/2] Upgrade xunit to version 2.9.3 --- .../SA1649CSharp10UnitTests.cs | 2 +- .../LayoutRules/SA1516CSharp10UnitTests.cs | 14 +- .../SA1402ForClassCSharp10UnitTests.cs | 2 +- .../NamingRules/SA1300CSharp10UnitTests.cs | 10 +- .../NamingRules/SA1313CSharp10UnitTests.cs | 2 +- .../OrderingRules/SA1200CSharp10UnitTests.cs | 6 +- ...SA1200OutsideNamespaceCSharp10UnitTests.cs | 4 +- .../SA1200PreserveCSharp10UnitTests.cs | 6 +- .../OrderingRules/SA1201CSharp10UnitTests.cs | 12 +- .../OrderingRules/SA1202CSharp10UnitTests.cs | 4 +- .../OrderingRules/SA1204CSharp10UnitTests.cs | 2 +- .../OrderingRules/SA1208CSharp10UnitTests.cs | 2 +- .../OrderingRules/SA1209CSharp10UnitTests.cs | 2 +- .../OrderingRules/SA1210CSharp10UnitTests.cs | 2 +- ...mbinedSystemDirectivesCSharp10UnitTests.cs | 2 +- .../OrderingRules/SA1211CSharp10UnitTests.cs | 2 +- .../OrderingRules/SA1216CSharp10UnitTests.cs | 2 +- .../OrderingRules/SA1217CSharp10UnitTests.cs | 2 +- .../SA1101CSharp10UnitTests.cs | 2 +- .../SA1121CSharp10UnitTests.cs | 2 +- .../SA1129CSharp10UnitTests.cs | 4 +- .../SA1135CSharp10UnitTests.cs | 4 +- .../SA1137CSharp10UnitTests.cs | 2 +- .../SpacingRules/SA1015CSharp10UnitTests.cs | 2 +- .../StyleCop.Analyzers.Test.CSharp10.csproj | 2 +- .../SA1648CSharp11UnitTests.cs | 2 +- .../SA1400CSharp11UnitTests.cs | 2 +- .../SA1402ForClassCSharp11UnitTests.cs | 2 +- .../SA1402ForDelegateCSharp11UnitTests.cs | 2 +- .../SA1402ForEnumCSharp11UnitTests.cs | 2 +- .../SA1402ForInterfaceCSharp11UnitTests.cs | 2 +- .../SA1402ForRecordCSharp11UnitTests.cs | 2 +- .../SA1402ForRecordClassCSharp11UnitTests.cs | 2 +- .../SA1402ForRecordStructCSharp11UnitTests.cs | 2 +- .../SA1402ForStructCSharp11UnitTests.cs | 2 +- .../SA1404CSharp11UnitTests.cs | 2 +- .../SA1206CodeFixProviderCSharp11UnitTests.cs | 4 +- .../SA1121CSharp11UnitTests.cs | 2 +- .../SpacingRules/SA1000CSharp11UnitTests.cs | 2 +- .../SpacingRules/SA1003CSharp11UnitTests.cs | 4 +- .../SpacingRules/SA1010CSharp11UnitTests.cs | 2 +- .../SpacingRules/SA1011CSharp11UnitTests.cs | 2 +- .../SpacingRules/SA1012CSharp11UnitTests.cs | 2 +- .../SpacingRules/SA1015CSharp11UnitTests.cs | 2 +- .../StyleCop.Analyzers.Test.CSharp11.csproj | 2 +- .../SA1611CSharp12UnitTests.cs | 12 +- .../LayoutRules/SA1513CSharp12UnitTests.cs | 2 +- .../LayoutRules/SA1515CSharp12UnitTests.cs | 2 +- .../SA1413CSharp12UnitTests.cs | 4 +- .../SA1118CSharp12UnitTests.cs | 2 +- .../SA1135CSharp12UnitTests.cs | 4 +- .../SA1137CSharp12UnitTests.cs | 6 +- .../SpacingRules/SA1004CSharp12UnitTests.cs | 2 +- .../SpacingRules/SA1008CSharp12UnitTests.cs | 6 +- .../SpacingRules/SA1010CSharp12UnitTests.cs | 2 +- .../SpacingRules/SA1015CSharp12UnitTests.cs | 2 +- .../StyleCop.Analyzers.Test.CSharp12.csproj | 2 +- .../StyleCop.Analyzers.Test.CSharp13.csproj | 2 +- .../SA1600CSharp14UnitTests.cs | 2 +- .../SA1611CSharp14UnitTests.cs | 2 +- .../SA1618CSharp14UnitTests.cs | 6 +- .../SA1619CSharp14UnitTests.cs | 6 +- .../LayoutRules/SA1500CSharp14UnitTests.cs | 4 +- .../LayoutRules/SA1502CSharp14UnitTests.cs | 2 +- .../LayoutRules/SA1505CSharp14UnitTests.cs | 2 +- .../LayoutRules/SA1507CSharp14UnitTests.cs | 2 +- .../LayoutRules/SA1508CSharp14UnitTests.cs | 2 +- .../LayoutRules/SA1509CSharp14UnitTests.cs | 2 +- .../LayoutRules/SA1513CSharp14UnitTests.cs | 4 +- .../LayoutRules/SA1515CSharp14UnitTests.cs | 2 +- .../LayoutRules/SA1516CSharp14UnitTests.cs | 4 +- .../SA1400CSharp14UnitTests.cs | 2 +- .../NamingRules/SA1313CSharp14UnitTests.cs | 4 +- .../NamingRules/SA1314CSharp14UnitTests.cs | 2 +- .../OrderingRules/SA1201CSharp14UnitTests.cs | 8 +- .../OrderingRules/SA1202CSharp14UnitTests.cs | 10 +- .../SA1101CSharp14UnitTests.cs | 4 +- .../SA1106CSharp14UnitTests.cs | 2 +- .../SA1110CSharp14UnitTests.cs | 2 +- .../SA1111CSharp14UnitTests.cs | 4 +- .../SA1137CSharp14UnitTests.cs | 4 +- .../SpacingRules/SA1000CSharp14UnitTests.cs | 2 +- .../SpacingRules/SA1008CSharp14UnitTests.cs | 4 +- .../SpacingRules/SA1009CSharp14UnitTests.cs | 2 +- .../SpacingRules/SA1014CSharp14UnitTests.cs | 4 +- .../SpacingRules/SA1015CSharp14UnitTests.cs | 4 +- .../StyleCop.Analyzers.Test.CSharp14.csproj | 2 +- .../SA1600CSharp7UnitTests.cs | 44 +-- .../SA1623CSharp7UnitTests.cs | 2 +- .../SA1624CSharp7UnitTests.cs | 2 +- .../LayoutRules/SA1500CSharp7UnitTests.cs | 10 +- .../LayoutRules/SA1502CSharp7UnitTests.cs | 20 +- .../LayoutRules/SA1505CSharp7UnitTests.cs | 8 +- .../LayoutRules/SA1508CSharp7UnitTests.cs | 8 +- .../LayoutRules/SA1509CSharp7UnitTests.cs | 8 +- .../LayoutRules/SA1513CSharp7UnitTests.cs | 8 +- .../LayoutRules/SA1515CSharp7UnitTests.cs | 8 +- .../SA1119CSharp7UnitTests.cs | 8 +- .../SA1400CSharp7UnitTests.cs | 2 +- .../SA1408CSharp7UnitTests.cs | 2 +- .../SA1413CSharp7UnitTests.cs | 4 +- .../SA1414CSharp7UnitTests.cs | 10 +- .../NamingRules/SA1300CSharp7UnitTests.cs | 6 +- .../NamingRules/SA1305CSharp7UnitTests.cs | 6 +- .../NamingRules/SA1312CSharp7UnitTests.cs | 28 +- .../NamingRules/SA1316CSharp7UnitTests.cs | 64 +-- .../OrderingRules/SA1206CSharp7UnitTests.cs | 4 +- .../OrderingRules/SA1207CSharp7UnitTests.cs | 2 +- .../SA1101CSharp7UnitTests.cs | 8 +- .../SA1110CSharp7UnitTests.cs | 4 +- .../SA1111CSharp7UnitTests.cs | 8 +- .../SA1112CSharp7UnitTests.cs | 6 +- .../SA1113CSharp7UnitTests.cs | 6 +- .../SA1114CSharp7UnitTests.cs | 8 +- .../SA1115CSharp7UnitTests.cs | 6 +- .../SA1116CSharp7UnitTests.cs | 4 +- .../SA1117CSharp7UnitTests.cs | 6 +- .../SA1122CSharp7UnitTests.cs | 4 +- .../SA1125CSharp7UnitTests.cs | 26 +- .../SA1127CSharp7UnitTests.cs | 12 +- .../SA1130CSharp7UnitTests.cs | 2 +- .../SA1131CSharp7UnitTests.cs | 2 +- .../SA1135CSharp7UnitTests.cs | 4 +- .../SA1137CSharp7UnitTests.cs | 8 +- .../SA1139CSharp7UnitTests.cs | 12 +- .../SA1141CSharp7UnitTests.cs | 18 +- .../SA1142CSharp7UnitTests.cs | 4 +- .../SpacingRules/SA1000CSharp7UnitTests.cs | 26 +- .../SpacingRules/SA1001CSharp7UnitTests.cs | 10 +- .../SpacingRules/SA1002CSharp7UnitTests.cs | 4 +- .../SpacingRules/SA1003CSharp7UnitTests.cs | 2 +- .../SpacingRules/SA1008CSharp7UnitTests.cs | 30 +- .../SpacingRules/SA1009CSharp7UnitTests.cs | 28 +- .../SpacingRules/SA1010CSharp7UnitTests.cs | 4 +- .../SpacingRules/SA1011CSharp7UnitTests.cs | 6 +- .../SpacingRules/SA1012CSharp7UnitTests.cs | 4 +- .../SpacingRules/SA1013CSharp7UnitTests.cs | 6 +- .../SpacingRules/SA1015CSharp7UnitTests.cs | 4 +- .../SpacingRules/SA1018CSharp7UnitTests.cs | 2 +- .../SpacingRules/SA1024CSharp7UnitTests.cs | 4 +- .../SpacingRules/SA1026CSharp7UnitTests.cs | 2 +- .../StyleCop.Analyzers.Test.CSharp7.csproj | 2 +- .../SA1648CSharp8UnitTests.cs | 2 +- .../LayoutRules/SA1503CSharp8UnitTests.cs | 2 +- .../LayoutRules/SA1514CSharp8UnitTests.cs | 2 +- .../SA1119CSharp8UnitTests.cs | 22 +- .../SA1413CSharp8UnitTests.cs | 2 +- .../OrderingRules/SA1202CSharp8UnitTests.cs | 2 +- .../SA1101CSharp8UnitTests.cs | 2 +- .../SA1106CSharp8UnitTests.cs | 2 +- .../SA1122CSharp8UnitTests.cs | 6 +- .../SA1135CSharp8UnitTests.cs | 2 +- .../Settings/SettingsCSharp8UnitTests.cs | 16 +- .../SpacingRules/SA1002CSharp8UnitTests.cs | 2 +- .../SpacingRules/SA1003CSharp8UnitTests.cs | 12 +- .../SpacingRules/SA1008CSharp8UnitTests.cs | 10 +- .../SpacingRules/SA1009CSharp8UnitTests.cs | 10 +- .../SpacingRules/SA1011CSharp8UnitTests.cs | 8 +- .../SpacingRules/SA1012CSharp8UnitTests.cs | 2 +- .../SpacingRules/SA1013CSharp8UnitTests.cs | 4 +- .../SpacingRules/SA1015CSharp8UnitTests.cs | 2 +- .../SpacingRules/SA1019CSharp8UnitTests.cs | 2 +- .../SpacingRules/SA1023CSharp8UnitTests.cs | 2 +- .../SpacingRules/SA1024CSharp8UnitTests.cs | 2 +- .../StyleCop.Analyzers.Test.CSharp8.csproj | 2 +- .../SA1611CSharp9UnitTests.cs | 4 +- .../LayoutRules/SA1500CSharp9UnitTests.cs | 10 +- .../LayoutRules/SA1502CSharp9UnitTests.cs | 8 +- .../LayoutRules/SA1505CSharp9UnitTests.cs | 2 +- .../LayoutRules/SA1508CSharp9UnitTests.cs | 8 +- .../LayoutRules/SA1509CSharp9UnitTests.cs | 2 +- .../LayoutRules/SA1513CSharp9UnitTests.cs | 4 +- .../LayoutRules/SA1516CSharp9UnitTests.cs | 8 +- .../SA1119CSharp9UnitTests.cs | 8 +- .../SA1413CSharp9UnitTests.cs | 2 +- .../NamingRules/SA1300CSharp9UnitTests.cs | 4 +- .../NamingRules/SA1313CSharp9UnitTests.cs | 2 +- .../OrderingRules/SA1200CSharp9UnitTests.cs | 2 +- .../SA1200OutsideNamespaceCSharp9UnitTests.cs | 2 +- .../SA1200PreserveCSharp9UnitTests.cs | 2 +- .../OrderingRules/SA1201CSharp9UnitTests.cs | 12 +- .../OrderingRules/SA1212CSharp9UnitTests.cs | 4 +- .../SA1101CSharp9UnitTests.cs | 2 +- .../SA1106CSharp9UnitTests.cs | 2 +- .../SA1110CSharp9UnitTests.cs | 10 +- .../SA1111CSharp9UnitTests.cs | 8 +- .../SA1116CSharp9UnitTests.cs | 2 +- .../SA1117CSharp9UnitTests.cs | 4 +- .../SA1118CSharp9UnitTests.cs | 6 +- .../SA1129CSharp9UnitTests.cs | 2 +- .../SA1137CSharp9UnitTests.cs | 2 +- .../SpacingRules/SA1000CSharp9UnitTests.cs | 10 +- .../SpacingRules/SA1008CSharp9UnitTests.cs | 6 +- .../SpacingRules/SA1009CSharp9UnitTests.cs | 2 +- .../SpacingRules/SA1011CSharp9UnitTests.cs | 2 +- .../SpacingRules/SA1012CSharp9UnitTests.cs | 6 +- .../SpacingRules/SA1023CSharp9UnitTests.cs | 4 +- .../SpacingRules/SA1024CSharp9UnitTests.cs | 2 +- .../StyleCop.Analyzers.Test.CSharp9.csproj | 2 +- .../AnalyzerConfigurationUnitTests.cs | 2 +- .../AnalyzerExtensionsTests.cs | 2 +- .../DocumentationRules/FileHeaderTestBase.cs | 6 +- .../InheritdocCodeFixProviderUnitTests.cs | 8 +- .../NoXmlFileHeaderUnitTests.cs | 26 +- .../DocumentationRules/SA1600UnitTests.cs | 368 +++++++++--------- .../DocumentationRules/SA1601UnitTests.cs | 20 +- .../DocumentationRules/SA1602UnitTests.cs | 8 +- .../DocumentationRules/SA1604UnitTests.cs | 92 ++--- .../DocumentationRules/SA1605UnitTests.cs | 34 +- .../DocumentationRules/SA1606UnitTests.cs | 94 ++--- .../DocumentationRules/SA1607UnitTests.cs | 44 +-- .../DocumentationRules/SA1608UnitTests.cs | 32 +- .../DocumentationRules/SA1609UnitTests.cs | 26 +- .../DocumentationRules/SA1610UnitTests.cs | 28 +- .../DocumentationRules/SA1611UnitTests.cs | 32 +- .../DocumentationRules/SA1612UnitTests.cs | 50 +-- .../DocumentationRules/SA1613UnitTests.cs | 20 +- .../DocumentationRules/SA1614UnitTests.cs | 22 +- .../DocumentationRules/SA1615UnitTests.cs | 24 +- .../DocumentationRules/SA1616UnitTests.cs | 38 +- .../DocumentationRules/SA1617UnitTests.cs | 24 +- .../DocumentationRules/SA1618UnitTests.cs | 44 +-- .../DocumentationRules/SA1619UnitTests.cs | 30 +- .../DocumentationRules/SA1620UnitTests.cs | 56 +-- .../DocumentationRules/SA1621UnitTests.cs | 30 +- .../DocumentationRules/SA1622UnitTests.cs | 26 +- .../DocumentationRules/SA1623UnitTests.cs | 16 +- .../DocumentationRules/SA1624UnitTests.cs | 10 +- .../DocumentationRules/SA1625UnitTests.cs | 46 +-- .../DocumentationRules/SA1626UnitTests.cs | 12 +- .../DocumentationRules/SA1627UnitTests.cs | 20 +- .../DocumentationRules/SA1629UnitTests.cs | 52 +-- .../DocumentationRules/SA1633UnitTests.cs | 32 +- .../DocumentationRules/SA1634UnitTests.cs | 20 +- .../DocumentationRules/SA1635UnitTests.cs | 4 +- .../DocumentationRules/SA1636UnitTests.cs | 28 +- .../DocumentationRules/SA1637UnitTests.cs | 2 +- .../DocumentationRules/SA1638UnitTests.cs | 4 +- .../DocumentationRules/SA1639UnitTests.cs | 6 +- .../DocumentationRules/SA1640UnitTests.cs | 6 +- .../DocumentationRules/SA1641UnitTests.cs | 4 +- .../DocumentationRules/SA1642UnitTests.cs | 116 +++--- .../DocumentationRules/SA1643UnitTests.cs | 28 +- .../DocumentationRules/SA1648UnitTests.cs | 46 +-- .../DocumentationRules/SA1649UnitTests.cs | 50 +-- .../DocumentationRules/SA1651UnitTests.cs | 20 +- .../StyleCop.Analyzers.Test/ExclusionTests.cs | 4 +- .../HelperTests/IndentationHelperTests.cs | 8 +- .../SA1500UnitTests.ArrayInitializers.cs | 10 +- .../SA1500/SA1500UnitTests.Blocks.cs | 4 +- .../SA1500/SA1500UnitTests.Constructors.cs | 4 +- .../SA1500/SA1500UnitTests.DataTypes.cs | 4 +- .../SA1500/SA1500UnitTests.Delegates.cs | 4 +- .../SA1500/SA1500UnitTests.Destructors.cs | 4 +- .../SA1500/SA1500UnitTests.DoWhiles.cs | 10 +- .../SA1500/SA1500UnitTests.Enums.cs | 4 +- .../SA1500/SA1500UnitTests.Events.cs | 4 +- .../LayoutRules/SA1500/SA1500UnitTests.Ifs.cs | 8 +- .../SA1500/SA1500UnitTests.Indexers.cs | 4 +- .../SA1500/SA1500UnitTests.Interfaces.cs | 4 +- .../SA1500UnitTests.LambdaExpressions.cs | 4 +- .../SA1500/SA1500UnitTests.Methods.cs | 4 +- .../SA1500/SA1500UnitTests.Namespaces.cs | 6 +- .../SA1500UnitTests.ObjectInitializers.cs | 6 +- .../SA1500/SA1500UnitTests.Properties.cs | 10 +- .../SA1500/SA1500UnitTests.StatementBlocks.cs | 4 +- .../SA1500/SA1500UnitTests.Switches.cs | 4 +- .../SA1500UnitTests.TryCatchFinallys.cs | 4 +- .../LayoutRules/SA1500/SA1500UnitTests.cs | 2 +- .../LayoutRules/SA1501UnitTests.cs | 56 +-- .../SA1502/SA1502UnitTests.Constructors.cs | 18 +- .../SA1502/SA1502UnitTests.Destructors.cs | 18 +- .../SA1502/SA1502UnitTests.Enums.cs | 20 +- .../SA1502/SA1502UnitTests.Events.cs | 14 +- .../SA1502/SA1502UnitTests.Indexers.cs | 16 +- .../SA1502/SA1502UnitTests.Interfaces.cs | 20 +- .../SA1502/SA1502UnitTests.Methods.cs | 20 +- .../SA1502/SA1502UnitTests.Namespaces.cs | 18 +- .../SA1502/SA1502UnitTests.Operators.cs | 8 +- .../SA1502/SA1502UnitTests.Properties.cs | 16 +- .../SA1502UnitTests.TypeDeclarations.cs | 20 +- .../LayoutRules/SA1503UnitTests.cs | 34 +- .../LayoutRules/SA1504UnitTests.cs | 26 +- .../LayoutRules/SA1505UnitTests.cs | 48 +-- .../LayoutRules/SA1506UnitTests.cs | 38 +- .../LayoutRules/SA1507UnitTests.cs | 18 +- .../LayoutRules/SA1508UnitTests.cs | 46 +-- .../LayoutRules/SA1509UnitTests.cs | 70 ++-- .../LayoutRules/SA1510UnitTests.cs | 6 +- .../LayoutRules/SA1511UnitTests.cs | 4 +- .../LayoutRules/SA1512UnitTests.cs | 20 +- .../LayoutRules/SA1513UnitTests.cs | 22 +- .../LayoutRules/SA1514UnitTests.cs | 62 +-- .../LayoutRules/SA1515UnitTests.cs | 22 +- .../LayoutRules/SA1516UnitTests.cs | 32 +- .../LayoutRules/SA1516UsingGroupsUnitTests.cs | 12 +- .../LayoutRules/SA1517UnitTests.cs | 20 +- .../LayoutRules/SA1518UnitTests.cs | 48 +-- .../LayoutRules/SA1519UnitTests.cs | 50 +-- .../LayoutRules/SA1520UnitTests.cs | 26 +- .../DebugMessagesUnitTestsBase.cs | 50 +-- .../FileMayOnlyContainTestBase.cs | 38 +- .../MaintainabilityRules/SA1119UnitTests.cs | 134 +++---- .../MaintainabilityRules/SA1400UnitTests.cs | 156 ++++---- .../MaintainabilityRules/SA1401UnitTests.cs | 12 +- .../SA1402ForBlockDeclarationUnitTestsBase.cs | 160 ++++---- .../SA1402ForDelegateUnitTests.cs | 14 +- .../SA1402ForEnumUnitTests.cs | 12 +- .../MaintainabilityRules/SA1403UnitTests.cs | 2 +- .../MaintainabilityRules/SA1404UnitTests.cs | 30 +- .../MaintainabilityRules/SA1405UnitTests.cs | 4 +- .../MaintainabilityRules/SA1406UnitTests.cs | 2 +- .../MaintainabilityRules/SA1407UnitTests.cs | 20 +- .../MaintainabilityRules/SA1408UnitTests.cs | 20 +- .../MaintainabilityRules/SA1410UnitTests.cs | 14 +- .../MaintainabilityRules/SA1411UnitTests.cs | 16 +- .../MaintainabilityRules/SA1412UnitTests.cs | 10 +- .../MaintainabilityRules/SA1413UnitTests.cs | 32 +- .../NamingRules/SA1300UnitTests.cs | 104 ++--- .../NamingRules/SA1302UnitTests.cs | 30 +- .../NamingRules/SA1303UnitTests.cs | 24 +- .../NamingRules/SA1304UnitTests.cs | 24 +- .../NamingRules/SA1305UnitTests.cs | 60 +-- .../NamingRules/SA1306UnitTests.cs | 24 +- .../NamingRules/SA1307UnitTests.cs | 14 +- .../NamingRules/SA1308UnitTests.cs | 26 +- .../NamingRules/SA1309UnitTests.cs | 18 +- .../NamingRules/SA1310UnitTests.cs | 14 +- .../NamingRules/SA1311UnitTests.cs | 18 +- .../NamingRules/SA1312UnitTests.cs | 40 +- .../NamingRules/SA1313UnitTests.cs | 56 +-- .../NamingRules/SA1314UnitTests.cs | 22 +- .../NamingRules/SX1309SUnitTests.cs | 12 +- .../NamingRules/SX1309UnitTests.cs | 12 +- .../SA1200OutsideNamespaceUnitTests.cs | 18 +- .../OrderingRules/SA1200PreserveUnitTests.cs | 8 +- .../OrderingRules/SA1200UnitTests.cs | 22 +- .../OrderingRules/SA1201UnitTests.cs | 26 +- .../OrderingRules/SA1202UnitTests.cs | 58 +-- .../OrderingRules/SA1203UnitTests.cs | 22 +- .../OrderingRules/SA1204UnitTests.cs | 32 +- .../OrderingRules/SA1205UnitTests.cs | 14 +- .../SA1206CodeFixProviderUnitTests.cs | 26 +- .../OrderingRules/SA1206UnitTests.cs | 20 +- .../OrderingRules/SA1207UnitTests.cs | 4 +- .../OrderingRules/SA1208UnitTests.cs | 30 +- .../OrderingRules/SA1209UnitTests.cs | 18 +- ...SA1210CombinedSystemDirectivesUnitTests.cs | 12 +- .../OrderingRules/SA1210UnitTests.cs | 28 +- .../OrderingRules/SA1211UnitTests.cs | 12 +- .../OrderingRules/SA1212UnitTests.cs | 28 +- .../OrderingRules/SA1213UnitTests.cs | 14 +- .../OrderingRules/SA1214UnitTests.cs | 20 +- .../OrderingRules/SA1215UnitTests.cs | 12 +- .../OrderingRules/SA1216UnitTests.cs | 10 +- .../OrderingRules/SA1217UnitTests.cs | 18 +- ...oviderCombinedSystemDirectivesUnitTests.cs | 16 +- ...CodeFixProviderGroupSeparationUnitTests.cs | 4 +- ...UsingCodeFixProviderRegressionUnitTests.cs | 4 +- .../UsingCodeFixProviderUnitTests.cs | 24 +- .../ReadabilityRules/SA1100UnitTests.cs | 56 +-- .../ReadabilityRules/SA1101UnitTests.cs | 26 +- .../ReadabilityRules/SA1102UnitTests.cs | 8 +- .../ReadabilityRules/SA1103UnitTests.cs | 16 +- .../ReadabilityRules/SA1104UnitTests.cs | 8 +- .../ReadabilityRules/SA1105UnitTests.cs | 8 +- .../ReadabilityRules/SA1106UnitTests.cs | 26 +- .../ReadabilityRules/SA1107UnitTests.cs | 10 +- .../ReadabilityRules/SA1108UnitTests.cs | 36 +- .../ReadabilityRules/SA1110UnitTests.cs | 84 ++-- .../ReadabilityRules/SA1111UnitTests.cs | 122 +++--- .../ReadabilityRules/SA1112UnitTests.cs | 30 +- .../ReadabilityRules/SA1113UnitTests.cs | 92 ++--- .../ReadabilityRules/SA1114UnitTests.cs | 118 +++--- .../ReadabilityRules/SA1115UnitTests.cs | 120 +++--- .../ReadabilityRules/SA1116UnitTests.cs | 18 +- .../ReadabilityRules/SA1117UnitTests.cs | 16 +- .../ReadabilityRules/SA1118UnitTests.cs | 32 +- .../ReadabilityRules/SA1120UnitTests.cs | 30 +- .../ReadabilityRules/SA1121UnitTests.cs | 60 +-- .../ReadabilityRules/SA1122UnitTests.cs | 32 +- .../ReadabilityRules/SA1123UnitTests.cs | 16 +- .../ReadabilityRules/SA1124UnitTests.cs | 14 +- .../ReadabilityRules/SA1125UnitTests.cs | 34 +- .../ReadabilityRules/SA1127UnitTests.cs | 32 +- .../ReadabilityRules/SA1128UnitTests.cs | 12 +- .../ReadabilityRules/SA1129UnitTests.cs | 28 +- .../ReadabilityRules/SA1130UnitTests.cs | 48 +-- .../ReadabilityRules/SA1131UnitTests.cs | 38 +- .../ReadabilityRules/SA1132UnitTests.cs | 14 +- .../ReadabilityRules/SA1133UnitTests.cs | 18 +- .../ReadabilityRules/SA1134UnitTests.cs | 20 +- .../ReadabilityRules/SA1135UnitTests.cs | 62 +-- .../ReadabilityRules/SA1136UnitTests.cs | 10 +- .../ReadabilityRules/SA1137UnitTests.cs | 56 +-- .../ReadabilityRules/SA1139UnitTests.cs | 14 +- .../ReadabilityRules/SA1141UnitTests.cs | 2 +- .../ReadabilityRules/SX1101UnitTests.cs | 22 +- .../SequentialTestCollection.cs | 2 +- .../SettingsFileCodeFixProviderUnitTests.cs | 8 +- .../Settings/SettingsUnitTests.cs | 26 +- .../SpacingRules/NumberSignSpacingTestBase.cs | 64 +-- .../SpacingRules/SA1000UnitTests.cs | 202 +++++----- .../SpacingRules/SA1001UnitTests.cs | 60 +-- .../SpacingRules/SA1002UnitTests.cs | 28 +- .../SpacingRules/SA1003UnitTests.cs | 50 +-- .../SpacingRules/SA1004UnitTests.cs | 12 +- .../SpacingRules/SA1005UnitTests.cs | 26 +- .../SpacingRules/SA1006UnitTests.cs | 6 +- .../SpacingRules/SA1007UnitTests.cs | 4 +- .../SpacingRules/SA1008UnitTests.cs | 76 ++-- .../SpacingRules/SA1009UnitTests.cs | 82 ++-- .../SpacingRules/SA1010UnitTests.cs | 14 +- .../SpacingRules/SA1011UnitTests.cs | 26 +- .../SpacingRules/SA1012UnitTests.cs | 12 +- .../SpacingRules/SA1013UnitTests.cs | 24 +- .../SpacingRules/SA1014UnitTests.cs | 12 +- .../SpacingRules/SA1015UnitTests.cs | 24 +- .../SpacingRules/SA1016UnitTests.cs | 4 +- .../SpacingRules/SA1017UnitTests.cs | 6 +- .../SpacingRules/SA1018UnitTests.cs | 4 +- .../SpacingRules/SA1019UnitTests.cs | 22 +- .../SpacingRules/SA1020UnitTests.cs | 4 +- .../SpacingRules/SA1023UnitTests.cs | 8 +- .../SpacingRules/SA1024UnitTests.cs | 12 +- .../SpacingRules/SA1025UnitTests.cs | 36 +- .../SpacingRules/SA1026UnitTests.cs | 4 +- .../SA1027AlternateIndentationUnitTests.cs | 12 +- .../SpacingRules/SA1027UnitTests.cs | 12 +- .../SpacingRules/SA1027UseTabsUnitTests.cs | 12 +- .../SpacingRules/SA1028UnitTests.cs | 26 +- .../SpecialRules/SA0001UnitTests.cs | 4 +- .../SpecialRules/SA0002UnitTests.cs | 32 +- .../StyleCop.Analyzers.Test.csproj | 2 +- .../Verifiers/DiagnosticVerifierTests.cs | 32 +- 435 files changed, 3938 insertions(+), 3938 deletions(-) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/DocumentationRules/SA1649CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/DocumentationRules/SA1649CSharp10UnitTests.cs index c15caf911..02854541d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/DocumentationRules/SA1649CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/DocumentationRules/SA1649CSharp10UnitTests.cs @@ -45,7 +45,7 @@ public enum IgnoredEnum {{ }} "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("TestType2.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType.cs", fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("TestType2.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType.cs", fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/LayoutRules/SA1516CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/LayoutRules/SA1516CSharp10UnitTests.cs index 8a8513429..a722bec93 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/LayoutRules/SA1516CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/LayoutRules/SA1516CSharp10UnitTests.cs @@ -38,7 +38,7 @@ public async Task TestThatDiagnosticIIsReportedOnUsingsAndExternAliasOutsideFile namespace Foo; "; - await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(true); } /// @@ -62,7 +62,7 @@ public async Task TestThatDiagnosticIIsReportedOnSpacingWithUsingsInsideFileScop using a = System.Collections; "; - await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(true); } /// @@ -93,7 +93,7 @@ public enum Foobar } "; - await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(true); } /// @@ -131,7 +131,7 @@ public enum Foobar } "; - await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(true); } /// @@ -151,7 +151,7 @@ public async Task TestThatDiagnosticIIsReportedOnExternAliasInsideFileScopedName extern alias corlib; "; - await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(true); } /// @@ -178,7 +178,7 @@ public async Task TestThatDiagnosticIIsReportedOnExternAliasAndUsingsInsideFileS using a = System.Collections; "; - await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(true); } /// @@ -220,7 +220,7 @@ public enum Foobar } "; - await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(true); } private static Task VerifyCSharpFixAsync(string testCode, string fixedCode) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/MaintainabilityRules/SA1402ForClassCSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/MaintainabilityRules/SA1402ForClassCSharp10UnitTests.cs index b266440d9..8b9deb780 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/MaintainabilityRules/SA1402ForClassCSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/MaintainabilityRules/SA1402ForClassCSharp10UnitTests.cs @@ -39,7 +39,7 @@ await this.VerifyCSharpFixAsync( ("/0/Test0.cs", fixedCode1), ("TestClass2.cs", fixedCode2), }, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1300CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1300CSharp10UnitTests.cs index a0f6393fd..9445aaebe 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1300CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1300CSharp10UnitTests.cs @@ -21,7 +21,7 @@ public async Task TestUpperCaseFileScopedNamespaceAsync() { var testCode = @"namespace Test;"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -32,7 +32,7 @@ public async Task TestLowerCaseFileScopedNamespaceAsync() var fixedCode = @"namespace Test;"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -54,7 +54,7 @@ public async Task TestAllowedLowerCaseFileScopedNamespaceIsNotReportedAsync() { TestCode = testCode, Settings = customTestSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -71,7 +71,7 @@ public async Task TestLowerCaseComplicatedFileScopedNamespaceAsync() Diagnostic().WithArguments("bar").WithLocation(2), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -93,7 +93,7 @@ public async Task TestAllowedLowerCaseComplicatedFileScopedNamespaceIsNotReporte { TestCode = testCode, Settings = customTestSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1313CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1313CSharp10UnitTests.cs index 841b0ae97..337fe8940 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1313CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/NamingRules/SA1313CSharp10UnitTests.cs @@ -40,7 +40,7 @@ public R(int a, int b) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200CSharp10UnitTests.cs index a871ae035..61e3e6b79 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200CSharp10UnitTests.cs @@ -36,7 +36,7 @@ namespace TestNamespace; Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(1), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -48,7 +48,7 @@ public async Task TestOnlyGlobalUsingStatementInFileAsync(string leadingTrivia) { var testCode = $@"{leadingTrivia}global using System;"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -61,7 +61,7 @@ namespace TestNamespace { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200OutsideNamespaceCSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200OutsideNamespaceCSharp10UnitTests.cs index 2a5d3465a..a5e004ecb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200OutsideNamespaceCSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200OutsideNamespaceCSharp10UnitTests.cs @@ -32,7 +32,7 @@ namespace TestNamespace; Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorOutside).WithLocation(1), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -44,7 +44,7 @@ public async Task TestOnlyGlobalUsingStatementInFileAsync(string leadingTrivia) { var testCode = $@"{leadingTrivia}global using System;"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200PreserveCSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200PreserveCSharp10UnitTests.cs index 0a6d2eb17..ab2d59e8d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200PreserveCSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1200PreserveCSharp10UnitTests.cs @@ -20,7 +20,7 @@ public async Task TestValidUsingStatementsInFileScopedNamespaceAsync() using System.Threading; "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -37,7 +37,7 @@ public async Task TestIgnoredUsingStatementsInCompilationUnitWithFileScopedNames namespace TestNamespace; "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -49,7 +49,7 @@ public async Task TestOnlyGlobalUsingStatementInFileAsync(string leadingTrivia) { var testCode = $@"{leadingTrivia}global using System;"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1201CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1201CSharp10UnitTests.cs index beb01639b..52dd85adf 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1201CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1201CSharp10UnitTests.cs @@ -26,7 +26,7 @@ public struct FooStruct { } public class FooClass { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -47,7 +47,7 @@ public struct {|#1:FooStruct|} { } Diagnostic().WithLocation(1).WithArguments("struct", "class"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -61,8 +61,8 @@ public record struct FooStruct { } public class FooClass { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -83,8 +83,8 @@ public record struct {|#1:FooStruct|} { } Diagnostic().WithLocation(1).WithArguments("record struct", "class"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1202CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1202CSharp10UnitTests.cs index c66cbfcee..bc5754302 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1202CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1202CSharp10UnitTests.cs @@ -43,7 +43,7 @@ public class TestClass2 { } class TestClass1 { } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -58,7 +58,7 @@ internal class Class4 { } class Class5 { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1204CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1204CSharp10UnitTests.cs index 77b5c3943..6f9c69734 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1204CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1204CSharp10UnitTests.cs @@ -36,7 +36,7 @@ static class TestClass2 { } class TestClass1 { } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1208CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1208CSharp10UnitTests.cs index f2ed82709..b90820ba2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1208CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1208CSharp10UnitTests.cs @@ -61,7 +61,7 @@ class A Diagnostic().WithLocation(1).WithArguments("System.IO", "Xyz"), Diagnostic().WithLocation(2).WithArguments("System.Threading.Tasks", "Xyz"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1209CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1209CSharp10UnitTests.cs index ce48d0788..fb90ac98a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1209CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1209CSharp10UnitTests.cs @@ -45,7 +45,7 @@ class A } "; - await VerifyCSharpFixAsync(testCodeNamespace, DiagnosticResult.EmptyDiagnosticResults, fixedTestCodeNamespace, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCodeNamespace, DiagnosticResult.EmptyDiagnosticResults, fixedTestCodeNamespace, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1210CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1210CSharp10UnitTests.cs index f9981867f..12601f347 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1210CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1210CSharp10UnitTests.cs @@ -51,7 +51,7 @@ public async Task TestUsingDirectivesInFileScopedNamespaceDeclarationAsync() using Foo; ", }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1210CombinedSystemDirectivesCSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1210CombinedSystemDirectivesCSharp10UnitTests.cs index c8bff5a92..00727aade 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1210CombinedSystemDirectivesCSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1210CombinedSystemDirectivesCSharp10UnitTests.cs @@ -51,7 +51,7 @@ public async Task TestUsingDirectivesInFileScopedNamespaceDeclarationAsync() ", }, Settings = CombinedUsingDirectivesTestSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1211CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1211CSharp10UnitTests.cs index 911d557f5..9b6cd2182 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1211CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1211CSharp10UnitTests.cs @@ -72,7 +72,7 @@ public async Task TestUsingDirectivesOrderingInFileScopedNamespaceAsync() using @int = System.Int32; ", }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1216CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1216CSharp10UnitTests.cs index 1195a33b8..743ab3eb8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1216CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1216CSharp10UnitTests.cs @@ -57,7 +57,7 @@ public async Task TestUsingDirectivesOrderingInFileScopedNamespaceAsync() using Execute = System.Action; ", }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1217CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1217CSharp10UnitTests.cs index cafeb119a..b145826b3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1217CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/OrderingRules/SA1217CSharp10UnitTests.cs @@ -59,7 +59,7 @@ public async Task TestUsingDirectivesOrderingInFileScopedNamespaceAsync() using Execute = System.Action; ", }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1101CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1101CSharp10UnitTests.cs index 96cc0207e..2a1d16694 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1101CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1101CSharp10UnitTests.cs @@ -29,7 +29,7 @@ public bool Method(Test arg) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1121CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1121CSharp10UnitTests.cs index e3831d3a9..7ee489c1d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1121CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1121CSharp10UnitTests.cs @@ -40,7 +40,7 @@ class Bar TestCode = oldSource, ExpectedDiagnostics = { Diagnostic().WithLocation(0) }, FixedCode = newSource, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1129CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1129CSharp10UnitTests.cs index f1493f043..e5314bdf2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1129CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1129CSharp10UnitTests.cs @@ -42,7 +42,7 @@ internal static S F2() } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -87,7 +87,7 @@ internal static S F2() }, AdditionalProjectReferences = { "Reference" }, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1135CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1135CSharp10UnitTests.cs index 15a4ded3f..6427617e3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1135CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1135CSharp10UnitTests.cs @@ -24,7 +24,7 @@ namespace TestNamespace using KeyValue = System.Collections.Generic.KeyValuePair; } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); await new CSharpTest { TestState = @@ -49,7 +49,7 @@ namespace TestNamespace ", }, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1137CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1137CSharp10UnitTests.cs index a15f66530..5e0a2f5be 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1137CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/ReadabilityRules/SA1137CSharp10UnitTests.cs @@ -162,7 +162,7 @@ namespace Namespace6; class MyAttribute : Attribute {{ }} ", }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/SpacingRules/SA1015CSharp10UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/SpacingRules/SA1015CSharp10UnitTests.cs index b363b85ed..90746ccd2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/SpacingRules/SA1015CSharp10UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/SpacingRules/SA1015CSharp10UnitTests.cs @@ -38,7 +38,7 @@ public void TestMethod() } }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/StyleCop.Analyzers.Test.CSharp10.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/StyleCop.Analyzers.Test.CSharp10.csproj index 67541187e..3b3a04695 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/StyleCop.Analyzers.Test.CSharp10.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/StyleCop.Analyzers.Test.CSharp10.csproj @@ -14,7 +14,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/DocumentationRules/SA1648CSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/DocumentationRules/SA1648CSharp11UnitTests.cs index 7701c1387..37d89a1f0 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/DocumentationRules/SA1648CSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/DocumentationRules/SA1648CSharp11UnitTests.cs @@ -42,7 +42,7 @@ public class TestClass : TestInterface static {classMember} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1400CSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1400CSharp11UnitTests.cs index 8cf05625d..4dde74c57 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1400CSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1400CSharp11UnitTests.cs @@ -22,7 +22,7 @@ public async Task TestTypeDeclarationWithFileModifierAsync(string typeName) { var testCode = $@"file {typeName} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForClassCSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForClassCSharp11UnitTests.cs index f8971676e..8d6d971cd 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForClassCSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForClassCSharp11UnitTests.cs @@ -24,7 +24,7 @@ await this.VerifyCSharpDiagnosticAsync( testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForDelegateCSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForDelegateCSharp11UnitTests.cs index 46d18e87b..88429b01d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForDelegateCSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForDelegateCSharp11UnitTests.cs @@ -24,7 +24,7 @@ await VerifyCSharpDiagnosticAsync( testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForEnumCSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForEnumCSharp11UnitTests.cs index f2f1f8725..b1719eeb9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForEnumCSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForEnumCSharp11UnitTests.cs @@ -24,7 +24,7 @@ await VerifyCSharpDiagnosticAsync( testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForInterfaceCSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForInterfaceCSharp11UnitTests.cs index 7af5202de..c9bb3fc07 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForInterfaceCSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForInterfaceCSharp11UnitTests.cs @@ -24,7 +24,7 @@ await this.VerifyCSharpDiagnosticAsync( testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordCSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordCSharp11UnitTests.cs index 65f34e8a6..528190cef 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordCSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordCSharp11UnitTests.cs @@ -24,7 +24,7 @@ await this.VerifyCSharpDiagnosticAsync( testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordClassCSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordClassCSharp11UnitTests.cs index c0b70c214..fc9c9764f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordClassCSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordClassCSharp11UnitTests.cs @@ -24,7 +24,7 @@ await this.VerifyCSharpDiagnosticAsync( testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordStructCSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordStructCSharp11UnitTests.cs index 9578797d0..427b51f55 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordStructCSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForRecordStructCSharp11UnitTests.cs @@ -24,7 +24,7 @@ await this.VerifyCSharpDiagnosticAsync( testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForStructCSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForStructCSharp11UnitTests.cs index 5416df03b..ed8d4c196 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForStructCSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1402ForStructCSharp11UnitTests.cs @@ -24,7 +24,7 @@ await this.VerifyCSharpDiagnosticAsync( testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1404CSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1404CSharp11UnitTests.cs index e2684bb5a..27339211d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1404CSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/MaintainabilityRules/SA1404CSharp11UnitTests.cs @@ -54,7 +54,7 @@ public void Bar() }, NumberOfIncrementalIterations = 2, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/OrderingRules/SA1206CodeFixProviderCSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/OrderingRules/SA1206CodeFixProviderCSharp11UnitTests.cs index 5299de40b..2eafa9a1b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/OrderingRules/SA1206CodeFixProviderCSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/OrderingRules/SA1206CodeFixProviderCSharp11UnitTests.cs @@ -22,7 +22,7 @@ public async Task VerifyFileKeywordReorderingInClassDeclarationAsync() var fixedTestCode = $"file static unsafe class TestClass {{}}"; var expected = Diagnostic().WithLocation(0).WithArguments("file", "unsafe"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -49,7 +49,7 @@ internal struct SomeStruct Diagnostic().WithLocation(1).WithArguments("public", "required"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/ReadabilityRules/SA1121CSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/ReadabilityRules/SA1121CSharp11UnitTests.cs index cc1f450c8..b362e6f5a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/ReadabilityRules/SA1121CSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/ReadabilityRules/SA1121CSharp11UnitTests.cs @@ -39,7 +39,7 @@ class TestClass { TestSources = { source1, oldSource2 }, FixedSources = { source1, newSource2 }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1000CSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1000CSharp11UnitTests.cs index b891d5c48..11e7c3900 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1000CSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1000CSharp11UnitTests.cs @@ -44,7 +44,7 @@ public class MyClass Diagnostic().WithArguments("checked", string.Empty, "followed").WithLocation(0), Diagnostic().WithArguments("checked", string.Empty, "followed").WithLocation(1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1003CSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1003CSharp11UnitTests.cs index a9564e781..80c45201b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1003CSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1003CSharp11UnitTests.cs @@ -50,7 +50,7 @@ public void TestMethod(int x) Diagnostic(DescriptorPrecededByWhitespace).WithLocation(0).WithArguments(">>>="), Diagnostic(DescriptorFollowedByWhitespace).WithLocation(0).WithArguments(">>>="), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -88,7 +88,7 @@ public int TestMethod(int x) Diagnostic(DescriptorPrecededByWhitespace).WithLocation(0).WithArguments(">>>"), Diagnostic(DescriptorFollowedByWhitespace).WithLocation(0).WithArguments(">>>"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1010CSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1010CSharp11UnitTests.cs index b0b9f123b..31325f1ae 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1010CSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1010CSharp11UnitTests.cs @@ -40,7 +40,7 @@ public void TestMethod(List x) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1011CSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1011CSharp11UnitTests.cs index 99e39be58..3d9b739a8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1011CSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1011CSharp11UnitTests.cs @@ -42,7 +42,7 @@ public void TestMethod(object[] arg) "; var expected = Diagnostic().WithLocation(0).WithArguments(" not", "followed"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1012CSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1012CSharp11UnitTests.cs index c6c85fc8e..30e939122 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1012CSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1012CSharp11UnitTests.cs @@ -49,7 +49,7 @@ void M(string[] a) Diagnostic().WithLocation(1).WithArguments(string.Empty, "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1015CSharp11UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1015CSharp11UnitTests.cs index df394868c..b8491b4c8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1015CSharp11UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/SpacingRules/SA1015CSharp11UnitTests.cs @@ -32,7 +32,7 @@ public class MyClass public double MyDouble {{ get; set; }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/StyleCop.Analyzers.Test.CSharp11.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/StyleCop.Analyzers.Test.CSharp11.csproj index 8df8857af..adbd7f613 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/StyleCop.Analyzers.Test.CSharp11.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/StyleCop.Analyzers.Test.CSharp11.csproj @@ -14,7 +14,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/DocumentationRules/SA1611CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/DocumentationRules/SA1611CSharp12UnitTests.cs index f91f27761..93630f482 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/DocumentationRules/SA1611CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/DocumentationRules/SA1611CSharp12UnitTests.cs @@ -31,7 +31,7 @@ public async Task TestPrimaryConstructorMissingParametersAsync(string keyword) Diagnostic().WithLocation(1).WithArguments("param2"), }; - await VerifyCSharpDiagnosticAsync(testCode, expectedResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expectedResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -46,7 +46,7 @@ public async Task TestPrimaryConstructorPartiallyMissingParametersAsync(string k /// Parameter one. public {keyword} C(int param1, string {{|#0:param2|}}) {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, new[] { Diagnostic().WithLocation(0).WithArguments("param2") }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { Diagnostic().WithLocation(0).WithArguments("param2") }, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -62,7 +62,7 @@ public async Task TestPrimaryConstructorNoMissingParametersAsync(string keyword) /// Parameter two. public {keyword} C(int param1, string param2) {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -81,7 +81,7 @@ public async Task TestPrimaryConstructorIncludeMissingParametersAsync(string key Diagnostic().WithLocation(2).WithArguments("param3"), }; - await VerifyCSharpDiagnosticAsync(testCode, expectedResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expectedResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -93,7 +93,7 @@ public async Task TestPrimaryConstructorIncludePartiallyMissingParametersAsync(s /// public {keyword} C(int {{|#0:param1|}}, string param2, bool param3) {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, new[] { Diagnostic().WithLocation(0).WithArguments("param1") }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { Diagnostic().WithLocation(0).WithArguments("param1") }, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -105,7 +105,7 @@ public async Task TestPrimaryConstructorIncludeNoMissingParametersAsync(string k /// public {keyword} C(int param1, string param2, bool param3) {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/LayoutRules/SA1513CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/LayoutRules/SA1513CSharp12UnitTests.cs index 9d11d1fac..6d05fc37a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/LayoutRules/SA1513CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/LayoutRules/SA1513CSharp12UnitTests.cs @@ -29,7 +29,7 @@ public Foo[] TestMethod() => ]; }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/LayoutRules/SA1515CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/LayoutRules/SA1515CSharp12UnitTests.cs index c141efb02..d76ac188d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/LayoutRules/SA1515CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/LayoutRules/SA1515CSharp12UnitTests.cs @@ -33,7 +33,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/MaintainabilityRules/SA1413CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/MaintainabilityRules/SA1413CSharp12UnitTests.cs index e45a511eb..9a3dd264d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/MaintainabilityRules/SA1413CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/MaintainabilityRules/SA1413CSharp12UnitTests.cs @@ -29,7 +29,7 @@ public class TestClass }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -63,7 +63,7 @@ public class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1118CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1118CSharp12UnitTests.cs index a5fefb20f..196ddead6 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1118CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1118CSharp12UnitTests.cs @@ -37,7 +37,7 @@ public void AnotherMethod(int x, int[] y) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1135CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1135CSharp12UnitTests.cs index 43ef49d6b..7b7a99d2a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1135CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1135CSharp12UnitTests.cs @@ -37,7 +37,7 @@ namespace TestNamespace {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -51,7 +51,7 @@ namespace TestNamespace using MyType = {type}; }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1137CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1137CSharp12UnitTests.cs index 001fab003..ac4fde6ec 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1137CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/ReadabilityRules/SA1137CSharp12UnitTests.cs @@ -24,7 +24,7 @@ class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -54,7 +54,7 @@ class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -82,7 +82,7 @@ class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1004CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1004CSharp12UnitTests.cs index 6ee5e4ae6..f5a075714 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1004CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1004CSharp12UnitTests.cs @@ -31,7 +31,7 @@ public void SomeMethod(int x, int y, ref readonly string z) }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1008CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1008CSharp12UnitTests.cs index abf2e4dd5..ec5c8c596 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1008CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1008CSharp12UnitTests.cs @@ -27,7 +27,7 @@ public async Task TestTupleUsingAliasAsync() using TestAlias = (string X, bool Y);"; var expected = Diagnostic(DescriptorPreceded).WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -48,7 +48,7 @@ class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -91,7 +91,7 @@ await VerifyCSharpFixAsync( testCode, expectedResults, fixedCode, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1010CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1010CSharp12UnitTests.cs index 949ebdd55..ea4f49096 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1010CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1010CSharp12UnitTests.cs @@ -43,7 +43,7 @@ public void Bar(int[] x) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1015CSharp12UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1015CSharp12UnitTests.cs index 5e6966a21..7172686b7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1015CSharp12UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/SpacingRules/SA1015CSharp12UnitTests.cs @@ -34,7 +34,7 @@ private static void M() }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } protected override DiagnosticResult[] GetExpectedResultMissingToken() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/StyleCop.Analyzers.Test.CSharp12.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/StyleCop.Analyzers.Test.CSharp12.csproj index 2d89d965d..5a146414b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/StyleCop.Analyzers.Test.CSharp12.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp12/StyleCop.Analyzers.Test.CSharp12.csproj @@ -14,7 +14,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp13/StyleCop.Analyzers.Test.CSharp13.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp13/StyleCop.Analyzers.Test.CSharp13.csproj index 98a011c99..cbcdc7b38 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp13/StyleCop.Analyzers.Test.CSharp13.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp13/StyleCop.Analyzers.Test.CSharp13.csproj @@ -14,7 +14,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1600CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1600CSharp14UnitTests.cs index 521086b59..87e281bf7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1600CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1600CSharp14UnitTests.cs @@ -29,7 +29,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1611CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1611CSharp14UnitTests.cs index 7fccb12fb..11744db0e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1611CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1611CSharp14UnitTests.cs @@ -23,7 +23,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1618CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1618CSharp14UnitTests.cs index a70db02b5..335f1addb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1618CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1618CSharp14UnitTests.cs @@ -28,7 +28,7 @@ public static class TestClass } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -48,7 +48,7 @@ public static class TestClass } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -69,7 +69,7 @@ public static class TestClass } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1619CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1619CSharp14UnitTests.cs index 20692cae3..5b92fae42 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1619CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/DocumentationRules/SA1619CSharp14UnitTests.cs @@ -28,7 +28,7 @@ public static partial class TestClass } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -48,7 +48,7 @@ public static partial class TestClass } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -69,7 +69,7 @@ public static partial class TestClass } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1500CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1500CSharp14UnitTests.cs index e2d2b5b2f..c1dcba2c6 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1500CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1500CSharp14UnitTests.cs @@ -34,7 +34,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -58,7 +58,7 @@ public object TestProperty } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1502CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1502CSharp14UnitTests.cs index 7c8a188d5..03d2d9ec9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1502CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1502CSharp14UnitTests.cs @@ -34,7 +34,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1505CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1505CSharp14UnitTests.cs index 4c2003999..378c38083 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1505CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1505CSharp14UnitTests.cs @@ -38,7 +38,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1507CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1507CSharp14UnitTests.cs index e9570c1f0..ce8cce9a4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1507CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1507CSharp14UnitTests.cs @@ -43,7 +43,7 @@ public static class TestClass var expected = Diagnostic().WithSpan(7, 1, 9, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1508CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1508CSharp14UnitTests.cs index ecfbfd669..badc62409 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1508CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1508CSharp14UnitTests.cs @@ -38,7 +38,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1509CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1509CSharp14UnitTests.cs index b56114e4c..d6d9488e2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1509CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1509CSharp14UnitTests.cs @@ -36,7 +36,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1513CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1513CSharp14UnitTests.cs index 85c6bfabd..125fba4fb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1513CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1513CSharp14UnitTests.cs @@ -44,7 +44,7 @@ public static class TestClass var expected = Diagnostic().WithSpan(6, 6, 7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -68,7 +68,7 @@ public object TestProperty } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1515CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1515CSharp14UnitTests.cs index 30c0935bb..94f9a8fc7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1515CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1515CSharp14UnitTests.cs @@ -27,7 +27,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1516CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1516CSharp14UnitTests.cs index 73a6de7d5..34f1cee56 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1516CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/LayoutRules/SA1516CSharp14UnitTests.cs @@ -42,7 +42,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -73,7 +73,7 @@ public static class TestClass var expected = Diagnostic().WithSpan(7, 1, 7, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/MaintainabilityRules/SA1400CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/MaintainabilityRules/SA1400CSharp14UnitTests.cs index 880e8ff5c..3cb230340 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/MaintainabilityRules/SA1400CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/MaintainabilityRules/SA1400CSharp14UnitTests.cs @@ -26,7 +26,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/NamingRules/SA1313CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/NamingRules/SA1313CSharp14UnitTests.cs index 18c2bc576..e717ea6cc 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/NamingRules/SA1313CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/NamingRules/SA1313CSharp14UnitTests.cs @@ -37,7 +37,7 @@ public static class TestClass var expected = Diagnostic().WithLocation(0).WithArguments("Param"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -52,7 +52,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/NamingRules/SA1314CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/NamingRules/SA1314CSharp14UnitTests.cs index 882f376c5..f9fedacb1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/NamingRules/SA1314CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/NamingRules/SA1314CSharp14UnitTests.cs @@ -35,7 +35,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/OrderingRules/SA1201CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/OrderingRules/SA1201CSharp14UnitTests.cs index 44cd8473c..4a33b58b1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/OrderingRules/SA1201CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/OrderingRules/SA1201CSharp14UnitTests.cs @@ -28,7 +28,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -47,7 +47,7 @@ public static class TestClass var expected = Diagnostic().WithLocation(0).WithArguments("extension", "property"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -64,7 +64,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -83,7 +83,7 @@ public static class TestClass var expected = Diagnostic().WithLocation(0).WithArguments("field", "extension"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/OrderingRules/SA1202CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/OrderingRules/SA1202CSharp14UnitTests.cs index 3566be59b..f400b73e0 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/OrderingRules/SA1202CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/OrderingRules/SA1202CSharp14UnitTests.cs @@ -28,7 +28,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -45,7 +45,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -62,7 +62,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -79,7 +79,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -98,7 +98,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1101CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1101CSharp14UnitTests.cs index eb4fd5c77..f42014754 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1101CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1101CSharp14UnitTests.cs @@ -27,7 +27,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -43,7 +43,7 @@ public static class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1106CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1106CSharp14UnitTests.cs index c03a9124c..b4aac273b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1106CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1106CSharp14UnitTests.cs @@ -35,7 +35,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1110CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1110CSharp14UnitTests.cs index 908696253..4cd36dde9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1110CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1110CSharp14UnitTests.cs @@ -37,7 +37,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1111CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1111CSharp14UnitTests.cs index de459cc86..a3704e1b9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1111CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1111CSharp14UnitTests.cs @@ -36,7 +36,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -61,7 +61,7 @@ public static class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1137CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1137CSharp14UnitTests.cs index 9fc2e2444..16bb3349a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1137CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1137CSharp14UnitTests.cs @@ -46,7 +46,7 @@ public static class TestClass Diagnostic().WithSpan(8, 1, 8, 8), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -82,7 +82,7 @@ public static class TestClass Diagnostic().WithSpan(7, 1, 7, 8), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1000CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1000CSharp14UnitTests.cs index b60818caf..fe7bdd303 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1000CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1000CSharp14UnitTests.cs @@ -28,7 +28,7 @@ public static class TestClass }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1008CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1008CSharp14UnitTests.cs index 99fc6c875..ed17108e7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1008CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1008CSharp14UnitTests.cs @@ -38,7 +38,7 @@ public static class TestClass var expected = Diagnostic(DescriptorNotPreceded).WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -64,7 +64,7 @@ public static class TestClass var expected = Diagnostic(DescriptorNotFollowed).WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1009CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1009CSharp14UnitTests.cs index 753abd0f6..811f04496 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1009CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1009CSharp14UnitTests.cs @@ -37,7 +37,7 @@ public static class TestClass var expected = Diagnostic(DescriptorNotPreceded).WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1014CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1014CSharp14UnitTests.cs index 9725d9ad8..4d24d8837 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1014CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1014CSharp14UnitTests.cs @@ -36,7 +36,7 @@ public static class TestClass var expected = Diagnostic().WithLocation(0).WithArguments("preceded"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -62,7 +62,7 @@ public static class TestClass var expected = Diagnostic().WithLocation(0).WithArguments("followed"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1015CSharp14UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1015CSharp14UnitTests.cs index b8d64a13b..70ef6307a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1015CSharp14UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1015CSharp14UnitTests.cs @@ -37,7 +37,7 @@ public static class TestClass var expected = Diagnostic(DescriptorNotPreceded).WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -63,7 +63,7 @@ public static class TestClass var expected = Diagnostic(DescriptorNotFollowed).WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/StyleCop.Analyzers.Test.CSharp14.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/StyleCop.Analyzers.Test.CSharp14.csproj index 7915d81df..ca7d5d110 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/StyleCop.Analyzers.Test.CSharp14.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/StyleCop.Analyzers.Test.CSharp14.csproj @@ -14,7 +14,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1600CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1600CSharp7UnitTests.cs index 8be2d7431..5d0c73a3e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1600CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1600CSharp7UnitTests.cs @@ -15,43 +15,43 @@ public partial class SA1600CSharp7UnitTests : SA1600UnitTests [Fact] public async Task TestPrivateProtectedDelegateWithoutDocumentationAsync() { - await this.TestNestedDelegateDeclarationDocumentationAsync("private protected", true, false).ConfigureAwait(false); + await this.TestNestedDelegateDeclarationDocumentationAsync("private protected", true, false).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedDelegateWithDocumentationAsync() { - await this.TestNestedDelegateDeclarationDocumentationAsync("private protected", false, true).ConfigureAwait(false); + await this.TestNestedDelegateDeclarationDocumentationAsync("private protected", false, true).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedMethodWithoutDocumentationAsync() { - await this.TestMethodDeclarationDocumentationAsync("private protected", false, true, false).ConfigureAwait(false); + await this.TestMethodDeclarationDocumentationAsync("private protected", false, true, false).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedMethodWithDocumentationAsync() { - await this.TestMethodDeclarationDocumentationAsync("private protected", false, false, true).ConfigureAwait(false); + await this.TestMethodDeclarationDocumentationAsync("private protected", false, false, true).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedConstructorWithoutDocumentationAsync() { - await this.TestConstructorDeclarationDocumentationAsync("private protected", true, false).ConfigureAwait(false); + await this.TestConstructorDeclarationDocumentationAsync("private protected", true, false).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedConstructorWithDocumentationAsync() { - await this.TestConstructorDeclarationDocumentationAsync("private protected", false, true).ConfigureAwait(false); + await this.TestConstructorDeclarationDocumentationAsync("private protected", false, true).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedFieldWithoutDocumentationAsync() { - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "private protected", true, false).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "private protected", true, false).ConfigureAwait(true); // Re-test with the 'documentPrivateElements' setting enabled (doesn't impact fields) var testSettings = @" @@ -64,7 +64,7 @@ public async Task TestPrivateProtectedFieldWithoutDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", true, false).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", true, false).ConfigureAwait(true); // Re-test with the 'documentInternalElements' setting disabled (does impact fields) testSettings = @" @@ -77,7 +77,7 @@ public async Task TestPrivateProtectedFieldWithoutDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", false, false).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", false, false).ConfigureAwait(true); // Re-test with the 'documentPrivateFields' setting enabled (does impact fields) testSettings = @" @@ -90,13 +90,13 @@ public async Task TestPrivateProtectedFieldWithoutDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", true, false).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", true, false).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedFieldWithDocumentationAsync() { - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "private protected", false, true).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "private protected", false, true).ConfigureAwait(true); // Re-test with the 'documentPrivateElements' setting enabled (doesn't impact fields) var testSettings = @" @@ -109,7 +109,7 @@ public async Task TestPrivateProtectedFieldWithDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", false, true).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", false, true).ConfigureAwait(true); // Re-test with the 'documentInternalElements' setting disabled (does impact fields) testSettings = @" @@ -122,7 +122,7 @@ public async Task TestPrivateProtectedFieldWithDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", false, true).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", false, true).ConfigureAwait(true); // Re-test with the 'documentPrivateFields' setting enabled (does impact fields) testSettings = @" @@ -135,55 +135,55 @@ public async Task TestPrivateProtectedFieldWithDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", false, true).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private protected", false, true).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedPropertyWithoutDocumentationAsync() { - await this.TestPropertyDeclarationDocumentationAsync("private protected", false, true, false).ConfigureAwait(false); + await this.TestPropertyDeclarationDocumentationAsync("private protected", false, true, false).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedPropertyWithDocumentationAsync() { - await this.TestPropertyDeclarationDocumentationAsync("private protected", false, false, true).ConfigureAwait(false); + await this.TestPropertyDeclarationDocumentationAsync("private protected", false, false, true).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedIndexerWithoutDocumentationAsync() { - await this.TestIndexerDeclarationDocumentationAsync("private protected", false, true, false).ConfigureAwait(false); + await this.TestIndexerDeclarationDocumentationAsync("private protected", false, true, false).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedIndexerWithDocumentationAsync() { - await this.TestIndexerDeclarationDocumentationAsync("private protected", false, false, true).ConfigureAwait(false); + await this.TestIndexerDeclarationDocumentationAsync("private protected", false, false, true).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedEventWithoutDocumentationAsync() { - await this.TestEventDeclarationDocumentationAsync("private protected", false, true, false).ConfigureAwait(false); + await this.TestEventDeclarationDocumentationAsync("private protected", false, true, false).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedEventWithDocumentationAsync() { - await this.TestEventDeclarationDocumentationAsync("private protected", false, false, true).ConfigureAwait(false); + await this.TestEventDeclarationDocumentationAsync("private protected", false, false, true).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedEventFieldWithoutDocumentationAsync() { - await this.TestEventFieldDeclarationDocumentationAsync("private protected", true, false).ConfigureAwait(false); + await this.TestEventFieldDeclarationDocumentationAsync("private protected", true, false).ConfigureAwait(true); } [Fact] public async Task TestPrivateProtectedEventFieldWithDocumentationAsync() { - await this.TestEventFieldDeclarationDocumentationAsync("private protected", false, true).ConfigureAwait(false); + await this.TestEventFieldDeclarationDocumentationAsync("private protected", false, true).ConfigureAwait(true); } protected override async Task TestTypeWithoutDocumentationAsync(string type, bool isInterface) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1623CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1623CSharp7UnitTests.cs index e400d2e21..4068af29f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1623CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1623CSharp7UnitTests.cs @@ -80,7 +80,7 @@ public class TestClass "; var expected = Diagnostic(PropertySummaryDocumentationAnalyzer.SA1623Descriptor).WithLocation(9, 7 + accessibility.Length + type.Length).WithArguments(expectedArgument); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1624CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1624CSharp7UnitTests.cs index 6995bccce..99087e681 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1624CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/DocumentationRules/SA1624CSharp7UnitTests.cs @@ -75,7 +75,7 @@ public class TestClass "; var expected = Diagnostic(PropertySummaryDocumentationAnalyzer.SA1624Descriptor).WithLocation(9, 7 + accessibility.Length + type.Length).WithArguments(expectedArgument1, expectedArgument2); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1500CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1500CSharp7UnitTests.cs index ec69ff2a6..61a10bfa5 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1500CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1500CSharp7UnitTests.cs @@ -56,7 +56,7 @@ void LocalFunction5() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -166,7 +166,7 @@ void LocalFunction6() Diagnostic().WithLocation(31, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -198,7 +198,7 @@ public unsafe void TestMethod() }; } }"; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -276,7 +276,7 @@ public unsafe void TestMethod() Diagnostic().WithLocation(23, 22), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -334,7 +334,7 @@ public unsafe void TestMethod() Diagnostic().WithLocation(15, 22), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1502CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1502CSharp7UnitTests.cs index b0cd1f7e0..8cedb510d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1502CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1502CSharp7UnitTests.cs @@ -31,7 +31,7 @@ void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -50,7 +50,7 @@ void Bar() { } }"; var expected = Diagnostic().WithLocation(5, 20); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -69,7 +69,7 @@ public void Method() }"; var expected = Diagnostic().WithLocation(5, 19); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -89,7 +89,7 @@ int Bar() }"; var expected = Diagnostic().WithLocation(6, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -108,7 +108,7 @@ int Bar() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -126,7 +126,7 @@ public void Method() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -154,7 +154,7 @@ void Bar() }"; var expected = Diagnostic().WithLocation(5, 20); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -183,7 +183,7 @@ int Bar() }"; var expected = Diagnostic().WithLocation(5, 19); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -213,7 +213,7 @@ int Bar() }"; var expected = Diagnostic().WithLocation(6, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -242,7 +242,7 @@ int Bar() /* TR1 */ }"; var expected = Diagnostic().WithLocation(5, 29); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1505CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1505CSharp7UnitTests.cs index 80d70ca00..e63dd1544 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1505CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1505CSharp7UnitTests.cs @@ -40,7 +40,7 @@ void LocalFunction() } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -86,7 +86,7 @@ void LocalFunction() "; var expectedDiagnostic = Diagnostic().WithLocation(10, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -128,7 +128,7 @@ public unsafe void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(8, 13); - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -170,7 +170,7 @@ public unsafe void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(8, 13); - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1508CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1508CSharp7UnitTests.cs index f6572e238..f45e9887a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1508CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1508CSharp7UnitTests.cs @@ -40,7 +40,7 @@ void LocalFunction() } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -86,7 +86,7 @@ void LocalFunction() "; var expectedDiagnostic = Diagnostic().WithLocation(13, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -128,7 +128,7 @@ public unsafe void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(13, 13); - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -170,7 +170,7 @@ public unsafe void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(13, 13); - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1509CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1509CSharp7UnitTests.cs index 14a54f920..4f4dad42f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1509CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1509CSharp7UnitTests.cs @@ -42,7 +42,7 @@ void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -73,7 +73,7 @@ void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(9, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -115,7 +115,7 @@ public unsafe void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(9, 13); - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -157,7 +157,7 @@ public unsafe void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(9, 13); - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1513CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1513CSharp7UnitTests.cs index ade0a21f7..1ae4fe16a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1513CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1513CSharp7UnitTests.cs @@ -54,7 +54,7 @@ int LocalFunction(int value) } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -141,7 +141,7 @@ void LocalFunction2() Diagnostic().WithLocation(27, 10), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -170,7 +170,7 @@ public unsafe void TestMethod() } "; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -199,7 +199,7 @@ public unsafe void TestMethod() } "; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1515CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1515CSharp7UnitTests.cs index fcf6bd495..a41481d6c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1515CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/LayoutRules/SA1515CSharp7UnitTests.cs @@ -32,7 +32,7 @@ public void Method() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -58,7 +58,7 @@ public int TestProperty } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -84,7 +84,7 @@ public int this[int i] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -110,7 +110,7 @@ public event System.Action TestEvent } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1119CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1119CSharp7UnitTests.cs index a20396d15..98d5e82d9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1119CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1119CSharp7UnitTests.cs @@ -64,7 +64,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -83,7 +83,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -111,7 +111,7 @@ public void Bar() Diagnostic(ParenthesesDiagnosticId).WithLocation(5, 40), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -127,7 +127,7 @@ public void Bar(bool b, ref int x, ref int y) }} }}"; - await VerifyCSharpDiagnosticAsync(LanguageVersionEx.CSharp7_2.OrLaterDefault(), testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersionEx.CSharp7_2.OrLaterDefault(), testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1400CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1400CSharp7UnitTests.cs index 5f9fcd91a..5b246441d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1400CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1400CSharp7UnitTests.cs @@ -33,7 +33,7 @@ void LocalFunction() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1408CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1408CSharp7UnitTests.cs index f4a7d2402..d1aea5b29 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1408CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1408CSharp7UnitTests.cs @@ -35,7 +35,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1413CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1413CSharp7UnitTests.cs index 5a9dfecf8..a374a7846 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1413CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1413CSharp7UnitTests.cs @@ -60,7 +60,7 @@ public unsafe void TestMethod() Diagnostic().WithLocation(12, 17), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -107,7 +107,7 @@ public unsafe void TestMethod() Diagnostic().WithLocation(12, 17), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1414CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1414CSharp7UnitTests.cs index 312ed371c..1f7c5c34b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1414CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/MaintainabilityRules/SA1414CSharp7UnitTests.cs @@ -62,7 +62,7 @@ public static explicit operator TestClass({typeExpression} p1) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -116,7 +116,7 @@ public static explicit operator TestClass({typeExpression} p1) // The actual locations have been specified inline. }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -133,7 +133,7 @@ class StringTupleComparer : IEqualityComparer<(string, string)> public int GetHashCode((string, string) obj) => throw null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -150,7 +150,7 @@ class StringTupleComparer : IEqualityComparer<(string, string)> int IEqualityComparer<(string, string)>.GetHashCode((string, string) obj) => throw null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -172,7 +172,7 @@ abstract class B public virtual ([|int|], [|int|]) Run(([|int|], [|int|]) y) => throw null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1300CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1300CSharp7UnitTests.cs index aee4872ab..b5d3572d8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1300CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1300CSharp7UnitTests.cs @@ -29,7 +29,7 @@ void LocalFunction() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -55,7 +55,7 @@ void LocalFunction() }"; DiagnosticResult expected = Diagnostic().WithArguments("localFunction").WithLocation(5, 14); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -86,7 +86,7 @@ void LocalFunction1() }"; DiagnosticResult expected = Diagnostic().WithArguments("localFunction").WithLocation(5, 14); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1305CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1305CSharp7UnitTests.cs index 383bdb167..f3f402a26 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1305CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1305CSharp7UnitTests.cs @@ -34,7 +34,7 @@ public void TestMethod() Diagnostic().WithLocation(5, 31).WithArguments("variable", "fAre"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -56,7 +56,7 @@ void LocalFunction(bool abX) Diagnostic().WithArguments("parameter", "abX").WithLocation(6, 33), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -73,7 +73,7 @@ void LocalFunction(bool abX) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1312CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1312CSharp7UnitTests.cs index 3e50c4154..26c5822e8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1312CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1312CSharp7UnitTests.cs @@ -46,7 +46,7 @@ public void MethodName() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -74,7 +74,7 @@ public void MethodName() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -98,7 +98,7 @@ public void MethodName() }"; DiagnosticResult expected = Diagnostic().WithArguments("_bar").WithLocation(5, 37); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -134,7 +134,7 @@ public void MethodName() }"; DiagnosticResult expected = Diagnostic().WithArguments("ArgEx").WithLocation(10, 60); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -160,7 +160,7 @@ public void MethodName() }"; DiagnosticResult expected = Diagnostic().WithArguments("X").WithLocation(5, 23); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -192,7 +192,7 @@ public void MethodName() }"; DiagnosticResult expected = Diagnostic().WithArguments("X").WithLocation(7, 18); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -206,7 +206,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -232,7 +232,7 @@ public void MethodName() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -258,7 +258,7 @@ public void MethodName() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -282,7 +282,7 @@ public void MethodName() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -306,7 +306,7 @@ public void MethodName(int parameter) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -323,7 +323,7 @@ public void MethodName(int parameter) }"; DiagnosticResult expected = Diagnostic().WithArguments("__").WithLocation(7, 52); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -348,7 +348,7 @@ public void MethodName((string name, string value) obj) }} "; - await VerifyCSharpDiagnosticAsync(languageVersion: null, testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(languageVersion: null, testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -373,7 +373,7 @@ public void MethodName((string Name, string Value) obj) }} "; - await VerifyCSharpDiagnosticAsync(languageVersion: null, testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(languageVersion: null, testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1316CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1316CSharp7UnitTests.cs index ea522a8c8..a9756c6ae 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1316CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/NamingRules/SA1316CSharp7UnitTests.cs @@ -125,7 +125,7 @@ public class TestClass }} "; - await VerifyCSharpDiagnosticAsync(testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -145,7 +145,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -177,7 +177,7 @@ public void TestMethod() }} "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -206,7 +206,7 @@ public void TestMethod(int {tupleInferred1}, string {tupleInferred2}) }} "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -235,7 +235,7 @@ public void TestMethod(int {tupleInferred1}, string {tupleInferred2}) }} "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -288,7 +288,7 @@ public class TestClass // diagnostics are specified inline }; - await VerifyCSharpFixAsync(testCode, settings, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, settings, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -318,7 +318,7 @@ public void TestMethod() }} "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, settings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -358,7 +358,7 @@ public void TestMethod2() // diagnostics are specified inline }; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, settings, expectedDiagnostics, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, settings, expectedDiagnostics, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -375,7 +375,7 @@ public void MethodName((string name, string value) obj) } "; - await VerifyCSharpDiagnosticAsync(languageVersion: null, testCode, CamelCaseTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(languageVersion: null, testCode, CamelCaseTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -392,7 +392,7 @@ public void MethodName((string Name, string Value) obj) } "; - await VerifyCSharpDiagnosticAsync(languageVersion: null, testCode, PascalCaseTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(languageVersion: null, testCode, PascalCaseTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -412,7 +412,7 @@ public void MethodName(List<(string Name, string Value)> list) } "; - await VerifyCSharpDiagnosticAsync(languageVersion: null, testCode, PascalCaseTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(languageVersion: null, testCode, PascalCaseTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -429,7 +429,7 @@ public void MethodName((string Name, string Value) obj) } "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -455,7 +455,7 @@ public override void TestMethod({type} p) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -479,7 +479,7 @@ void TestInterface.TestMethod({type} p) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -503,7 +503,7 @@ public void TestMethod({type} p) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -531,7 +531,7 @@ public class TestType : BaseType }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -556,7 +556,7 @@ public class TestType : TestInterface }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -581,7 +581,7 @@ public class TestType : TestInterface }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -603,7 +603,7 @@ public class TestType : BaseType }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -625,7 +625,7 @@ public class TestType : TestInterface }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -647,7 +647,7 @@ public class TestType : TestInterface }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -670,7 +670,7 @@ public override event Action<{type}> TestEvent {{ add {{}} remove {{}} }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -693,7 +693,7 @@ event Action<{type}> TestInterface.TestEvent {{ add {{}} remove {{}} }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -716,7 +716,7 @@ public event Action<{type}> TestEvent {{ add {{}} remove {{}} }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -738,7 +738,7 @@ public class TestType : BaseType }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -760,7 +760,7 @@ public class TestType : TestInterface }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -782,7 +782,7 @@ public class TestType : TestInterface }} "; - await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -827,7 +827,7 @@ public override void TestMethod() } "; - await VerifyCSharpFixAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DefaultTestSettings, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -843,7 +843,7 @@ public void M((string K, string V) a) } } "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, PascalCaseInferredTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, PascalCaseInferredTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -862,7 +862,7 @@ public void M(List<(string K, string V)> list) } } "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, PascalCaseInferredTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, PascalCaseInferredTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -876,7 +876,7 @@ public void M(((string K, string V) Pair, int N) a) ((string k, string v), int n) = a; } }"; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, PascalCaseInferredTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, PascalCaseInferredTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -891,7 +891,7 @@ public void M(List<(string K, string V)> list) foreach ((string k, string v) in list) { } } }"; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, PascalCaseInferredTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, PascalCaseInferredTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/OrderingRules/SA1206CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/OrderingRules/SA1206CSharp7UnitTests.cs index 3fcb1b6a9..16c757aa8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/OrderingRules/SA1206CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/OrderingRules/SA1206CSharp7UnitTests.cs @@ -33,7 +33,7 @@ public async Task TestReadonlyRefKeywordInStructDeclarationAsync(string keywords }} }} "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_2.OrLaterDefault(), testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_2.OrLaterDefault(), testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -52,7 +52,7 @@ readonly private struct BitHelper { Diagnostic().WithLocation(3, 14).WithArguments("private", "readonly"), }; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_2.OrLaterDefault(), testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_2.OrLaterDefault(), testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/OrderingRules/SA1207CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/OrderingRules/SA1207CSharp7UnitTests.cs index 33f058310..644780454 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/OrderingRules/SA1207CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/OrderingRules/SA1207CSharp7UnitTests.cs @@ -37,7 +37,7 @@ public class TestClass "; var expectedDiagnostic = Diagnostic().WithArguments("private", "protected").WithLocation(5, 19); - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_2.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_2.OrLaterDefault(), testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1101CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1101CSharp7UnitTests.cs index a11cf6417..d81db1e47 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1101CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1101CSharp7UnitTests.cs @@ -31,7 +31,7 @@ public async Task TestValueTupleAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -70,7 +70,7 @@ public int Bar Diagnostic().WithLocation(9, 16), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -109,7 +109,7 @@ public T this[int i] Diagnostic().WithLocation(9, 14), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -129,7 +129,7 @@ public int Foo() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1110CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1110CSharp7UnitTests.cs index da1504d93..376009017 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1110CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1110CSharp7UnitTests.cs @@ -42,7 +42,7 @@ void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(7, 25); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -61,7 +61,7 @@ public void Method() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1111CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1111CSharp7UnitTests.cs index 8d7959d85..887fc865a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1111CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1111CSharp7UnitTests.cs @@ -42,7 +42,7 @@ void Bar(string s) }"; DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -77,7 +77,7 @@ void Bar(string s, }"; DiagnosticResult expected = Diagnostic().WithLocation(9, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -96,7 +96,7 @@ void Bar( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -114,7 +114,7 @@ void Bar(string s) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1112CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1112CSharp7UnitTests.cs index 78cda5546..c26d96592 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1112CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1112CSharp7UnitTests.cs @@ -44,7 +44,7 @@ void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -62,7 +62,7 @@ void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -81,7 +81,7 @@ void Bar( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1113CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1113CSharp7UnitTests.cs index ad8d26d65..075e935a9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1113CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1113CSharp7UnitTests.cs @@ -41,7 +41,7 @@ void Bar(string s, }"; DiagnosticResult expected = Diagnostic().WithLocation(6, 18); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -76,7 +76,7 @@ void Bar(string s, Diagnostic().WithLocation(7, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -93,7 +93,7 @@ void Bar(string s, } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1114CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1114CSharp7UnitTests.cs index adf9dbb7b..47dfb206b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1114CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1114CSharp7UnitTests.cs @@ -33,7 +33,7 @@ void Bar( DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -52,7 +52,7 @@ void Bar( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -70,7 +70,7 @@ void Bar(string s) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -90,7 +90,7 @@ void Bar( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1115CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1115CSharp7UnitTests.cs index ce28354fc..0d92494e5 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1115CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1115CSharp7UnitTests.cs @@ -36,7 +36,7 @@ void Bar(int i, int z, DiagnosticResult expected1 = Diagnostic().WithLocation(8, 1); DiagnosticResult expected2 = Diagnostic().WithLocation(10, 1); - await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -54,7 +54,7 @@ void Bar(int i, } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -71,7 +71,7 @@ void Bar(int i, string s) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1116CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1116CSharp7UnitTests.cs index 79fac0bdc..c0fcf9ad3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1116CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1116CSharp7UnitTests.cs @@ -27,7 +27,7 @@ public void Method() object LocalFunction(int a, string s) => null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -53,7 +53,7 @@ object LocalFunction( } }"; DiagnosticResult expected = Diagnostic().WithLocation(6, 30); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1117CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1117CSharp7UnitTests.cs index 5496d4d63..2f5573f0a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1117CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1117CSharp7UnitTests.cs @@ -33,7 +33,7 @@ void LocalFunction2( object LocalFunction3(int a, int b, string s) => null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -60,8 +60,8 @@ object LocalFunction( } }"; DiagnosticResult expected = Diagnostic().WithLocation(7, 2); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); ////await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1122CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1122CSharp7UnitTests.cs index 10bdb8818..3e73f6b18 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1122CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1122CSharp7UnitTests.cs @@ -55,7 +55,7 @@ public void TestMethod(string condition) } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -72,7 +72,7 @@ public bool TestMethod(string condition) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1125CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1125CSharp7UnitTests.cs index ddc0aab36..778e39c6b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1125CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1125CSharp7UnitTests.cs @@ -52,8 +52,8 @@ class ClassName string fixedCode = string.Format(template, shortForm); DiagnosticResult expected = Diagnostic().WithLocation(7, 36); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -81,8 +81,8 @@ class ClassName string fixedCode = string.Format(template, shortForm); DiagnosticResult expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -113,8 +113,8 @@ void MethodName() string fixedCode = string.Format(template, shortForm); DiagnosticResult expected = Diagnostic().WithLocation(9, 41); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -142,7 +142,7 @@ class ClassName }} "; string testCode = string.Format(template, form); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -174,7 +174,7 @@ class ClassName }} "; string testCode = string.Format(template, form); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -202,7 +202,7 @@ class ClassName }} "; string testCode = string.Format(template, form); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -231,8 +231,8 @@ class ClassName string fixedCode = string.Format(template, shortForm); DiagnosticResult expected = Diagnostic().WithLocation(8, 43); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } // This is a regression test for issue 2284. @@ -256,8 +256,8 @@ class ClassName string fixedCode = string.Format(template, shortForm); DiagnosticResult expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1127CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1127CSharp7UnitTests.cs index e945cf88b..6c12ab1cf 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1127CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1127CSharp7UnitTests.cs @@ -37,7 +37,7 @@ void LocalFunction() }} }}"; var expected = Diagnostic().WithLocation(6, 33); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -67,7 +67,7 @@ void LocalFunction( } }"; var expected = Diagnostic().WithLocation(8, 20); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -97,7 +97,7 @@ void LocalFunction() }} }}"; var expected = Diagnostic().WithLocation(7, 33); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -122,7 +122,7 @@ string LocalFunction() }} }}"; var expected = Diagnostic().WithLocation(6, 35); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -151,7 +151,7 @@ void LocalFunction() var expected = Diagnostic().WithLocation(6, 42); var expected2 = Diagnostic().WithLocation(6, 59); var expected3 = Diagnostic().WithLocation(6, 76); - await VerifyCSharpFixAsync(testCode, new[] { expected, expected2, expected3 }, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, new[] { expected, expected2, expected3 }, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -183,7 +183,7 @@ T GenericLocalFunction() }} }}"; var expected = Diagnostic().WithLocation(7, 37); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1130CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1130CSharp7UnitTests.cs index 30e0c29a1..fc56183f7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1130CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1130CSharp7UnitTests.cs @@ -45,7 +45,7 @@ public void TestMethod() Diagnostic().WithLocation(6, 45), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1131CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1131CSharp7UnitTests.cs index c62863ca6..1ca78b21f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1131CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1131CSharp7UnitTests.cs @@ -57,7 +57,7 @@ struct TestStruct }} "; DiagnosticResult expected = Diagnostic().WithLocation(8, 18); - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_1.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1135CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1135CSharp7UnitTests.cs index d3ccdafd3..532b84da6 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1135CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1135CSharp7UnitTests.cs @@ -24,7 +24,7 @@ namespace TestNamespace using Example = System.Collections.Generic.List<(int, int)>; } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -37,7 +37,7 @@ namespace TestNamespace using Example = System.Collections.Generic.List<(int x, int y)>; } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1137CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1137CSharp7UnitTests.cs index d28efef84..b8dfc38d1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1137CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1137CSharp7UnitTests.cs @@ -56,7 +56,7 @@ class Container Diagnostic().WithLocation(12, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -99,7 +99,7 @@ class Container Diagnostic().WithLocation(12, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -159,7 +159,7 @@ public unsafe void TestMethod() Diagnostic().WithLocation(17, 1), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -219,7 +219,7 @@ public unsafe void TestMethod() Diagnostic().WithLocation(17, 1), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1139CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1139CSharp7UnitTests.cs index 5b32dfff4..13f508e93 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1139CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1139CSharp7UnitTests.cs @@ -55,7 +55,7 @@ public void Method() }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -121,7 +121,7 @@ public object Method() Diagnostic().WithLocation(4, 10 + literalType.Length), Diagnostic().WithLocation(8, 17), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnosticResult, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnosticResult, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -161,7 +161,7 @@ public void Method() }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -183,7 +183,7 @@ public void Method() }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -213,7 +213,7 @@ public void Method() .WithMessage($"Constant value '{literalValue}' cannot be converted to a '{type}' (use 'unchecked' syntax to override)") .WithLocation(6, 17), }; - await VerifyCSharpDiagnosticAsync(testCode, expectedDiagnosticResult, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expectedDiagnosticResult, CancellationToken.None).ConfigureAwait(true); } /// @@ -244,7 +244,7 @@ public void Method() }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1141CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1141CSharp7UnitTests.cs index 229c7412c..46cdda08a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1141CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1141CSharp7UnitTests.cs @@ -107,7 +107,7 @@ public static implicit operator (int, int)(TestClass p1) Diagnostic().WithLocation(26, 37), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -182,7 +182,7 @@ public void TestMethod() Diagnostic().WithLocation(18, 22), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -225,7 +225,7 @@ public class TestClass } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -261,7 +261,7 @@ public void TestMethod(object x) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -281,7 +281,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -314,7 +314,7 @@ public class TestException : Exception } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -354,7 +354,7 @@ public void TestMethod(object input) Diagnostic().WithLocation(8, 22), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -394,7 +394,7 @@ public void TestMethod() Diagnostic().WithLocation(8, 29), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -427,7 +427,7 @@ public class TestClass Diagnostic().WithLocation(5, 136), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1142CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1142CSharp7UnitTests.cs index 22f29602f..ffec35c68 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1142CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1142CSharp7UnitTests.cs @@ -38,7 +38,7 @@ public int TestMethod((int nameA, int nameB) p1, (int, int) p2, (int, int nameC) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -83,7 +83,7 @@ public int TestMethod2((int nameA, (int subNameA, int subNameB) nameB) p1) // diagnostics are specified inline }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1000CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1000CSharp7UnitTests.cs index 2bc27aa82..f869590e1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1000CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1000CSharp7UnitTests.cs @@ -23,11 +23,11 @@ public async Task TestOutVariableDeclarationAsync() string statementWithSpace = @"int.TryParse(""0"", out @Int32 x);"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("out", string.Empty, "followed").WithLocation(12, 31); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -36,7 +36,7 @@ public async Task TestOutVarDiscardAsync() { string statementWithSpace = @"int.TryParse(""0"", out var _);"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -45,7 +45,7 @@ public async Task TestOutDiscardAsync() { string statementWithSpace = @"int.TryParse(""0"", out _);"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -55,11 +55,11 @@ public async Task TestVarKeywordTupleTypeAsync() string statementWithSpace = @"var (a, b) = (2, 3);"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("var", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -81,7 +81,7 @@ ref @Int32 Call(ref @Int32 p) => ref @p; "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult[] expected = { @@ -93,7 +93,7 @@ ref @Int32 Call(ref @Int32 p) Diagnostic().WithArguments("ref", string.Empty, "followed").WithLocation(17, 8), }; - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } /// @@ -145,7 +145,7 @@ public void TestMethod() Diagnostic().WithArguments("return", string.Empty, "followed").WithLocation(11, 43), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -190,7 +190,7 @@ public void TestMethod() Diagnostic().WithArguments("new", string.Empty, "followed").WithLocation(8, 21), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -235,7 +235,7 @@ public void TestMethod() Diagnostic().WithArguments("foreach", string.Empty, "followed").WithLocation(8, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -245,10 +245,10 @@ public async Task TestStackAllocImplicitArrayStatementAsync() string statementWithSpace = @"int* x = stackalloc [] { 3 };"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace, languageVersion: LanguageVersion.CSharp7_3.OrLaterDefault()).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace, languageVersion: LanguageVersion.CSharp7_3.OrLaterDefault()).ConfigureAwait(true); // this case is handled by SA1026, so it shouldn't be reported here - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, languageVersion: LanguageVersion.CSharp7_3.OrLaterDefault()).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, languageVersion: LanguageVersion.CSharp7_3.OrLaterDefault()).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1001CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1001CSharp7UnitTests.cs index 378c4f7d1..67085a19f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1001CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1001CSharp7UnitTests.cs @@ -56,7 +56,7 @@ public class Foo Diagnostic().WithLocation(7, 65).WithArguments(" not", "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -88,7 +88,7 @@ public void TestMethod() }"; DiagnosticResult expected = Diagnostic().WithLocation(7, 34).WithArguments(" not", "preceded"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -120,7 +120,7 @@ public void TestMethod() }"; DiagnosticResult expected = Diagnostic().WithLocation(7, 21).WithArguments(" not", "preceded"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -159,7 +159,7 @@ public unsafe void TestMethod() Diagnostic().WithLocation(8, 47).WithArguments(string.Empty, "followed"), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -198,7 +198,7 @@ public unsafe void TestMethod() Diagnostic().WithLocation(8, 43).WithArguments(string.Empty, "followed"), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1002CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1002CSharp7UnitTests.cs index f75f87e5a..312fbb074 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1002CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1002CSharp7UnitTests.cs @@ -50,7 +50,7 @@ public unsafe void TestMethod() Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 51), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -85,7 +85,7 @@ public unsafe void TestMethod() Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 47), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1003CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1003CSharp7UnitTests.cs index 52496b4be..7b382dcb6 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1003CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1003CSharp7UnitTests.cs @@ -92,7 +92,7 @@ public void Method() Diagnostic(DescriptorFollowedByWhitespace).WithLocation(16, 32).WithArguments("=>"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1008CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1008CSharp7UnitTests.cs index 1923f748f..2e7d645ce 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1008CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1008CSharp7UnitTests.cs @@ -68,7 +68,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(9, 26), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -132,7 +132,7 @@ public class TestClass Diagnostic(DescriptorNotFollowed).WithLocation(11, 49), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -192,7 +192,7 @@ public class TestClass Diagnostic(DescriptorNotFollowed).WithLocation(11, 56), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -255,7 +255,7 @@ public void TestMethod4() Diagnostic(DescriptorNotFollowed).WithLocation(13, 34), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -390,7 +390,7 @@ public class TestClass Diagnostic(DescriptorNotFollowed).WithLocation(27, 75), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -432,7 +432,7 @@ public class TestClass Diagnostic(DescriptorNotFollowed).WithLocation(7, 54), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -706,7 +706,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(81, 44), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -762,7 +762,7 @@ public class TestClass Diagnostic(DescriptorNotFollowed).WithLocation(13, 33), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -808,7 +808,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(9, 17), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -854,7 +854,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(10, 28), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -899,7 +899,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(9, 25), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -944,7 +944,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(9, 21), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -960,7 +960,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -974,7 +974,7 @@ public void TestMethod(params (string name, string value)[] options) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1034,7 +1034,7 @@ void TestMethod6([NotNull][Custom] (string, string) tuple) { } Diagnostic(DescriptorPreceded).WithLocation(2), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1009CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1009CSharp7UnitTests.cs index 176f91403..568d07285 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1009CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1009CSharp7UnitTests.cs @@ -53,7 +53,7 @@ public class Foo Diagnostic(DescriptorNotPreceded).WithLocation(7, 98), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -86,7 +86,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic(DescriptorNotPreceded).WithLocation(7, 47); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -119,7 +119,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic(DescriptorNotPreceded).WithLocation(7, 34); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -176,7 +176,7 @@ public void TestMethod() Diagnostic(DescriptorNotPreceded).WithLocation(9, 37), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -259,7 +259,7 @@ public class TestClass Diagnostic(DescriptorNotFollowed).WithLocation(19, 42), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -442,7 +442,7 @@ public class TestClass Diagnostic(DescriptorFollowed).WithLocation(35, 80), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -502,7 +502,7 @@ public class TestClass Diagnostic(DescriptorNotFollowed).WithLocation(11, 64), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -785,7 +785,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(81, 49), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -841,7 +841,7 @@ public class TestClass Diagnostic(DescriptorNotFollowed).WithLocation(13, 42), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -905,7 +905,7 @@ public class TestClass Diagnostic(DescriptorNotFollowed).WithLocation(13, 45), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -951,7 +951,7 @@ public void TestMethod() Diagnostic(DescriptorFollowed).WithLocation(9, 24), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1003,7 +1003,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(12, 35), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1019,7 +1019,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1051,7 +1051,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(6, 25), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1010CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1010CSharp7UnitTests.cs index 845b416dc..dff5af33c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1010CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1010CSharp7UnitTests.cs @@ -61,7 +61,7 @@ public unsafe void TestMethod() Diagnostic(DescriptorNotPreceded).WithLocation(8, 41), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -104,7 +104,7 @@ public unsafe void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(7, 37), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1011CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1011CSharp7UnitTests.cs index 54a170063..9d11092da 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1011CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1011CSharp7UnitTests.cs @@ -40,7 +40,7 @@ public class Foo } }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -88,7 +88,7 @@ public unsafe void TestMethod() Diagnostic().WithArguments(string.Empty, "followed").WithLocation(10, 41), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -136,7 +136,7 @@ public unsafe void TestMethod() Diagnostic().WithArguments(string.Empty, "followed").WithLocation(10, 37), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1012CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1012CSharp7UnitTests.cs index eb72ee1f5..da09fa225 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1012CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1012CSharp7UnitTests.cs @@ -74,7 +74,7 @@ public unsafe void TestMethod() Diagnostic().WithArguments(string.Empty, "followed").WithLocation(14, 13), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -133,7 +133,7 @@ public unsafe void TestMethod() Diagnostic().WithArguments(string.Empty, "followed").WithLocation(14, 13), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1013CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1013CSharp7UnitTests.cs index 8903a15b8..025c5ac0e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1013CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1013CSharp7UnitTests.cs @@ -50,7 +50,7 @@ public void TestMethod() Diagnostic().WithLocation(1).WithArguments(string.Empty, "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -107,7 +107,7 @@ public unsafe void TestMethod() Diagnostic().WithLocation(2).WithArguments(string.Empty, "preceded"), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -164,7 +164,7 @@ public unsafe void TestMethod() Diagnostic().WithLocation(2).WithArguments(string.Empty, "preceded"), }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1015CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1015CSharp7UnitTests.cs index 68498d378..36fd9e620 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1015CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1015CSharp7UnitTests.cs @@ -50,7 +50,7 @@ public void TestMethod() Diagnostic(DescriptorNotPreceded).WithLocation(7, 32), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -78,7 +78,7 @@ public void TestMethod(int i, object value) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1018CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1018CSharp7UnitTests.cs index e94237c3a..afb8fad03 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1018CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1018CSharp7UnitTests.cs @@ -105,7 +105,7 @@ public void TestMethod() Diagnostic().WithLocation(13, 1), Diagnostic().WithLocation(19, 1), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1024CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1024CSharp7UnitTests.cs index b2ee5697f..a20210ced 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1024CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1024CSharp7UnitTests.cs @@ -51,7 +51,7 @@ public void TestMethod() Diagnostic(DescriptorFollowed).WithLocation(7, 31), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -96,7 +96,7 @@ public void TestMethod() Diagnostic(DescriptorNotPreceded).WithLocation(11, 22), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1026CSharp7UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1026CSharp7UnitTests.cs index e6281de3c..d7898841d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1026CSharp7UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/SpacingRules/SA1026CSharp7UnitTests.cs @@ -33,7 +33,7 @@ public async Task TestImplicitStackAllocArrayCreationExpressionAsync(string spac const string expectedCode = "public class Foo { public unsafe Foo() { int* ints = stackalloc[] { 1, 2, 3 }; } }"; DiagnosticResult[] expected = { Diagnostic().WithArguments("stackalloc").WithLocation(1, 54) }; - await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, expectedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(LanguageVersion.CSharp7_3.OrLaterDefault(), testCode, expected, expectedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/StyleCop.Analyzers.Test.CSharp7.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/StyleCop.Analyzers.Test.CSharp7.csproj index 63d8ce7d1..055430611 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/StyleCop.Analyzers.Test.CSharp7.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/StyleCop.Analyzers.Test.CSharp7.csproj @@ -14,7 +14,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/DocumentationRules/SA1648CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/DocumentationRules/SA1648CSharp8UnitTests.cs index 59aa0a8f3..086f234bb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/DocumentationRules/SA1648CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/DocumentationRules/SA1648CSharp8UnitTests.cs @@ -33,7 +33,7 @@ public class TestClass : TestInterface public static {member} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/LayoutRules/SA1503CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/LayoutRules/SA1503CSharp8UnitTests.cs index ae0c89303..013b84a89 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/LayoutRules/SA1503CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/LayoutRules/SA1503CSharp8UnitTests.cs @@ -30,7 +30,7 @@ public void Method() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/LayoutRules/SA1514CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/LayoutRules/SA1514CSharp8UnitTests.cs index 4d2c10e01..ec83acf26 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/LayoutRules/SA1514CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/LayoutRules/SA1514CSharp8UnitTests.cs @@ -37,7 +37,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1119CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1119CSharp8UnitTests.cs index 88c97229b..b8fcd32d7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1119CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1119CSharp8UnitTests.cs @@ -37,7 +37,7 @@ public string TestMethod(int n, object a, object b) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -75,7 +75,7 @@ public string TestMethod(int n, object a, object b) Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 54), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -98,7 +98,7 @@ public async Task TestMethod(int n, Task a, Task b) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -140,7 +140,7 @@ public async Task TestMethod(int n, Task a, Task b) Diagnostic(ParenthesesDiagnosticId).WithLocation(2), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -178,7 +178,7 @@ public void TestMethod(int n, object a, object b) Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 48), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -199,7 +199,7 @@ public object TestMethod(int n, string a, string b) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -216,7 +216,7 @@ public unsafe string TestMethod(int n, byte* a, byte* b) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -235,7 +235,7 @@ public string TestMethod(int n, Func a, Func b) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -253,7 +253,7 @@ public unsafe void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -271,7 +271,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -314,7 +314,7 @@ public void TestMethod() Diagnostic(ParenthesesDiagnosticId).WithLocation(9, 27), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1413CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1413CSharp8UnitTests.cs index 6a2752a17..4a086c959 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1413CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/MaintainabilityRules/SA1413CSharp8UnitTests.cs @@ -54,7 +54,7 @@ public void TestMethod(int input) } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/OrderingRules/SA1202CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/OrderingRules/SA1202CSharp8UnitTests.cs index dbd989409..f1cd4fa9f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/OrderingRules/SA1202CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/OrderingRules/SA1202CSharp8UnitTests.cs @@ -55,7 +55,7 @@ public async Task TestPropertiesOfInterfaceAsync() FixedCode = fixedCode, NumberOfIncrementalIterations = 5, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1101CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1101CSharp8UnitTests.cs index 758b031e1..26496e45b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1101CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1101CSharp8UnitTests.cs @@ -29,7 +29,7 @@ public bool Method(Test arg) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1106CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1106CSharp8UnitTests.cs index c1e7ac7f0..9f7a06a43 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1106CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1106CSharp8UnitTests.cs @@ -28,7 +28,7 @@ public void Method() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1122CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1122CSharp8UnitTests.cs index 39329c788..8179c4f8e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1122CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1122CSharp8UnitTests.cs @@ -55,7 +55,7 @@ public void TestMethod(string condition) } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -72,7 +72,7 @@ public bool TestMethod((string, string) condition) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -90,7 +90,7 @@ public bool TestMethod(KeyValuePair condition) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1135CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1135CSharp8UnitTests.cs index 8d8d97a34..0021846eb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1135CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/ReadabilityRules/SA1135CSharp8UnitTests.cs @@ -24,7 +24,7 @@ namespace TestNamespace using KeyValue = System.Collections.Generic.KeyValuePair; } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/Settings/SettingsCSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/Settings/SettingsCSharp8UnitTests.cs index 34dd37777..afa3ba4e4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/Settings/SettingsCSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/Settings/SettingsCSharp8UnitTests.cs @@ -51,7 +51,7 @@ public async Task VerifyEditorConfigSettingsAreReadCorrectlyAsync() stylecop.unrecognizedValue = 3 "; - var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(false); + var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -78,7 +78,7 @@ public async Task VerifyFileHeaderTemplateFromEditorConfigAsync() [*] file_header_template = Line 1\nLine 2. "; - var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(false); + var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -93,7 +93,7 @@ public async Task VerifyStyleCopDocumentationCopyrightTextFromEditorConfigAsync( [*] stylecop.documentation.copyrightText = Line 1\nLine 2. "; - var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(false); + var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -114,7 +114,7 @@ public async Task VerifyBooleanDocumentationSettingsFromEditorConfigAsync(bool v stylecop.documentation.documentInterfaces = {valueText} stylecop.documentation.documentPrivateFields = {valueText} "; - var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(false); + var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -135,7 +135,7 @@ public async Task VerifySettingsWillUseCompanyNameInDefaultCopyrightTextFromEdit [*] stylecop.documentation.companyName = {companyName} "; - var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(false); + var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -151,7 +151,7 @@ public async Task VerifyCircularReferenceBehaviorFromEditorConfigAsync() [*] file_header_template = {copyrightText} "; - var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(false); + var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -166,7 +166,7 @@ public async Task VerifyInvalidReferenceBehaviorFromEditorConfigAsync() [*] file_header_template = {variable} "; - var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(false); + var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -189,7 +189,7 @@ public async Task VerifyEditorConfigSettingsReadCorrectlyDirectivePlacementWitho [*] csharp_using_directive_placement = {placement} "; - var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(false); + var context = await this.CreateAnalysisContextFromEditorConfigAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1002CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1002CSharp8UnitTests.cs index d0b69658c..f08dea67e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1002CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1002CSharp8UnitTests.cs @@ -54,7 +54,7 @@ public void TestMethod(object?[] arguments) Diagnostic().WithArguments(" not", "preceded").WithLocation(9, 40), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1003CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1003CSharp8UnitTests.cs index ddb21e84e..1addb0edf 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1003CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1003CSharp8UnitTests.cs @@ -57,7 +57,7 @@ public void TestMethod() "; var expected = Diagnostic(DescriptorNotPrecededByWhitespace).WithLocation(0).WithArguments("(int)"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -95,7 +95,7 @@ public void TestMethod(int? x) Diagnostic(DescriptorPrecededByWhitespace).WithLocation(0).WithArguments("??="), Diagnostic(DescriptorFollowedByWhitespace).WithLocation(0).WithArguments("??="), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -133,7 +133,7 @@ public string TestMethod(string? x) Diagnostic(DescriptorNotPrecededByWhitespace).WithLocation(0).WithArguments("!"), Diagnostic(DescriptorNotFollowedByWhitespace).WithLocation(0).WithArguments("!"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -155,7 +155,7 @@ public void TestMethod(string? x) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -187,7 +187,7 @@ public void TestMethod(string? x) } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -219,7 +219,7 @@ public void TestMethod(System.Action? x) } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1008CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1008CSharp8UnitTests.cs index 1977c601b..540f6d053 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1008CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1008CSharp8UnitTests.cs @@ -68,7 +68,7 @@ public void TestMethod() Diagnostic(DescriptorNotPreceded).WithLocation(0), Diagnostic(DescriptorNotPreceded).WithLocation(1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -103,7 +103,7 @@ await VerifyCSharpFixAsync( testCode, expectedResults, fixedCode, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -140,7 +140,7 @@ await VerifyCSharpFixAsync( testCode, expectedResults, fixedCode, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -185,7 +185,7 @@ await VerifyCSharpFixAsync( testCode, expectedResults, fixedCode, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -228,7 +228,7 @@ await VerifyCSharpFixAsync( testCode, expectedResults, fixedCode, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1009CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1009CSharp8UnitTests.cs index 275aac96c..a1c611424 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1009CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1009CSharp8UnitTests.cs @@ -40,7 +40,7 @@ public void TestMethod() } }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -96,7 +96,7 @@ public Derived() Diagnostic(DescriptorNotPreceded).WithLocation(2), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -120,7 +120,7 @@ public class Foo public IDisposable Service => this.TestMethod()!; }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -150,7 +150,7 @@ public IDisposable Service() } }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -198,7 +198,7 @@ public string TestMethod() "; var expected = Diagnostic(DescriptorNotFollowed).WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1011CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1011CSharp8UnitTests.cs index 06c316bbe..5ab94449c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1011CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1011CSharp8UnitTests.cs @@ -36,7 +36,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -55,7 +55,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -104,7 +104,7 @@ public void TestMethod(object?[] arguments) Diagnostic().WithArguments(" not", "followed").WithLocation(12, 36), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -124,7 +124,7 @@ public void TestMethod(int[] arg) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1012CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1012CSharp8UnitTests.cs index 30fe63a48..13699c17c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1012CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1012CSharp8UnitTests.cs @@ -58,7 +58,7 @@ await VerifyCSharpFixAsync( testCode, expectedResults, fixedCode, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1013CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1013CSharp8UnitTests.cs index 521b72780..819f8d2be 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1013CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1013CSharp8UnitTests.cs @@ -65,7 +65,7 @@ public void TestMethod(object value) }"; var expected = Diagnostic().WithLocation(0).WithArguments(string.Empty, "followed"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -90,7 +90,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1015CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1015CSharp8UnitTests.cs index e325f6184..08fa50dba 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1015CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1015CSharp8UnitTests.cs @@ -33,7 +33,7 @@ public struct Foo internal unsafe Foo* Next2; }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1019CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1019CSharp8UnitTests.cs index 2c8a77672..487129fc5 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1019CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1019CSharp8UnitTests.cs @@ -63,7 +63,7 @@ public void TestMethod(object?[] arguments) Diagnostic(DescriptorNotPreceded).WithArguments("?").WithLocation(12, 40), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1023CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1023CSharp8UnitTests.cs index 0774df49b..9cbedd1ba 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1023CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1023CSharp8UnitTests.cs @@ -37,7 +37,7 @@ public struct Foo internal unsafe Foo* Next3; }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1024CSharp8UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1024CSharp8UnitTests.cs index 683b22213..e4a0a470b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1024CSharp8UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/SpacingRules/SA1024CSharp8UnitTests.cs @@ -53,7 +53,7 @@ public void TestMethod(object value) }"; var expected = Diagnostic(DescriptorNotPreceded).WithSpan(9, 49, 9, 50); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/StyleCop.Analyzers.Test.CSharp8.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/StyleCop.Analyzers.Test.CSharp8.csproj index fddccb945..ad357519d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/StyleCop.Analyzers.Test.CSharp8.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/StyleCop.Analyzers.Test.CSharp8.csproj @@ -14,7 +14,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/DocumentationRules/SA1611CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/DocumentationRules/SA1611CSharp9UnitTests.cs index 42b0c36fd..548eddcd1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/DocumentationRules/SA1611CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/DocumentationRules/SA1611CSharp9UnitTests.cs @@ -23,7 +23,7 @@ public async Task TestPrimaryRecordConstructorMissingParametersAsync(string keyw /// public {keyword} R(int Param1, string Param2);"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -35,7 +35,7 @@ public async Task TestPrimaryRecordConstructorIncludeMissingParametersAsync(stri /// public {keyword} R(int Param1, string Param2);"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1500CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1500CSharp9UnitTests.cs index e4e442da5..29276abc5 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1500CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1500CSharp9UnitTests.cs @@ -26,7 +26,7 @@ public async Task TestSingleLineRecordAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -40,7 +40,7 @@ public async Task TestSingleLineRecordWithParameterAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -57,7 +57,7 @@ public async Task TestMultiLineRecordAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -74,7 +74,7 @@ public async Task TestMultiLineRecordWithParameterAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -113,7 +113,7 @@ int Property2 } }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1502CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1502CSharp9UnitTests.cs index 008bf9e2c..3006e5a91 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1502CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1502CSharp9UnitTests.cs @@ -26,7 +26,7 @@ public async Task TestSingleLineRecordAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -40,7 +40,7 @@ public async Task TestSingleLineRecordWithParameterAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -57,7 +57,7 @@ public async Task TestMultiLineRecordAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -74,7 +74,7 @@ public async Task TestMultiLineRecordWithParameterAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1505CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1505CSharp9UnitTests.cs index 2c290fd64..93999f1bc 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1505CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1505CSharp9UnitTests.cs @@ -24,7 +24,7 @@ public record TestRecord; } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1508CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1508CSharp9UnitTests.cs index d7395c160..7fa2c135f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1508CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1508CSharp9UnitTests.cs @@ -26,7 +26,7 @@ public async Task TestSingleLineRecordAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -40,7 +40,7 @@ public async Task TestSingleLineRecordWithParameterAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -57,7 +57,7 @@ public async Task TestMultiLineRecordAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -74,7 +74,7 @@ public async Task TestMultiLineRecordWithParameterAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1509CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1509CSharp9UnitTests.cs index 9c016d9a0..45db5bc99 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1509CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1509CSharp9UnitTests.cs @@ -24,7 +24,7 @@ public record TestRecord; } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1513CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1513CSharp9UnitTests.cs index cff08f028..17f62956e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1513CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1513CSharp9UnitTests.cs @@ -33,7 +33,7 @@ public void Baz(string arg) } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -57,7 +57,7 @@ public int X } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1516CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1516CSharp9UnitTests.cs index f6bedb813..1d7f351ee 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1516CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/LayoutRules/SA1516CSharp9UnitTests.cs @@ -44,7 +44,7 @@ public async Task TestUsingAndGlobalStatementSpacingInTopLevelProgramAsync() }; var expectedDiagnostics = this.GetExpectedResultTestUsingAndGlobalStatementSpacingInTopLevelProgram(); test.TestState.ExpectedDiagnostics.AddRange(expectedDiagnostics); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -66,7 +66,7 @@ public async Task TestGlobalStatementSpacingInTopLevelProgramAsync() OutputKind = OutputKind.ConsoleApplication, Sources = { testCode }, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -96,7 +96,7 @@ record A(); }; var expectedDiagnostics = this.GetExpectedResultTestGlobalStatementAndRecordSpacingInTopLevelProgram(); test.TestState.ExpectedDiagnostics.AddRange(expectedDiagnostics); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -138,7 +138,7 @@ public int X } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } protected virtual DiagnosticResult[] GetExpectedResultTestUsingAndGlobalStatementSpacingInTopLevelProgram() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1119CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1119CSharp9UnitTests.cs index 24701faa1..57ff58361 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1119CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1119CSharp9UnitTests.cs @@ -34,7 +34,7 @@ public object TestMethod(Foo n, int a) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -72,7 +72,7 @@ public object TestMethod(Foo n, int a) Diagnostic(ParenthesesDiagnosticId).WithLocation(1), Diagnostic(ParenthesesDiagnosticId).WithLocation(2), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -109,7 +109,7 @@ public void TestMethod(Foo n, int a) Diagnostic(ParenthesesDiagnosticId).WithLocation(1), Diagnostic(ParenthesesDiagnosticId).WithLocation(2), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -132,7 +132,7 @@ public object TestMethod(Foo n, int a) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1413CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1413CSharp9UnitTests.cs index e153fc288..88e3ad68d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1413CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/MaintainabilityRules/SA1413CSharp9UnitTests.cs @@ -61,7 +61,7 @@ void M() } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1300CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1300CSharp9UnitTests.cs index 71b6a5eb6..4c43cfa21 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1300CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1300CSharp9UnitTests.cs @@ -37,7 +37,7 @@ public R(int a, int b) } "; - await VerifyCSharpFixAsync(testCode, this.GetExpectedResultTestPositionalRecord1(), fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, this.GetExpectedResultTestPositionalRecord1(), fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -63,7 +63,7 @@ public R(int a, int b) } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } protected virtual DiagnosticResult[] GetExpectedResultTestPositionalRecord1() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1313CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1313CSharp9UnitTests.cs index e32e59bee..ac0e01310 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1313CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/NamingRules/SA1313CSharp9UnitTests.cs @@ -39,7 +39,7 @@ public R(int a, int b) } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9UnitTests.cs index c4704f1bf..1ba4147e8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200CSharp9UnitTests.cs @@ -38,7 +38,7 @@ public async Task TestValidUsingStatementsInTopLevelProgramAsync() OutputKind = OutputKind.ConsoleApplication, Sources = { testCode }, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200OutsideNamespaceCSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200OutsideNamespaceCSharp9UnitTests.cs index 844a88ee4..a365e4b63 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200OutsideNamespaceCSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200OutsideNamespaceCSharp9UnitTests.cs @@ -39,7 +39,7 @@ public async Task TestValidUsingStatementsInTopLevelProgramAsync() Sources = { testCode }, }, Settings = TestSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200PreserveCSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200PreserveCSharp9UnitTests.cs index bd3777a6e..11639c624 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200PreserveCSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1200PreserveCSharp9UnitTests.cs @@ -39,7 +39,7 @@ public async Task TestValidUsingStatementsInTopLevelProgramAsync() Sources = { testCode }, }, Settings = TestSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1201CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1201CSharp9UnitTests.cs index ccb7c5c5b..cdc12271a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1201CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1201CSharp9UnitTests.cs @@ -26,8 +26,8 @@ public struct FooStruct { } public record FooClass { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -48,8 +48,8 @@ public struct {|#1:FooStruct|} { } Diagnostic().WithLocation(1).WithArguments("struct", "record"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -76,7 +76,7 @@ public record TestRecord2 { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -135,7 +135,7 @@ public class TestClass { } }; test.ExpectedDiagnostics.AddRange(expected); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1212CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1212CSharp9UnitTests.cs index b347ab94c..6065c36da 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1212CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/OrderingRules/SA1212CSharp9UnitTests.cs @@ -30,7 +30,7 @@ public class Foo public int Prop { get; init; } }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -75,7 +75,7 @@ public int Prop } }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1101CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1101CSharp9UnitTests.cs index 440bd79a6..323296af9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1101CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1101CSharp9UnitTests.cs @@ -31,7 +31,7 @@ public A UpdateA(A value) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1106CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1106CSharp9UnitTests.cs index 3bbfb1711..633231a27 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1106CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1106CSharp9UnitTests.cs @@ -20,7 +20,7 @@ public async Task TestNoDiagnosticForEmptyRecordDeclarationAsync() { var testCode = @"public record Result(int Value);"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1110CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1110CSharp9UnitTests.cs index ce9ef376d..8664ae59a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1110CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1110CSharp9UnitTests.cs @@ -32,7 +32,7 @@ public async Task TestPrimaryConstructorWithoutParametersAsync(string typeKeywor }}"; var expected = this.GetExpectedResultTestPrimaryConstructor(); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -53,7 +53,7 @@ public async Task TestPrimaryConstructorWithParametersAsync(string typeKeyword) }}"; var expected = this.GetExpectedResultTestPrimaryConstructor(); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -70,7 +70,7 @@ public async Task TestPrimaryConstructorBaseListWithParametersOnSameLineAsync(st {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -99,7 +99,7 @@ public async Task TestPrimaryConstructorBaseListWithParametersAsync(string typeK }}"; var expected = this.GetExpectedResultTestPrimaryConstructorBaseList(); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -127,7 +127,7 @@ public async Task TestPrimaryConstructorBaseListWithoutParametersAsync(string ty }}"; var expected = this.GetExpectedResultTestPrimaryConstructorBaseList(); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } protected virtual DiagnosticResult[] GetExpectedResultTestPrimaryConstructor() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1111CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1111CSharp9UnitTests.cs index fef800ba0..9510c49f9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1111CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1111CSharp9UnitTests.cs @@ -32,7 +32,7 @@ public async Task TestPrimaryConstructorWithParameterAsync(string typeKeyword) }}"; var expected = this.GetExpectedResultTestPrimaryConstructorWithParameter(); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -46,7 +46,7 @@ public async Task TestPrimaryConstructorWithoutParameterAsync(string typeKeyword {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -74,7 +74,7 @@ public async Task TestPrimaryConstructorBaseListWithArgumentsAsync(string typeKe }}"; var expected = this.GetExpectedResultTestPrimaryConstructorBaseList(); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -92,7 +92,7 @@ public async Task TestPrimaryConstructorBaseListWithoutArgumentsAsync(string typ {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } protected virtual DiagnosticResult[] GetExpectedResultTestPrimaryConstructorWithParameter() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1116CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1116CSharp9UnitTests.cs index 27925eb69..e48a9f859 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1116CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1116CSharp9UnitTests.cs @@ -49,7 +49,7 @@ public void Method() }"; DiagnosticResult expected = Diagnostic().WithLocation(10, 21); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1117CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1117CSharp9UnitTests.cs index cafe80269..c0cce6560 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1117CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1117CSharp9UnitTests.cs @@ -33,7 +33,7 @@ public void Method() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -54,7 +54,7 @@ public void Method() }"; DiagnosticResult expected = Diagnostic().WithLocation(11, 16); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1118CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1118CSharp9UnitTests.cs index 461bcbf3d..4cefbe3dc 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1118CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1118CSharp9UnitTests.cs @@ -38,7 +38,7 @@ r with } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -66,7 +66,7 @@ r with } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -94,7 +94,7 @@ public void MyCallingFunction(int index, MyObject myObject) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1129CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1129CSharp9UnitTests.cs index ae3f2d81c..ca9626691 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1129CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1129CSharp9UnitTests.cs @@ -44,7 +44,7 @@ internal static S F() } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1137CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1137CSharp9UnitTests.cs index 99d301d7a..bc3cf38c6 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1137CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1137CSharp9UnitTests.cs @@ -52,7 +52,7 @@ int Property class MyAttribute : Attribute { } "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1000CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1000CSharp9UnitTests.cs index 1026cd472..6d7bfeaad 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1000CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1000CSharp9UnitTests.cs @@ -19,7 +19,7 @@ public async Task TestTargetTypedNewAsync() { string statementWithoutSpace = "int a = new();"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -30,7 +30,7 @@ public async Task TestIsBeforeRelationalPatternAsync() var statementWithSpace = "_ = 1 is >1;"; var expected = Diagnostic().WithArguments("is", string.Empty, "followed").WithLocation(0); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -41,7 +41,7 @@ public async Task TestNotBeforeRelationalPatternAsync() var statementWithSpace = "_ = 1 is not >1;"; var expected = Diagnostic().WithArguments("not", string.Empty, "followed").WithLocation(0); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -52,7 +52,7 @@ public async Task TestAndBeforeRelationalPatternAsync() var statementWithSpace = "_ = 1 is 1 and >0;"; var expected = Diagnostic().WithArguments("and", string.Empty, "followed").WithLocation(0); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -63,7 +63,7 @@ public async Task TestOrBeforeRelationalPatternAsync() var statementWithSpace = "_ = 1 is 1 or >1;"; var expected = Diagnostic().WithArguments("or", string.Empty, "followed").WithLocation(0); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1008CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1008CSharp9UnitTests.cs index 36447bf39..c82bf9dee 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1008CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1008CSharp9UnitTests.cs @@ -55,7 +55,7 @@ void Method(int b) // /0/Test0.cs(8,18): warning SA1008: Opening parenthesis should not be followed by a space. Diagnostic(DescriptorNotFollowed).WithLocation(2), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -73,7 +73,7 @@ void Method((int, int) c) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -100,7 +100,7 @@ public async Task TestDeconstructionInTopLevelProgramAsync(string prefix) Diagnostic(DescriptorNotFollowed).WithLocation(0), }, FixedCode = fixedCode, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1009CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1009CSharp9UnitTests.cs index d6ba7b9e5..95d80e8ec 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1009CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1009CSharp9UnitTests.cs @@ -43,7 +43,7 @@ public record MyQuery3() : BaseQuery;"; // /0/Test0.cs(5,24): warning SA1009: Closing parenthesis should be followed by a space Diagnostic(DescriptorFollowed).WithLocation(2), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1011CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1011CSharp9UnitTests.cs index 14be6282b..601991000 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1011CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1011CSharp9UnitTests.cs @@ -38,7 +38,7 @@ public async Task TestFunctionPointerUnmanagedCallingConventionListAsync() Diagnostic().WithArguments(" not", "followed").WithLocation(1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1012CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1012CSharp9UnitTests.cs index 7bfa7e2e3..a2e7e2b6d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1012CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1012CSharp9UnitTests.cs @@ -51,7 +51,7 @@ await VerifyCSharpFixAsync( testCode, expectedResults, fixedCode, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -91,7 +91,7 @@ await VerifyCSharpFixAsync( testCode, expectedResults, fixedCode, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -131,7 +131,7 @@ await VerifyCSharpFixAsync( testCode, expectedResults, fixedCode, - CancellationToken.None).ConfigureAwait(false); + CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1023CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1023CSharp9UnitTests.cs index 0a03a17db..9781e8e65 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1023CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1023CSharp9UnitTests.cs @@ -38,7 +38,7 @@ public async Task TestFunctionPointerParameterInvalidSpacingAsync() Diagnostic(DescriptorNotFollowed).WithLocation(1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -76,7 +76,7 @@ public async Task TestFunctionPointerTypeInvalidSpacingAsync() Diagnostic(DescriptorFollowed).WithLocation(5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1024CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1024CSharp9UnitTests.cs index 07364190a..0ef6bb003 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1024CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1024CSharp9UnitTests.cs @@ -45,7 +45,7 @@ public record MyQuery3() : BaseQuery;"; // /0/Test0.cs(5,26): warning SA1024: Colon should be followed by a space Diagnostic(DescriptorFollowed).WithLocation(2), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj index 0459718f3..241e5b8af 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj @@ -14,7 +14,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/AnalyzerConfigurationUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/AnalyzerConfigurationUnitTests.cs index 7a1cc650f..6099767a7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/AnalyzerConfigurationUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/AnalyzerConfigurationUnitTests.cs @@ -40,7 +40,7 @@ public async Task TestEmptySourceAsync(Type analyzerType) await new CSharpTest(analyzerType) { TestCode = string.Empty, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Theory] diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/AnalyzerExtensionsTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/AnalyzerExtensionsTests.cs index 431e19f03..612117d7d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/AnalyzerExtensionsTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/AnalyzerExtensionsTests.cs @@ -38,7 +38,7 @@ void MethodName() await new CSharpTest(this) { TestCode = testCode, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); Assert.True(this.invokedBlockCallback); Assert.True(this.invokedMethodDeclarationCallback); diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/FileHeaderTestBase.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/FileHeaderTestBase.cs index 6b7a5a912..8c6514d4e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/FileHeaderTestBase.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/FileHeaderTestBase.cs @@ -45,7 +45,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -65,7 +65,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -87,7 +87,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } protected static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/InheritdocCodeFixProviderUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/InheritdocCodeFixProviderUnitTests.cs index 7334c2923..fb3264e0d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/InheritdocCodeFixProviderUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/InheritdocCodeFixProviderUnitTests.cs @@ -85,7 +85,7 @@ public override {memberData} }; test.DisabledDiagnostics.Add(compilerWarning ? SA1600.Id : CS1591.Id); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -150,7 +150,7 @@ public class ChildClass : IParent }; test.DisabledDiagnostics.Add(compilerWarning ? SA1600.Id : CS1591.Id); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -188,7 +188,7 @@ public class ChildClass : ParentClass FixedCode = testCode, NumberOfIncrementalIterations = 1, NumberOfFixAllIterations = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -226,7 +226,7 @@ public class ChildClass : ParentClass FixedCode = testCode, NumberOfIncrementalIterations = 1, NumberOfFixAllIterations = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/NoXmlFileHeaderUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/NoXmlFileHeaderUnitTests.cs index 952d45725..884d60fb2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/NoXmlFileHeaderUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/NoXmlFileHeaderUnitTests.cs @@ -71,7 +71,7 @@ namespace Foo "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMissing).WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -100,7 +100,7 @@ namespace Foo "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMissing).WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -130,7 +130,7 @@ namespace Foo "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMissing).WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -160,7 +160,7 @@ namespace Foo "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMissing).WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -199,7 +199,7 @@ namespace Foo "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMissing).WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, testSettings, new[] { expectedDiagnostic }, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, testSettings, new[] { expectedDiagnostic }, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -239,7 +239,7 @@ namespace Foo "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMissing).WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, testSettings, new[] { expectedDiagnostic }, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, testSettings, new[] { expectedDiagnostic }, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -256,7 +256,7 @@ namespace Bar } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -274,7 +274,7 @@ namespace Bar } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -293,7 +293,7 @@ namespace Bar } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -311,7 +311,7 @@ namespace Bar } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -339,7 +339,7 @@ namespace Bar "; var expected = Diagnostic(FileHeaderAnalyzers.SA1635Descriptor).WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -364,7 +364,7 @@ namespace Bar } "; var expected = Diagnostic(FileHeaderAnalyzers.SA1636Descriptor).WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -390,7 +390,7 @@ namespace Bar "; var expected = Diagnostic(FileHeaderAnalyzers.SA1636Descriptor).WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, TestSettingsWithEmptyLines, new[] { expected }, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, TestSettingsWithEmptyLines, new[] { expected }, fixedCode, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1600UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1600UnitTests.cs index 6ea0775f9..bea842c9e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1600UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1600UnitTests.cs @@ -36,7 +36,7 @@ public async Task TestRegressionMethodGlobalNamespaceAsync(string code) {code}"; var expected = this.GetExpectedResultTestRegressionMethodGlobalNamespace(code); - await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -44,126 +44,126 @@ public async Task TestRegressionMethodGlobalNamespaceAsync(string code) public async Task TestBaseTypeWithoutDocumentationAsync(string type) { var isInterface = type == "interface"; - await this.TestTypeWithoutDocumentationAsync(type, isInterface).ConfigureAwait(false); + await this.TestTypeWithoutDocumentationAsync(type, isInterface).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.BaseTypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestBaseTypeWithDocumentationAsync(string type) { - await this.TestTypeWithDocumentationAsync(type).ConfigureAwait(false); + await this.TestTypeWithDocumentationAsync(type).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.TypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestPartialTypeWithoutDocumentationAsync(string type) { - await this.TestTypeDeclarationDocumentationAsync(type, "partial", false, false).ConfigureAwait(false); - await this.TestTypeDeclarationDocumentationAsync(type, "internal partial", false, false).ConfigureAwait(false); - await this.TestTypeDeclarationDocumentationAsync(type, "public partial", false, false).ConfigureAwait(false); + await this.TestTypeDeclarationDocumentationAsync(type, "partial", false, false).ConfigureAwait(true); + await this.TestTypeDeclarationDocumentationAsync(type, "internal partial", false, false).ConfigureAwait(true); + await this.TestTypeDeclarationDocumentationAsync(type, "public partial", false, false).ConfigureAwait(true); } [Fact] public async Task TestDelegateWithoutDocumentationAsync() { - await this.TestDelegateDeclarationDocumentationAsync(string.Empty, true, false).ConfigureAwait(false); - await this.TestDelegateDeclarationDocumentationAsync("internal", true, false).ConfigureAwait(false); - await this.TestDelegateDeclarationDocumentationAsync("public", true, false).ConfigureAwait(false); - - await this.TestNestedDelegateDeclarationDocumentationAsync(string.Empty, false, false).ConfigureAwait(false); - await this.TestNestedDelegateDeclarationDocumentationAsync("private", false, false).ConfigureAwait(false); - await this.TestNestedDelegateDeclarationDocumentationAsync("protected", true, false).ConfigureAwait(false); - await this.TestNestedDelegateDeclarationDocumentationAsync("internal", true, false).ConfigureAwait(false); - await this.TestNestedDelegateDeclarationDocumentationAsync("protected internal", true, false).ConfigureAwait(false); - await this.TestNestedDelegateDeclarationDocumentationAsync("public", true, false).ConfigureAwait(false); + await this.TestDelegateDeclarationDocumentationAsync(string.Empty, true, false).ConfigureAwait(true); + await this.TestDelegateDeclarationDocumentationAsync("internal", true, false).ConfigureAwait(true); + await this.TestDelegateDeclarationDocumentationAsync("public", true, false).ConfigureAwait(true); + + await this.TestNestedDelegateDeclarationDocumentationAsync(string.Empty, false, false).ConfigureAwait(true); + await this.TestNestedDelegateDeclarationDocumentationAsync("private", false, false).ConfigureAwait(true); + await this.TestNestedDelegateDeclarationDocumentationAsync("protected", true, false).ConfigureAwait(true); + await this.TestNestedDelegateDeclarationDocumentationAsync("internal", true, false).ConfigureAwait(true); + await this.TestNestedDelegateDeclarationDocumentationAsync("protected internal", true, false).ConfigureAwait(true); + await this.TestNestedDelegateDeclarationDocumentationAsync("public", true, false).ConfigureAwait(true); } [Fact] public async Task TestDelegateWithDocumentationAsync() { - await this.TestDelegateDeclarationDocumentationAsync(string.Empty, false, true).ConfigureAwait(false); - await this.TestDelegateDeclarationDocumentationAsync("internal", false, true).ConfigureAwait(false); - await this.TestDelegateDeclarationDocumentationAsync("public", false, true).ConfigureAwait(false); - - await this.TestNestedDelegateDeclarationDocumentationAsync(string.Empty, false, true).ConfigureAwait(false); - await this.TestNestedDelegateDeclarationDocumentationAsync("private", false, true).ConfigureAwait(false); - await this.TestNestedDelegateDeclarationDocumentationAsync("protected", false, true).ConfigureAwait(false); - await this.TestNestedDelegateDeclarationDocumentationAsync("internal", false, true).ConfigureAwait(false); - await this.TestNestedDelegateDeclarationDocumentationAsync("protected internal", false, true).ConfigureAwait(false); - await this.TestNestedDelegateDeclarationDocumentationAsync("public", false, true).ConfigureAwait(false); + await this.TestDelegateDeclarationDocumentationAsync(string.Empty, false, true).ConfigureAwait(true); + await this.TestDelegateDeclarationDocumentationAsync("internal", false, true).ConfigureAwait(true); + await this.TestDelegateDeclarationDocumentationAsync("public", false, true).ConfigureAwait(true); + + await this.TestNestedDelegateDeclarationDocumentationAsync(string.Empty, false, true).ConfigureAwait(true); + await this.TestNestedDelegateDeclarationDocumentationAsync("private", false, true).ConfigureAwait(true); + await this.TestNestedDelegateDeclarationDocumentationAsync("protected", false, true).ConfigureAwait(true); + await this.TestNestedDelegateDeclarationDocumentationAsync("internal", false, true).ConfigureAwait(true); + await this.TestNestedDelegateDeclarationDocumentationAsync("protected internal", false, true).ConfigureAwait(true); + await this.TestNestedDelegateDeclarationDocumentationAsync("public", false, true).ConfigureAwait(true); } [Fact] public async Task TestMethodWithoutDocumentationAsync() { - await this.TestMethodDeclarationDocumentationAsync(string.Empty, false, false, false).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync(string.Empty, true, true, false).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync("private", false, false, false).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync("protected", false, true, false).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync("internal", false, true, false).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync("protected internal", false, true, false).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync("public", false, true, false).ConfigureAwait(false); - - await this.TestInterfaceMethodDeclarationDocumentationAsync(false).ConfigureAwait(false); + await this.TestMethodDeclarationDocumentationAsync(string.Empty, false, false, false).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync(string.Empty, true, true, false).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync("private", false, false, false).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync("protected", false, true, false).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync("internal", false, true, false).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync("protected internal", false, true, false).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync("public", false, true, false).ConfigureAwait(true); + + await this.TestInterfaceMethodDeclarationDocumentationAsync(false).ConfigureAwait(true); } [Fact] public async Task TestMethodWithDocumentationAsync() { - await this.TestMethodDeclarationDocumentationAsync(string.Empty, false, false, true).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync(string.Empty, true, false, true).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync("private", false, false, true).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync("protected", false, false, true).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync("internal", false, false, true).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync("protected internal", false, false, true).ConfigureAwait(false); - await this.TestMethodDeclarationDocumentationAsync("public", false, false, true).ConfigureAwait(false); - - await this.TestInterfaceMethodDeclarationDocumentationAsync(true).ConfigureAwait(false); + await this.TestMethodDeclarationDocumentationAsync(string.Empty, false, false, true).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync(string.Empty, true, false, true).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync("private", false, false, true).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync("protected", false, false, true).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync("internal", false, false, true).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync("protected internal", false, false, true).ConfigureAwait(true); + await this.TestMethodDeclarationDocumentationAsync("public", false, false, true).ConfigureAwait(true); + + await this.TestInterfaceMethodDeclarationDocumentationAsync(true).ConfigureAwait(true); } [Fact] public async Task TestConstructorWithoutDocumentationAsync() { - await this.TestConstructorDeclarationDocumentationAsync(string.Empty, false, false).ConfigureAwait(false); - await this.TestConstructorDeclarationDocumentationAsync("private", false, false).ConfigureAwait(false); - await this.TestConstructorDeclarationDocumentationAsync("protected", true, false).ConfigureAwait(false); - await this.TestConstructorDeclarationDocumentationAsync("internal", true, false).ConfigureAwait(false); - await this.TestConstructorDeclarationDocumentationAsync("protected internal", true, false).ConfigureAwait(false); - await this.TestConstructorDeclarationDocumentationAsync("public", true, false).ConfigureAwait(false); + await this.TestConstructorDeclarationDocumentationAsync(string.Empty, false, false).ConfigureAwait(true); + await this.TestConstructorDeclarationDocumentationAsync("private", false, false).ConfigureAwait(true); + await this.TestConstructorDeclarationDocumentationAsync("protected", true, false).ConfigureAwait(true); + await this.TestConstructorDeclarationDocumentationAsync("internal", true, false).ConfigureAwait(true); + await this.TestConstructorDeclarationDocumentationAsync("protected internal", true, false).ConfigureAwait(true); + await this.TestConstructorDeclarationDocumentationAsync("public", true, false).ConfigureAwait(true); } [Fact] public async Task TestConstructorWithDocumentationAsync() { - await this.TestConstructorDeclarationDocumentationAsync(string.Empty, false, true).ConfigureAwait(false); - await this.TestConstructorDeclarationDocumentationAsync("private", false, true).ConfigureAwait(false); - await this.TestConstructorDeclarationDocumentationAsync("protected", false, true).ConfigureAwait(false); - await this.TestConstructorDeclarationDocumentationAsync("internal", false, true).ConfigureAwait(false); - await this.TestConstructorDeclarationDocumentationAsync("protected internal", false, true).ConfigureAwait(false); - await this.TestConstructorDeclarationDocumentationAsync("public", false, true).ConfigureAwait(false); + await this.TestConstructorDeclarationDocumentationAsync(string.Empty, false, true).ConfigureAwait(true); + await this.TestConstructorDeclarationDocumentationAsync("private", false, true).ConfigureAwait(true); + await this.TestConstructorDeclarationDocumentationAsync("protected", false, true).ConfigureAwait(true); + await this.TestConstructorDeclarationDocumentationAsync("internal", false, true).ConfigureAwait(true); + await this.TestConstructorDeclarationDocumentationAsync("protected internal", false, true).ConfigureAwait(true); + await this.TestConstructorDeclarationDocumentationAsync("public", false, true).ConfigureAwait(true); } [Fact] public async Task TestDestructorWithoutDocumentationAsync() { - await this.TestDestructorDeclarationDocumentationAsync(true, false).ConfigureAwait(false); + await this.TestDestructorDeclarationDocumentationAsync(true, false).ConfigureAwait(true); } [Fact] public async Task TestDestructorWithDocumentationAsync() { - await this.TestDestructorDeclarationDocumentationAsync(false, true).ConfigureAwait(false); + await this.TestDestructorDeclarationDocumentationAsync(false, true).ConfigureAwait(true); } [Fact] public async Task TestFieldWithoutDocumentationAsync() { - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, string.Empty, false, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "private", false, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "protected", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "internal", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "protected internal", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "public", true, false).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, string.Empty, false, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "private", false, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "protected", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "internal", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "protected internal", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "public", true, false).ConfigureAwait(true); // Re-test with the 'documentPrivateElements' setting enabled (doesn't impact fields) var testSettings = @" @@ -176,12 +176,12 @@ public async Task TestFieldWithoutDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, false, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", false, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", true, false).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, false, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", false, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", true, false).ConfigureAwait(true); // Re-test with the 'documentInternalElements' setting disabled (does impact fields) testSettings = @" @@ -194,12 +194,12 @@ public async Task TestFieldWithoutDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, false, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", false, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", false, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", true, false).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, false, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", false, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", false, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", true, false).ConfigureAwait(true); // Re-test with the 'documentPrivateFields' setting enabled (does impact fields) testSettings = @" @@ -212,23 +212,23 @@ public async Task TestFieldWithoutDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", true, false).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", true, false).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", true, false).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", true, false).ConfigureAwait(true); } [Fact] public async Task TestFieldWithDocumentationAsync() { - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, string.Empty, false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "private", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "protected", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "internal", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "protected internal", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "public", false, true).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, string.Empty, false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "private", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "protected", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "internal", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "protected internal", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings: null, "public", false, true).ConfigureAwait(true); // Re-test with the 'documentPrivateElements' setting enabled (doesn't impact fields) var testSettings = @" @@ -241,12 +241,12 @@ public async Task TestFieldWithDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", false, true).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", false, true).ConfigureAwait(true); // Re-test with the 'documentInternalElements' setting disabled (does impact fields) testSettings = @" @@ -259,12 +259,12 @@ public async Task TestFieldWithDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", false, true).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", false, true).ConfigureAwait(true); // Re-test with the 'documentPrivateFields' setting enabled (does impact fields) testSettings = @" @@ -277,118 +277,118 @@ public async Task TestFieldWithDocumentationAsync() } "; - await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", false, true).ConfigureAwait(false); - await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", false, true).ConfigureAwait(false); + await this.TestFieldDeclarationDocumentationAsync(testSettings, string.Empty, false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "private", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "internal", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "protected internal", false, true).ConfigureAwait(true); + await this.TestFieldDeclarationDocumentationAsync(testSettings, "public", false, true).ConfigureAwait(true); } [Fact] public async Task TestPropertyWithoutDocumentationAsync() { - await this.TestPropertyDeclarationDocumentationAsync(string.Empty, false, false, false).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync(string.Empty, true, true, false).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync("private", false, false, false).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync("protected", false, true, false).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync("internal", false, true, false).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync("protected internal", false, true, false).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync("public", false, true, false).ConfigureAwait(false); - - await this.TestInterfacePropertyDeclarationDocumentationAsync(false).ConfigureAwait(false); + await this.TestPropertyDeclarationDocumentationAsync(string.Empty, false, false, false).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync(string.Empty, true, true, false).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync("private", false, false, false).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync("protected", false, true, false).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync("internal", false, true, false).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync("protected internal", false, true, false).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync("public", false, true, false).ConfigureAwait(true); + + await this.TestInterfacePropertyDeclarationDocumentationAsync(false).ConfigureAwait(true); } [Fact] public async Task TestPropertyWithDocumentationAsync() { - await this.TestPropertyDeclarationDocumentationAsync(string.Empty, false, false, true).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync(string.Empty, true, false, true).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync("private", false, false, true).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync("protected", false, false, true).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync("internal", false, false, true).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync("protected internal", false, false, true).ConfigureAwait(false); - await this.TestPropertyDeclarationDocumentationAsync("public", false, false, true).ConfigureAwait(false); - - await this.TestInterfacePropertyDeclarationDocumentationAsync(true).ConfigureAwait(false); + await this.TestPropertyDeclarationDocumentationAsync(string.Empty, false, false, true).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync(string.Empty, true, false, true).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync("private", false, false, true).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync("protected", false, false, true).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync("internal", false, false, true).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync("protected internal", false, false, true).ConfigureAwait(true); + await this.TestPropertyDeclarationDocumentationAsync("public", false, false, true).ConfigureAwait(true); + + await this.TestInterfacePropertyDeclarationDocumentationAsync(true).ConfigureAwait(true); } [Fact] public async Task TestIndexerWithoutDocumentationAsync() { - await this.TestIndexerDeclarationDocumentationAsync(string.Empty, false, false, false).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync(string.Empty, true, true, false).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync("private", false, false, false).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync("protected", false, true, false).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync("internal", false, true, false).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync("protected internal", false, true, false).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync("public", false, true, false).ConfigureAwait(false); - - await this.TestInterfaceIndexerDeclarationDocumentationAsync(false).ConfigureAwait(false); + await this.TestIndexerDeclarationDocumentationAsync(string.Empty, false, false, false).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync(string.Empty, true, true, false).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync("private", false, false, false).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync("protected", false, true, false).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync("internal", false, true, false).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync("protected internal", false, true, false).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync("public", false, true, false).ConfigureAwait(true); + + await this.TestInterfaceIndexerDeclarationDocumentationAsync(false).ConfigureAwait(true); } [Fact] public async Task TestIndexerWithDocumentationAsync() { - await this.TestIndexerDeclarationDocumentationAsync(string.Empty, false, false, true).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync(string.Empty, true, false, true).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync("private", false, false, true).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync("protected", false, false, true).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync("internal", false, false, true).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync("protected internal", false, false, true).ConfigureAwait(false); - await this.TestIndexerDeclarationDocumentationAsync("public", false, false, true).ConfigureAwait(false); - - await this.TestInterfaceIndexerDeclarationDocumentationAsync(true).ConfigureAwait(false); + await this.TestIndexerDeclarationDocumentationAsync(string.Empty, false, false, true).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync(string.Empty, true, false, true).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync("private", false, false, true).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync("protected", false, false, true).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync("internal", false, false, true).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync("protected internal", false, false, true).ConfigureAwait(true); + await this.TestIndexerDeclarationDocumentationAsync("public", false, false, true).ConfigureAwait(true); + + await this.TestInterfaceIndexerDeclarationDocumentationAsync(true).ConfigureAwait(true); } [Fact] public async Task TestEventWithoutDocumentationAsync() { - await this.TestEventDeclarationDocumentationAsync(string.Empty, false, false, false).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync(string.Empty, true, true, false).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync("private", false, false, false).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync("protected", false, true, false).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync("internal", false, true, false).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync("protected internal", false, true, false).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync("public", false, true, false).ConfigureAwait(false); - - await this.TestInterfaceEventDeclarationDocumentationAsync(false).ConfigureAwait(false); + await this.TestEventDeclarationDocumentationAsync(string.Empty, false, false, false).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync(string.Empty, true, true, false).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync("private", false, false, false).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync("protected", false, true, false).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync("internal", false, true, false).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync("protected internal", false, true, false).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync("public", false, true, false).ConfigureAwait(true); + + await this.TestInterfaceEventDeclarationDocumentationAsync(false).ConfigureAwait(true); } [Fact] public async Task TestEventWithDocumentationAsync() { - await this.TestEventDeclarationDocumentationAsync(string.Empty, false, false, true).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync(string.Empty, true, false, true).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync("private", false, false, true).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync("protected", false, false, true).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync("internal", false, false, true).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync("protected internal", false, false, true).ConfigureAwait(false); - await this.TestEventDeclarationDocumentationAsync("public", false, false, true).ConfigureAwait(false); - - await this.TestInterfaceEventDeclarationDocumentationAsync(true).ConfigureAwait(false); + await this.TestEventDeclarationDocumentationAsync(string.Empty, false, false, true).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync(string.Empty, true, false, true).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync("private", false, false, true).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync("protected", false, false, true).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync("internal", false, false, true).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync("protected internal", false, false, true).ConfigureAwait(true); + await this.TestEventDeclarationDocumentationAsync("public", false, false, true).ConfigureAwait(true); + + await this.TestInterfaceEventDeclarationDocumentationAsync(true).ConfigureAwait(true); } [Fact] public async Task TestEventFieldWithoutDocumentationAsync() { - await this.TestEventFieldDeclarationDocumentationAsync(string.Empty, false, false).ConfigureAwait(false); - await this.TestEventFieldDeclarationDocumentationAsync("private", false, false).ConfigureAwait(false); - await this.TestEventFieldDeclarationDocumentationAsync("protected", true, false).ConfigureAwait(false); - await this.TestEventFieldDeclarationDocumentationAsync("internal", true, false).ConfigureAwait(false); - await this.TestEventFieldDeclarationDocumentationAsync("protected internal", true, false).ConfigureAwait(false); - await this.TestEventFieldDeclarationDocumentationAsync("public", true, false).ConfigureAwait(false); + await this.TestEventFieldDeclarationDocumentationAsync(string.Empty, false, false).ConfigureAwait(true); + await this.TestEventFieldDeclarationDocumentationAsync("private", false, false).ConfigureAwait(true); + await this.TestEventFieldDeclarationDocumentationAsync("protected", true, false).ConfigureAwait(true); + await this.TestEventFieldDeclarationDocumentationAsync("internal", true, false).ConfigureAwait(true); + await this.TestEventFieldDeclarationDocumentationAsync("protected internal", true, false).ConfigureAwait(true); + await this.TestEventFieldDeclarationDocumentationAsync("public", true, false).ConfigureAwait(true); } [Fact] public async Task TestEventFieldWithDocumentationAsync() { - await this.TestEventFieldDeclarationDocumentationAsync(string.Empty, false, true).ConfigureAwait(false); - await this.TestEventFieldDeclarationDocumentationAsync("private", false, true).ConfigureAwait(false); - await this.TestEventFieldDeclarationDocumentationAsync("protected", false, true).ConfigureAwait(false); - await this.TestEventFieldDeclarationDocumentationAsync("internal", false, true).ConfigureAwait(false); - await this.TestEventFieldDeclarationDocumentationAsync("protected internal", false, true).ConfigureAwait(false); - await this.TestEventFieldDeclarationDocumentationAsync("public", false, true).ConfigureAwait(false); + await this.TestEventFieldDeclarationDocumentationAsync(string.Empty, false, true).ConfigureAwait(true); + await this.TestEventFieldDeclarationDocumentationAsync("private", false, true).ConfigureAwait(true); + await this.TestEventFieldDeclarationDocumentationAsync("protected", false, true).ConfigureAwait(true); + await this.TestEventFieldDeclarationDocumentationAsync("internal", false, true).ConfigureAwait(true); + await this.TestEventFieldDeclarationDocumentationAsync("protected internal", false, true).ConfigureAwait(true); + await this.TestEventFieldDeclarationDocumentationAsync("public", false, true).ConfigureAwait(true); } [Fact] @@ -408,8 +408,8 @@ public class OuterClass DiagnosticResult expected = Diagnostic().WithLocation(3, 14); - await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithDocumentation, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithEmptyDocumentation, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithDocumentation, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithEmptyDocumentation, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -430,8 +430,8 @@ public class OuterClass DiagnosticResult expected = Diagnostic().WithLocation(4, 14); - await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithDocumentation, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithEmptyDocumentation, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithDocumentation, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithEmptyDocumentation, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -442,7 +442,7 @@ public class OuterClass { }"; - await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithDocumentation, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithDocumentation, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -460,7 +460,7 @@ public class OuterClass public void SomeMethod() { } }"; - await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithDocumentation, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCodeWithDocumentation, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -485,7 +485,7 @@ public class OuterClass public void SomeMethod() { } }"; - await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -510,7 +510,7 @@ public class OuterClass public void SomeMethod() { } }"; - await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.LanguageVersion, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -596,7 +596,7 @@ public Test2(int param1, bool param2) }, FixedCode = fixedTestCode, DisabledDiagnostics = { "CS1591" }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -642,7 +642,7 @@ public class TestClass }, FixedCode = fixedTestCode, DisabledDiagnostics = { "CS1591" }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -679,7 +679,7 @@ public int DoSomething2() }, FixedCode = testCode, DisabledDiagnostics = { "CS1591" }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -818,7 +818,7 @@ public Task TestMethod6(T param1, int param2) }, FixedCode = fixedTestCode, DisabledDiagnostics = { "CS1591" }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } protected async Task TestTypeDeclarationDocumentationAsync(string type, string modifiers, bool requiresDiagnostic, bool hasDocumentation) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1601UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1601UnitTests.cs index 38daae2db..b7cb24cbe 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1601UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1601UnitTests.cs @@ -41,7 +41,7 @@ public async Task TestPartialTypeWithDocumentationAsync(string typeKeyword) public partial {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -58,7 +58,7 @@ public partial {0} DiagnosticResult expected = Diagnostic().WithLocation(3, 1); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), expected, CancellationToken.None).ConfigureAwait(true); // The same situation is allowed if 'documentExposedElements' and 'documentInterfaces' is false string interfaceSettingName = typeKeyword == "interface" ? "documentInterfaces" : "ignoredProperty"; @@ -72,7 +72,7 @@ public partial {0} }} }} "; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), currentTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), currentTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -92,7 +92,7 @@ public partial {0} DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), expected, CancellationToken.None).ConfigureAwait(true); // The same situation is allowed if 'documentExposedElements' and 'documentInterfaces' is false string interfaceSettingName = typeKeyword == "interface" ? "documentInterfaces" : "ignoredProperty"; @@ -106,7 +106,7 @@ public partial {0} }} }} "; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), currentTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeKeyword), currentTestSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -123,7 +123,7 @@ public partial class TypeName /// partial void MemberName(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -140,10 +140,10 @@ public partial class TypeName DiagnosticResult expected = Diagnostic().WithLocation(7, 18); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); // The same situation is allowed if 'documentPrivateElements' is false (the default) - await VerifyCSharpDiagnosticAsync(testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -163,10 +163,10 @@ public partial class TypeName DiagnosticResult expected = Diagnostic().WithLocation(10, 18); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); // The same situation is allowed if 'documentPrivateElements' is false (the default) - await VerifyCSharpDiagnosticAsync(testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1602UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1602UnitTests.cs index 636e08fda..a1fdaa3c2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1602UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1602UnitTests.cs @@ -31,7 +31,7 @@ enum TypeName /// Bar }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -45,7 +45,7 @@ enum TypeName DiagnosticResult expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -60,7 +60,7 @@ private enum TypeName } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -80,7 +80,7 @@ enum TypeName DiagnosticResult expected = Diagnostic().WithLocation(10, 5); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1604UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1604UnitTests.cs index 8bd4c8366..d79b1bc75 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1604UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1604UnitTests.cs @@ -27,7 +27,7 @@ public async Task TestTypeNoDocumentationAsync(string typeName) {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -41,7 +41,7 @@ public async Task TestTypeWithDocumentationAsync(string typeName) {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -53,7 +53,7 @@ public async Task TestTypeWithInheritedDocumentationAsync(string typeName) {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -69,7 +69,7 @@ public async Task TestTypeWithoutDocumentationAsync(string typeName) DiagnosticResult expected = Diagnostic().WithLocation(4, 1); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -83,7 +83,7 @@ public async Task TestPartialTypeWithoutDocumentationAsync(string typeName) {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -92,7 +92,7 @@ public async Task TestDelegateNoDocumentationAsync() var testCode = @" public delegate void TypeName();"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -104,7 +104,7 @@ public async Task TestDelegateWithDocumentationAsync() /// public delegate void TypeName();"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -114,7 +114,7 @@ public async Task TestDelegateWithInheritedDocumentationAsync() /// public delegate void TypeName();"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -127,7 +127,7 @@ public delegate DiagnosticResult expected = Diagnostic().WithLocation(4, 6); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -141,7 +141,7 @@ public class ClassName { public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -158,7 +158,7 @@ public class ClassName /// public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -173,7 +173,7 @@ public class ClassName /// public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -191,7 +191,7 @@ public void Test() { } DiagnosticResult expected = Diagnostic().WithLocation(8, 17); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -213,7 +213,7 @@ private void Test1() { } private void Test2() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -229,7 +229,7 @@ public partial class ClassName partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -243,7 +243,7 @@ public class ClassName { public ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -260,7 +260,7 @@ public class ClassName /// public ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -275,7 +275,7 @@ public class ClassName /// public ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -293,7 +293,7 @@ public ClassName() { } DiagnosticResult expected = Diagnostic().WithLocation(8, 12); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -307,7 +307,7 @@ public class ClassName { ~ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -324,7 +324,7 @@ public class ClassName /// ~ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -339,7 +339,7 @@ public class ClassName /// ~ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -357,7 +357,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(8, 6); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -374,7 +374,7 @@ public class ClassName /// public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -389,7 +389,7 @@ public class ClassName /// public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -403,7 +403,7 @@ public class ClassName { public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -421,7 +421,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(8, 22); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -438,7 +438,7 @@ public class ClassName /// public ClassName this[string t] { get { return null; } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -453,7 +453,7 @@ public class ClassName /// public ClassName this[string t] { get { return null; } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -467,7 +467,7 @@ public class ClassName { public ClassName this[string t] { get { return null; } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -485,7 +485,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(8, 22); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -502,7 +502,7 @@ public class ClassName /// public ClassName Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -517,7 +517,7 @@ public class ClassName /// public ClassName Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -531,7 +531,7 @@ public class ClassName { public ClassName Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -549,7 +549,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(8, 22); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -566,7 +566,7 @@ public class ClassName /// public event System.Action Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -581,7 +581,7 @@ public class ClassName /// public event System.Action Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -595,7 +595,7 @@ public class ClassName { public ClassName Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -613,7 +613,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(8, 32); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -630,7 +630,7 @@ public class ClassName /// event System.Action Foo { add { } remove { } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -645,7 +645,7 @@ public class ClassName /// event System.Action Foo { add { } remove { } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -659,7 +659,7 @@ public class ClassName { event System.Action Foo { add { } remove { } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -677,7 +677,7 @@ public event System.Action Foo { add { } remove { } } DiagnosticResult expected = Diagnostic().WithLocation(8, 32); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -695,7 +695,7 @@ public void MethodName() DiagnosticResult expected = Diagnostic().WithLocation(5, 17); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -711,7 +711,7 @@ public void MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -727,7 +727,7 @@ public void MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1605UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1605UnitTests.cs index 09190fa2b..ad3348d3f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1605UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1605UnitTests.cs @@ -37,7 +37,7 @@ public async Task TestTypeNoDocumentationAsync(string typeName) partial {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -51,7 +51,7 @@ public async Task TestTypeWithSummaryDocumentationAsync(string typeName) partial {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -65,7 +65,7 @@ public async Task TestTypeWithContentDocumentationAsync(string typeName) partial {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -77,7 +77,7 @@ public async Task TestTypeWithInheritedDocumentationAsync(string typeName) partial {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -93,7 +93,7 @@ public async Task TestTypeWithoutDocumentationAsync(string typeName) DiagnosticResult expected = Diagnostic().WithLocation(4, 1); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -107,7 +107,7 @@ public async Task TestNonPartialTypeWithoutDocumentationAsync(string typeName) {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -121,7 +121,7 @@ public partial class ClassName { partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -138,7 +138,7 @@ public partial class ClassName /// partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -155,7 +155,7 @@ public partial class ClassName /// partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -170,7 +170,7 @@ public partial class ClassName /// partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -188,7 +188,7 @@ public partial class ClassName DiagnosticResult expected = Diagnostic().WithLocation(8, 18); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -204,7 +204,7 @@ public partial class ClassName public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -219,7 +219,7 @@ public void Test() { } }"; var expected = Diagnostic().WithLocation(3, 22); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -245,7 +245,7 @@ public void Test() { } } "; - await VerifyCSharpDiagnosticAsync(testCode, testSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, testSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -259,7 +259,7 @@ public partial class ClassName public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -273,7 +273,7 @@ public partial class ClassName public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -287,7 +287,7 @@ public partial class ClassName public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1606UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1606UnitTests.cs index 19a2b9c8b..1af8f03a4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1606UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1606UnitTests.cs @@ -27,7 +27,7 @@ public async Task TestTypeNoDocumentationAsync(string typeName) {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -41,7 +41,7 @@ public async Task TestTypeWithDocumentationAsync(string typeName) {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -53,7 +53,7 @@ public async Task TestTypeWithInheritedDocumentationAsync(string typeName) {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -71,7 +71,7 @@ public async Task TestTypeWithoutDocumentationAsync(string typeName) DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -87,7 +87,7 @@ public async Task TestPartialTypeWithoutDocumentationAsync(string typeName) {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -96,7 +96,7 @@ public async Task TestDelegateNoDocumentationAsync() var testCode = @" public delegate void TypeName();"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -108,7 +108,7 @@ public async Task TestDelegateWithDocumentationAsync() /// public delegate void TypeName();"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -118,7 +118,7 @@ public async Task TestDelegateWithInheritedDocumentationAsync() /// public delegate void TypeName();"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -133,7 +133,7 @@ public delegate DiagnosticResult expected = Diagnostic().WithLocation(6, 6); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -147,7 +147,7 @@ public class ClassName { public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -164,7 +164,7 @@ public class ClassName /// public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -179,7 +179,7 @@ public class ClassName /// public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -199,7 +199,7 @@ public void Test() { } DiagnosticResult expected = Diagnostic().WithLocation(10, 17); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -217,7 +217,7 @@ public partial class ClassName partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -231,7 +231,7 @@ public class ClassName { public ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -248,7 +248,7 @@ public class ClassName /// public ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -263,7 +263,7 @@ public class ClassName /// public ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -283,7 +283,7 @@ public ClassName() { } DiagnosticResult expected = Diagnostic().WithLocation(10, 12); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -297,7 +297,7 @@ public class ClassName { ~ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -314,7 +314,7 @@ public class ClassName /// ~ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -329,7 +329,7 @@ public class ClassName /// ~ClassName() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -349,7 +349,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(10, 6); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -366,7 +366,7 @@ public class ClassName /// public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -381,7 +381,7 @@ public class ClassName /// public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -395,7 +395,7 @@ public class ClassName { public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -415,7 +415,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(10, 22); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -432,7 +432,7 @@ public class ClassName /// public ClassName this[string t] { get { return null; } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -447,7 +447,7 @@ public class ClassName /// public ClassName this[string t] { get { return null; } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -461,7 +461,7 @@ public class ClassName { public ClassName this[string t] { get { return null; } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -481,7 +481,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(10, 22); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -498,7 +498,7 @@ public class ClassName /// public ClassName Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -513,7 +513,7 @@ public class ClassName /// public ClassName Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -527,7 +527,7 @@ public class ClassName { public ClassName Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -547,7 +547,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(10, 22); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -564,7 +564,7 @@ public class ClassName /// public event System.Action Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -579,7 +579,7 @@ public class ClassName /// public event System.Action Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -593,7 +593,7 @@ public class ClassName { public ClassName Foo; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -613,7 +613,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(10, 32); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -630,7 +630,7 @@ public class ClassName /// event System.Action Foo { add { } remove { } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -645,7 +645,7 @@ public class ClassName /// event System.Action Foo { add { } remove { } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -659,7 +659,7 @@ public class ClassName { event System.Action Foo { add { } remove { } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -679,7 +679,7 @@ event System.Action Foo { add { } remove { } } DiagnosticResult expected = Diagnostic().WithLocation(10, 25); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -697,7 +697,7 @@ public void MethodName() DiagnosticResult expected = Diagnostic().WithLocation(5, 17); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -713,7 +713,7 @@ public void MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -729,7 +729,7 @@ public void MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact(DisplayName = "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1944")] @@ -750,7 +750,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(11, 19); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -769,7 +769,7 @@ public string MethodName DiagnosticResult.CompilerError("CS1002").WithMessage("; expected").WithLocation(5, 29), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1607UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1607UnitTests.cs index cb6324878..b4cc3a778 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1607UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1607UnitTests.cs @@ -27,7 +27,7 @@ public async Task TestTypeNoDocumentationAsync(string typeName) partial {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -41,7 +41,7 @@ public async Task TestTypeWithSummaryDocumentationAsync(string typeName) partial {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -55,7 +55,7 @@ public async Task TestTypeWithContentDocumentationAsync(string typeName) partial {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -67,7 +67,7 @@ public async Task TestTypeWithInheritedDocumentationAsync(string typeName) partial {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -85,7 +85,7 @@ public async Task TestTypeWithoutSummaryDocumentationAsync(string typeName) DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -100,7 +100,7 @@ public async Task TestNonPartialTypeWithoutSummaryDocumentationAsync(string type {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -118,7 +118,7 @@ public async Task TestTypeWithoutContentDocumentationAsync(string typeName) DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -133,7 +133,7 @@ public async Task TestNonPartialTypeWithoutContentDocumentationAsync(string type {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -147,7 +147,7 @@ public partial class ClassName { partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -164,7 +164,7 @@ public partial class ClassName /// partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -181,7 +181,7 @@ public partial class ClassName /// partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -196,7 +196,7 @@ public partial class ClassName /// partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -216,7 +216,7 @@ public partial class ClassName DiagnosticResult expected = Diagnostic().WithLocation(10, 18); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -234,7 +234,7 @@ public partial class ClassName public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -254,7 +254,7 @@ public partial class ClassName DiagnosticResult expected = Diagnostic().WithLocation(10, 18); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -272,7 +272,7 @@ public partial class ClassName public void Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -288,7 +288,7 @@ public partial class ClassName partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -305,7 +305,7 @@ public partial class ClassName }"; var expected = Diagnostic().WithLocation(8, 18); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -322,7 +322,7 @@ public partial class ClassName }"; var expected = Diagnostic().WithLocation(8, 18); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -338,7 +338,7 @@ public partial class ClassName partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -354,7 +354,7 @@ public partial class ClassName partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -370,7 +370,7 @@ public partial class ClassName partial void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } protected static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1608UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1608UnitTests.cs index d5b8d80dc..f6c6d8b84 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1608UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1608UnitTests.cs @@ -27,7 +27,7 @@ public async Task TestTypeNoDocumentationAsync(string typeName) {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -41,7 +41,7 @@ public async Task TestTypeWithSummaryDocumentationAsync(string typeName) {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -55,7 +55,7 @@ public async Task TestTypeWithContentDocumentationAsync(string typeName) {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -67,7 +67,7 @@ public async Task TestTypeWithInheritedDocumentationAsync(string typeName) {0} TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -82,7 +82,7 @@ public async Task TestTypeWithoutSummaryDocumentationAsync(string typeName) TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -97,7 +97,7 @@ public async Task TestTypeWithoutContentDocumentationAsync(string typeName) TypeName {{ }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, typeName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -114,7 +114,7 @@ public async Task TestTypeWithDefaultDocumentationAsync(string typeName) DiagnosticResult expected = Diagnostic().WithLocation(2, 5); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -131,7 +131,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(2, 5); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -146,7 +146,7 @@ public enum EnumName EnumMember1 = 0, } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -173,7 +173,7 @@ public enum EnumName Diagnostic().WithLocation(9, 9), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -184,7 +184,7 @@ public async Task TestClassWithIncludedEmptyDocumentationAsync() public class ClassName { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -196,7 +196,7 @@ public async Task TestClassWithIncludedMissingDocumentationAsync() public class ClassName { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -207,7 +207,7 @@ public async Task TestClassWithIncludedSummaryDocumentationAsync() public class ClassName { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -221,7 +221,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(3, 14); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -234,7 +234,7 @@ public class ClassName /// public int FieldName; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -250,7 +250,7 @@ public class ClassName DiagnosticResult expected = Diagnostic().WithLocation(0); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1609UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1609UnitTests.cs index 41eb9263a..f7a98f889 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1609UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1609UnitTests.cs @@ -35,7 +35,7 @@ public class ClassName /// public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -50,7 +50,7 @@ public class ClassName /// public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -64,7 +64,7 @@ public class ClassName { public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -98,7 +98,7 @@ public class ClassName }"; DiagnosticResult expected = Diagnostic().WithLocation(10, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -132,7 +132,7 @@ public class ClassName }"; DiagnosticResult expected = Diagnostic().WithLocation(10, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -169,7 +169,7 @@ public class ClassName }}"; DiagnosticResult expected = Diagnostic().WithLocation(10, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -203,7 +203,7 @@ public ClassName Property { set { } } }"; DiagnosticResult expected = Diagnostic().WithLocation(10, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -237,7 +237,7 @@ public class ClassName }"; DiagnosticResult expected = Diagnostic().WithLocation(10, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -273,7 +273,7 @@ public int Property }"; DiagnosticResult expected = Diagnostic().WithLocation(6, 16); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -293,7 +293,7 @@ public int Property } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -313,7 +313,7 @@ public int Property } }"; var expected = Diagnostic().WithLocation(5, 16); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -342,7 +342,7 @@ public int Property } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -367,7 +367,7 @@ private int Property private ClassName PropertyWithSummary { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1610UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1610UnitTests.cs index b64e2279b..a717691c3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1610UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1610UnitTests.cs @@ -32,7 +32,7 @@ public class ClassName /// public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -47,7 +47,7 @@ public class ClassName /// public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -61,7 +61,7 @@ public class ClassName { public ClassName Property { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -80,7 +80,7 @@ public class ClassName }"; // Reported by SA1609 instead. - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -99,7 +99,7 @@ public class ClassName }"; DiagnosticResult expected = Diagnostic().WithLocation(10, 22); - await VerifyCSharpFixAsync(testCode, expected, testCode, offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -124,7 +124,7 @@ public class ClassName var fixedCode = testCode; DiagnosticResult expected = Diagnostic().WithLocation(13, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -161,7 +161,7 @@ public class ClassName }"; DiagnosticResult expected = Diagnostic().WithLocation(13, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -198,7 +198,7 @@ public class ClassName }"; DiagnosticResult expected = Diagnostic().WithLocation(13, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -235,7 +235,7 @@ public ClassName Property { set { } } }"; DiagnosticResult expected = Diagnostic().WithLocation(13, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -272,7 +272,7 @@ public class ClassName }"; DiagnosticResult expected = Diagnostic().WithLocation(13, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } /// @@ -292,7 +292,7 @@ public int Property } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -311,7 +311,7 @@ public int Property get; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -331,7 +331,7 @@ public int Property } }"; var expected = Diagnostic().WithLocation(5, 16); - await VerifyCSharpFixAsync(testCode, expected, testCode, offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } /// @@ -360,7 +360,7 @@ public int Property } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1611UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1611UnitTests.cs index 358d96db8..a2f7ed937 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1611UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1611UnitTests.cs @@ -53,7 +53,7 @@ public class ClassName /// Param 3 public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -74,7 +74,7 @@ public class ClassName /// Param 3 public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -95,7 +95,7 @@ public class ClassName /// public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -110,7 +110,7 @@ public class ClassName { public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -126,7 +126,7 @@ public class ClassName /// public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -151,7 +151,7 @@ public class ClassName Diagnostic().WithLocation(10, 68).WithArguments("param3"), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -170,7 +170,7 @@ private void Test1(int arg) { } private void Test2(int arg) { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -184,7 +184,7 @@ internal class ClassName private void TestMethod(string param1, string param2, string param3) { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -220,7 +220,7 @@ public static explicit operator TestClass(int value) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -260,7 +260,7 @@ public static explicit operator TestClass(int value) Diagnostic().WithLocation(18, 51).WithArguments("value"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -281,7 +281,7 @@ public void TestMethod(string param1, string param2, string param3) { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -309,7 +309,7 @@ public void TestMethod(string param1, string param2, string param3) Diagnostic().WithLocation(8, 65).WithArguments("param3"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -339,7 +339,7 @@ public void TestMethod(string {|#0:param1|}, string {|#1:param2|}, string {|#2:p Diagnostic().WithLocation(2).WithArguments("param3"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -365,7 +365,7 @@ public void TestMethod(string param1, string param2, string param3) Diagnostic().WithLocation(8, 35).WithArguments("param1"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -388,7 +388,7 @@ public void TestMethod(string param1, string param2, string param3) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -409,7 +409,7 @@ public void TestMethod(string param1, string param2, string param3) { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } protected static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1612UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1612UnitTests.cs index 5f483e2c9..80d376bb6 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1612UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1612UnitTests.cs @@ -59,7 +59,7 @@ public class ClassName { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -74,7 +74,7 @@ public class ClassName public void Method() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -88,7 +88,7 @@ public class ClassName { public ClassName Method() { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -106,7 +106,7 @@ public class ClassName /// $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -127,7 +127,7 @@ public class ClassName ///Test $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -158,7 +158,7 @@ public class ClassName } } "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), testSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), testSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -190,7 +190,7 @@ public class ClassName }; var expected = GetExpectedDiagnostics(normallyExpected, declaration); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -220,7 +220,7 @@ public class ClassName }; var expected = GetExpectedDiagnostics(normallyExpected, declaration); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -243,7 +243,7 @@ public class ClassName ///Test $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -276,7 +276,7 @@ public class ClassName }; var expected = GetExpectedDiagnostics(normallyExpected, declaration); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); var testSettings = @" { @@ -294,7 +294,7 @@ public class ClassName }; expected = GetExpectedDiagnostics(normallyExpected, declaration); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), testSettings, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), testSettings, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -323,7 +323,7 @@ public class ClassName var normallyExpected = diagnostic.WithLocation(13, 22).WithArguments("bar", 2); var expected = GetExpectedDiagnostics(normallyExpected, declaration); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -340,7 +340,7 @@ public class ClassName public delegate void (int foo); }"; - await VerifyCSharpDiagnosticAsync(testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, ignoreCompilerDiagnostics: true, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, ignoreCompilerDiagnostics: true, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -356,7 +356,7 @@ public class ClassName /// $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -368,7 +368,7 @@ public class ClassName { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -383,7 +383,7 @@ public class ClassName /// public ClassName Method() { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -399,7 +399,7 @@ public class ClassName /// public ClassName Method() { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -415,7 +415,7 @@ public class ClassName /// $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -440,7 +440,7 @@ public class ClassName }; var expected = GetExpectedDiagnostics(normallyExpected, declaration); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -455,7 +455,7 @@ public class ClassName /// public ClassName Method(string foo, string bar, string @new) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -483,7 +483,7 @@ public class ClassName }; var expected = GetExpectedDiagnostics(normallyExpected, declaration); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); // This is even reported if the documentation is not required, except that no warning is reported for the // first param element (which is actually the last parameter) since it would otherwise be allowed to skip @@ -505,7 +505,7 @@ public class ClassName }; expected = GetExpectedDiagnostics(normallyExpected, declaration); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), testSettings, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), testSettings, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -528,7 +528,7 @@ public class ClassName var normallyExpected = diagnostic.WithLocation(0).WithArguments("bar", 2); var expected = GetExpectedDiagnostics(normallyExpected, declaration); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -544,7 +544,7 @@ public class ClassName public delegate void (int foo); }"; - await VerifyCSharpDiagnosticAsync(testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, ignoreCompilerDiagnostics: true, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, ignoreCompilerDiagnostics: true, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -559,7 +559,7 @@ public class ClassName /// public ClassName Method(string foo, string bar, string @new) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private static DiagnosticResult[] GetExpectedDiagnostics(DiagnosticResult normallyExpected, string declaration) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1613UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1613UnitTests.cs index a48df526b..6ad2140ad 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1613UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1613UnitTests.cs @@ -40,7 +40,7 @@ public class ClassName { public ClassName Method() { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -58,7 +58,7 @@ public class ClassName /// $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -78,7 +78,7 @@ public class ClassName ///Test $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -109,7 +109,7 @@ public class ClassName Diagnostic().WithLocation(13, 15), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -138,7 +138,7 @@ public class ClassName Diagnostic().WithLocation(11, 15), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -153,7 +153,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -169,7 +169,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -184,7 +184,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -208,7 +208,7 @@ public class ClassName Diagnostic().WithLocation(8, 22), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -232,7 +232,7 @@ public class ClassName Diagnostic().WithLocation(8, 22), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1614UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1614UnitTests.cs index 435b1aa76..dec5dbd50 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1614UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1614UnitTests.cs @@ -40,7 +40,7 @@ public class ClassName { $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -58,7 +58,7 @@ public class ClassName /// $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -78,7 +78,7 @@ public class ClassName ///Test $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -107,7 +107,7 @@ public class ClassName Diagnostic().WithLocation(11, 8), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -138,7 +138,7 @@ public class ClassName Diagnostic().WithLocation(11, 8), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -153,7 +153,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -169,7 +169,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -184,7 +184,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -199,7 +199,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -221,7 +221,7 @@ public class ClassName Diagnostic().WithLocation(8, 22), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -243,7 +243,7 @@ public class ClassName Diagnostic().WithLocation(8, 22), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1615UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1615UnitTests.cs index edc75b52a..3d5ed0fbd 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1615UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1615UnitTests.cs @@ -82,7 +82,7 @@ public class ClassName { $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -100,7 +100,7 @@ public class ClassName /// $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -119,7 +119,7 @@ public class ClassName /// Foo $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -151,7 +151,7 @@ public class ClassName }"; var expected = Diagnostic().WithLocation(10, 21); - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, fixedCode.Replace("$$", declaration), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, fixedCode.Replace("$$", declaration), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -187,7 +187,7 @@ public class ClassName }"; var expected = Diagnostic().WithLocation(12, 21); - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, fixedCode.Replace("$$", declaration), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, fixedCode.Replace("$$", declaration), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -229,7 +229,7 @@ internal sealed class ##Attribute : System.Attribute { } "; var expected = Diagnostic().WithLocation(13, 21); - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration).Replace("##", testAttribute), expected, fixedCode.Replace("$$", declaration).Replace("##", testAttribute), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration).Replace("##", testAttribute), expected, fixedCode.Replace("$$", declaration).Replace("##", testAttribute), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -248,7 +248,7 @@ public class ClassName /// Foo $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -265,7 +265,7 @@ public class ClassName /// public ClassName Test() { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -284,7 +284,7 @@ public int MethodName() DiagnosticResult expected = Diagnostic().WithLocation(5, 12); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -301,7 +301,7 @@ public int MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -318,7 +318,7 @@ public int MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -337,7 +337,7 @@ internal class ClassName private int Test2(int arg) { throw new System.NotImplementedException(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1616UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1616UnitTests.cs index a3d89e77c..b48b2f75f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1616UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1616UnitTests.cs @@ -72,7 +72,7 @@ public class ClassName { $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -90,7 +90,7 @@ public class ClassName /// $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -109,7 +109,7 @@ public class ClassName ///Test $$ }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -134,7 +134,7 @@ public class ClassName var expected = Diagnostic().WithLocation(10, 8); // The code fix does not alter this case. - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, testCode.Replace("$$", declaration), offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, testCode.Replace("$$", declaration), offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -157,7 +157,7 @@ public class ClassName var expected = Diagnostic().WithLocation(10, 8); // The code fix does not alter this case. - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, testCode.Replace("$$", declaration), offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, testCode.Replace("$$", declaration), offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -180,7 +180,7 @@ public class ClassName var expected = Diagnostic().WithLocation(10, 8); // The code fix does not alter this case. - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, testCode.Replace("$$", declaration), offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, testCode.Replace("$$", declaration), offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -217,7 +217,7 @@ public class ClassName }"; var expected = Diagnostic().WithLocation(12, 9); - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, fixedCode.Replace("$$", declaration), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, fixedCode.Replace("$$", declaration), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -254,7 +254,7 @@ public class ClassName }"; var expected = Diagnostic().WithLocation(12, 9); - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, fixedCode.Replace("$$", declaration), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, fixedCode.Replace("$$", declaration), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -293,7 +293,7 @@ public class ClassName }"; var expected = Diagnostic().WithLocation(12, 9); - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, fixedCode.Replace("$$", declaration), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration), expected, fixedCode.Replace("$$", declaration), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -337,7 +337,7 @@ internal sealed class ##Attribute : System.Attribute { } var expected = Diagnostic().WithLocation(12, 9); - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration).Replace("##", testAttribute), expected, fixedCode.Replace("$$", declaration).Replace("##", testAttribute), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration).Replace("##", testAttribute), expected, fixedCode.Replace("$$", declaration).Replace("##", testAttribute), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -381,7 +381,7 @@ internal sealed class ##Attribute : System.Attribute { } var expected = Diagnostic().WithLocation(12, 9); - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration).Replace("##", testAttribute), expected, fixedCode.Replace("$$", declaration).Replace("##", testAttribute), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration).Replace("##", testAttribute), expected, fixedCode.Replace("$$", declaration).Replace("##", testAttribute), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -427,7 +427,7 @@ internal sealed class ##Attribute : System.Attribute { } var expected = Diagnostic().WithLocation(12, 9); - await VerifyCSharpFixAsync(testCode.Replace("$$", declaration).Replace("##", testAttribute), expected, fixedCode.Replace("$$", declaration).Replace("##", testAttribute), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode.Replace("$$", declaration).Replace("##", testAttribute), expected, fixedCode.Replace("$$", declaration).Replace("##", testAttribute), offerEmptyFixer: false, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -442,7 +442,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -458,7 +458,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -473,7 +473,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -488,7 +488,7 @@ public class ClassName /// public ClassName Method(string foo, string bar) { return null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -507,7 +507,7 @@ public class ClassName var expected = Diagnostic().WithLocation(8, 22); // The code fix does not alter this case. - await VerifyCSharpFixAsync(testCode, expected, testCode, offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -526,7 +526,7 @@ public class ClassName var expected = Diagnostic().WithLocation(8, 22); // The code fix does not alter this case. - await VerifyCSharpFixAsync(testCode, expected, testCode, offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -545,7 +545,7 @@ public class ClassName var expected = Diagnostic().WithLocation(8, 22); // The code fix does not alter this case. - await VerifyCSharpFixAsync(testCode, expected, testCode, offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, offerEmptyFixer: true, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1617UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1617UnitTests.cs index 3094623dd..960406a85 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1617UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1617UnitTests.cs @@ -37,7 +37,7 @@ public class ClassName /// public delegate ClassName MethodDelegate(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -61,7 +61,7 @@ public class ClassName /// Some value public delegate ClassName MethodDelegate(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -77,7 +77,7 @@ public class ClassName public delegate ClassName MethodDelegate(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -95,7 +95,7 @@ public class ClassName /// public delegate ClassName MethodDelegate(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -117,7 +117,7 @@ public void Method() { } /// public delegate void MethodDelegate(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -148,7 +148,7 @@ public void Method() { } Diagnostic().WithLocation(16, 9), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -184,7 +184,7 @@ public class ClassName public void Method() { } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -219,7 +219,7 @@ public class ClassName public void Method() { } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -254,7 +254,7 @@ public class ClassName public void Method() { } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -271,7 +271,7 @@ public class ClassName public void Method() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -289,7 +289,7 @@ public void Method() { } }"; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -314,7 +314,7 @@ public class ClassName : ITestInterface public void Method() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1618UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1618UnitTests.cs index bfd881455..6907760dc 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1618UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1618UnitTests.cs @@ -68,7 +68,7 @@ public class ClassName /// public void Foo() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -79,7 +79,7 @@ public async Task TestTypesWithoutTypeParametersAsync() /// Foo /// public class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -99,7 +99,7 @@ public class ClassName /// Param 2 public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -113,7 +113,7 @@ public async Task TestTypesWithAllDocumentationAsync(string p) /// Param 1 /// Param 2 public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -133,7 +133,7 @@ public class ClassName /// Param 2 public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -147,7 +147,7 @@ public async Task TestTypesWithAllDocumentationAlternativeSyntaxAsync(string p) /// Param 1 /// Param 2 public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -167,7 +167,7 @@ public class ClassName /// Param 1 public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -181,7 +181,7 @@ public async Task TestTypesWithAllDocumentationWrongOrderAsync(string p) /// Param 2 /// Param 1 public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -196,7 +196,7 @@ public class ClassName { public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -205,7 +205,7 @@ public async Task TestTypesWithNoDocumentationAsync(string p) { var testCode = @" public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -221,7 +221,7 @@ public class ClassName /// public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -231,7 +231,7 @@ public async Task TestTypesInheritDocAsync(string p) var testCode = @" /// public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -255,7 +255,7 @@ public class ClassName Diagnostic().WithLocation(10, 34).WithArguments("Tb"), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -274,7 +274,7 @@ public async Task TestTypesWithMissingDocumentationAsync(string p) Diagnostic().WithLocation(1).WithArguments("Tb"), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -287,7 +287,7 @@ public async Task TestPartialTypesWithMissingDocumentationAsync(string p) /// public partial ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -304,7 +304,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -325,7 +325,7 @@ public void TestMethod(T param1) { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -343,7 +343,7 @@ public class TestClass "; var expected = Diagnostic().WithLocation(3, 24).WithArguments("T"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -365,7 +365,7 @@ public void TestMethod(T param1) { } "; var expected = Diagnostic().WithLocation(8, 26).WithArguments("T"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -382,7 +382,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -403,7 +403,7 @@ public void TestMethod(T param1) { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -422,7 +422,7 @@ private void Test1(int arg) { } private void Test2(int arg) { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } protected static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1619UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1619UnitTests.cs index fbfd0508f..f051ae2d8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1619UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1619UnitTests.cs @@ -50,7 +50,7 @@ public async Task TestTypesWithoutTypeParametersAsync() /// Foo /// public partial class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -64,7 +64,7 @@ public async Task TestPartialTypesWithAllDocumentationAsync(string p) /// Param 1 /// Param 2 public partial ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -78,7 +78,7 @@ public async Task TestPartialTypesWithAllDocumentationAlternativeSyntaxAsync(str /// Param 1 /// Param 2 public partial ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -92,7 +92,7 @@ public async Task TestPartialTypesWithAllDocumentationWrongOrderAsync(string p) /// Param 2 /// Param 1 public partial ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -101,7 +101,7 @@ public async Task TestPartialTypesWithNoDocumentationAsync(string p) { var testCode = @" public partial ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -111,7 +111,7 @@ public async Task TestPartialTypesInheritDocAsync(string p) var testCode = @" /// public partial ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -130,7 +130,7 @@ public async Task TestPartialTypesWithMissingDocumentationAsync(string p) Diagnostic().WithLocation(1).WithArguments("Tb"), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -156,7 +156,7 @@ public async Task TestPartialTypesWithMissingButNotRequiredDocumentationAsync(st }} }} "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), testSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), testSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -169,7 +169,7 @@ public async Task TestNonPartialTypesWithMissingDocumentationAsync(string p) /// public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -182,7 +182,7 @@ public async Task TestPartialTypesWithContentDocumentationAsync(string p) /// public partial ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -199,7 +199,7 @@ public partial class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -216,7 +216,7 @@ public partial class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -234,7 +234,7 @@ public partial class TestClass "; var expected = Diagnostic().WithLocation(3, 32).WithArguments("T"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -259,7 +259,7 @@ public partial class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, testSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, testSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -276,7 +276,7 @@ public partial class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } protected static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1620UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1620UnitTests.cs index d4f1746dc..48aec6757 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1620UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1620UnitTests.cs @@ -58,7 +58,7 @@ public class ClassName /// public void Foo() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -69,7 +69,7 @@ public async Task TestTypesWithoutTypeParametersAsync() /// Foo /// public class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -89,7 +89,7 @@ public class ClassName /// Param 2 public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -103,7 +103,7 @@ public async Task TestTypesWithAllDocumentationAsync(string p) /// Param 1 /// Param 2 public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -123,7 +123,7 @@ public class ClassName /// Param 2 public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -137,7 +137,7 @@ public async Task TestTypesWithAllDocumentationAlternativeSyntaxAsync(string p) /// Param 1 /// Param 2 public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -166,7 +166,7 @@ public class ClassName diagnostic.WithLocation(11, 26).WithArguments("Ta", 1), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -189,7 +189,7 @@ public async Task TestTypesWithAllDocumentationWrongOrderAsync(string p) diagnostic.WithLocation(6, 22).WithArguments("Ta", 1), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -204,7 +204,7 @@ public class ClassName { public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -213,7 +213,7 @@ public async Task TestTypesWithNoDocumentationAsync(string p) { var testCode = @" public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -229,7 +229,7 @@ public class ClassName /// public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -239,7 +239,7 @@ public async Task TestTypesInheritDocAsync(string p) var testCode = @" /// public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -258,7 +258,7 @@ public class ClassName public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -271,7 +271,7 @@ public async Task TestTypesWithMissingDocumentationAsync(string p) /// public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -296,7 +296,7 @@ public class ClassName var diagnostic = Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1620MissingTypeParameterDescriptor); var expected = diagnostic.WithLocation(12, 26).WithArguments("Tc"); - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -315,7 +315,7 @@ public async Task TestTypesWithInvalidDocumentationAsync(string p) var diagnostic = Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1620MissingTypeParameterDescriptor); var expected = diagnostic.WithLocation(7, 22).WithArguments("Tc"); - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -340,7 +340,7 @@ public class ClassName var diagnostic = Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1620WrongOrderDescriptor); var expected = diagnostic.WithLocation(12, 26).WithArguments("Tb", 2); - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -359,7 +359,7 @@ public async Task TestTypesWithTooManyDocumentationAsync(string p) var diagnostic = Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1620WrongOrderDescriptor); var expected = diagnostic.WithLocation(7, 22).WithArguments("Tb", 2); - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -376,7 +376,7 @@ public async Task TestTypeWithIncludedDocumentationAsync(string p) public ## "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -393,7 +393,7 @@ public async Task TestTypeWithoutTypeparamInIncludedDocumentationAsync(string p) public ## "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -410,7 +410,7 @@ public async Task TestTypeWithInheritDocInIncludedDocumentationAsync(string p) public ## "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -433,7 +433,7 @@ public async Task TestTypeWithWronglyOrderedTypeParamInIncludedDocumentationAsyn diagnostic.WithLocation(2, 5).WithArguments("Ta", 1), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -459,7 +459,7 @@ public async Task TestTypeWithMissingTypeParamInIncludedDocumentationAsync(strin missingDiagnostic.WithLocation(2, 5).WithArguments("Tc"), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -480,7 +480,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -501,7 +501,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -522,7 +522,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -549,7 +549,7 @@ public class TestClass diagnostic.WithLocation(5, 9).WithArguments("Ta", 1), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -579,7 +579,7 @@ public class TestClass missingDiagnostic.WithLocation(5, 9).WithArguments("Tc"), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1621UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1621UnitTests.cs index 2a8301a10..f1ccb055b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1621UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1621UnitTests.cs @@ -56,7 +56,7 @@ public class ClassName { public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -65,7 +65,7 @@ public async Task TestTypesWithNoDocumentationAsync(string p) { var testCode = @" public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -76,7 +76,7 @@ public async Task TestTypesWithoutTypeParametersAsync() /// Foo /// public class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -96,7 +96,7 @@ public class ClassName /// Param 2 public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -110,7 +110,7 @@ public async Task TestTypesWithAllDocumentationAsync(string p) /// Param 1 /// Param 2 public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -141,7 +141,7 @@ public class ClassName Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1621Descriptor).WithLocation(13, 25), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -166,7 +166,7 @@ public async Task TestTypesWithInvalidParamsAsync(string declaration) Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1621Descriptor).WithLocation(8, 21), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -183,7 +183,7 @@ public async Task TestTypeWithIncludedDocumentationAsync(string p) public ## "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -200,7 +200,7 @@ public async Task TestTypeWithoutTypeparamInIncludedDocumentationAsync(string p) public ## "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -217,7 +217,7 @@ public async Task TestTypeWithInheritDocInIncludedDocumentationAsync(string p) public ## "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -240,7 +240,7 @@ public async Task TestTypeWithInvalidTypeParamInIncludedDocumentationAsync(strin Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1621Descriptor).WithLocation(2, 5), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -261,7 +261,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -282,7 +282,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -303,7 +303,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -330,7 +330,7 @@ public class TestClass Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1621Descriptor).WithLocation(5, 9), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), expected, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1622UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1622UnitTests.cs index 739b9bfef..467f3e758 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1622UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1622UnitTests.cs @@ -56,7 +56,7 @@ public class ClassName { public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -65,7 +65,7 @@ public async Task TestTypesWithNoDocumentationAsync(string p) { var testCode = @" public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -76,7 +76,7 @@ public async Task TestTypesWithoutTypeParametersAsync() /// Foo /// public class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -96,7 +96,7 @@ public class ClassName /// Param 2 public ## }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -110,7 +110,7 @@ public async Task TestTypesWithAllDocumentationAsync(string p) /// Param 1 /// Param 2 public ##"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", p), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -139,7 +139,7 @@ public class ClassName Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1622Descriptor).WithLocation(11, 8), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -162,7 +162,7 @@ public async Task TestTypesWithEmptyParamsAsync(string declaration) Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1622Descriptor).WithLocation(6, 4), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -193,7 +193,7 @@ public class ClassName Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1622Descriptor).WithLocation(11, 8), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -217,7 +217,7 @@ public async Task TestTypesWithEmptyParams2Async(string declaration) Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1622Descriptor).WithLocation(6, 4), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", declaration), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -234,7 +234,7 @@ public async Task TestTypesWithValidTypeparameterInIncludedDocumentationAsync(st public ## "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", typeText), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", typeText), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -256,7 +256,7 @@ public async Task TestTypesWithEmptyTypeparameterInIncludedDocumentationAsync(st Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1622Descriptor).WithLocation(2, 5), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", typeText), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", typeText), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -277,7 +277,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", memberText), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", memberText), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -304,7 +304,7 @@ public class TestClass Diagnostic(GenericTypeParameterDocumentationAnalyzer.SA1622Descriptor).WithLocation(5, 9), }; - await VerifyCSharpDiagnosticAsync(testCode.Replace("##", memberText), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("##", memberText), expected, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1623UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1623UnitTests.cs index df7ba5631..3f5521a94 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1623UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1623UnitTests.cs @@ -77,7 +77,7 @@ public class TestClass "; var expected = Diagnostic(PropertySummaryDocumentationAnalyzer.SA1623Descriptor).WithLocation(7, 7 + accessibility.Length + type.Length).WithArguments(expectedArgument); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -145,7 +145,7 @@ private class PrivateTestClass "; var expected = Diagnostic(PropertySummaryDocumentationAnalyzer.SA1623Descriptor).WithLocation(9, 11 + accessibility.Length + type.Length).WithArguments(expectedArgument); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -166,7 +166,7 @@ public int Property }"; var expected = Diagnostic(PropertySummaryDocumentationAnalyzer.SA1623Descriptor).WithLocation(4, 16).WithArguments("Gets"); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -200,7 +200,7 @@ public int Property3 } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -266,7 +266,7 @@ public int Property3 Diagnostic(PropertySummaryDocumentationAnalyzer.SA1623Descriptor).WithLocation(12, 16).WithArguments("Sets"), Diagnostic(PropertySummaryDocumentationAnalyzer.SA1623Descriptor).WithLocation(22, 16).WithArguments("Sets"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -324,7 +324,7 @@ public class TestClass Diagnostic(PropertySummaryDocumentationAnalyzer.SA1623Descriptor).WithLocation(7, 7 + accessibility.Length + type.Length).WithArguments(expectedArgument), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -343,7 +343,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -363,7 +363,7 @@ public class TestClass }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1624UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1624UnitTests.cs index 71427fc32..e56149a75 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1624UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1624UnitTests.cs @@ -73,7 +73,7 @@ public class TestClass "; var expected = Diagnostic(PropertySummaryDocumentationAnalyzer.SA1624Descriptor).WithLocation(7, 7 + accessibility.Length + type.Length).WithArguments(expectedArgument1, expectedArgument2); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -103,7 +103,7 @@ public class TestClass }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -135,7 +135,7 @@ public int TestProperty }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -154,7 +154,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -174,7 +174,7 @@ public class TestClass }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1625UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1625UnitTests.cs index 1a76edc31..d2ce364a7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1625UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1625UnitTests.cs @@ -58,7 +58,7 @@ public class TestClass {member} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -79,7 +79,7 @@ public class TestClass }} public class TestClass2 {{ }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -93,7 +93,7 @@ public class TestClass {member} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -114,7 +114,7 @@ public class TestClass }} "; var expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -131,7 +131,7 @@ public class TestClass "; var expected = Diagnostic().WithLocation(5, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -151,7 +151,7 @@ public class TestClass }} "; var expected = Diagnostic().WithLocation(9, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -169,7 +169,7 @@ public class TestClass }} "; var expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -187,7 +187,7 @@ public class TestClass }} "; var expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -205,7 +205,7 @@ public class TestClass {member} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -223,7 +223,7 @@ public class TestClass "; var expected = Diagnostic().WithLocation(5, 7); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -244,7 +244,7 @@ public class TestClass }} "; var expected = Diagnostic().WithLocation(9, 7); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -263,7 +263,7 @@ public class TestClass }} "; var expected = Diagnostic().WithLocation(7, 7); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -282,7 +282,7 @@ public class TestClass }} "; var expected = Diagnostic().WithLocation(7, 7); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -299,7 +299,7 @@ public enum EnumName }"; var expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -312,7 +312,7 @@ public class TestClass public void Test() {{ }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -326,7 +326,7 @@ public void Test() {{ }} }} public class TestClass2 {{ }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -341,7 +341,7 @@ public void Test() {{ }} }} public class TestClass2 {{ }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -354,7 +354,7 @@ public class TestClass public void Test() {{ }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -368,7 +368,7 @@ public void Test() {{ }} }} "; var expected = Diagnostic().WithLocation(5, 17); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -383,7 +383,7 @@ public void Test() {{ }} "; var expected = Diagnostic().WithLocation(5, 17); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -397,7 +397,7 @@ public void Test() {{ }} }} "; var expected = Diagnostic().WithLocation(5, 17); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -410,7 +410,7 @@ public class TestClass public void Test() {{ }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -423,7 +423,7 @@ public class TestClass public void Test() {{ }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1626UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1626UnitTests.cs index 1be73b3b2..33a78cb27 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1626UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1626UnitTests.cs @@ -28,7 +28,7 @@ public void Bar() } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -42,7 +42,7 @@ public void Bar() } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -66,7 +66,7 @@ public void Bar() "; DiagnosticResult expected = Diagnostic().WithLocation(5, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -97,7 +97,7 @@ public void Bar() Diagnostic().WithLocation(6, 9), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -111,7 +111,7 @@ public void Bar() } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -125,7 +125,7 @@ public void Bar() } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1627UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1627UnitTests.cs index 0e20ea87d..53877c714 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1627UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1627UnitTests.cs @@ -54,7 +54,7 @@ public class ClassName public string JoinStrings(string first, string second) { return first + second; } }"; var expectedDiagnostic = Diagnostic().WithLocation(12, 9).WithArguments(element); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", element), expectedDiagnostic, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", element), expectedDiagnostic, CancellationToken.None).ConfigureAwait(true); } /// @@ -91,7 +91,7 @@ public class ClassName Diagnostic().WithLocation(13, 9).WithArguments("example"), Diagnostic().WithLocation(14, 9).WithArguments("exception"), }; - await VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostics, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostics, CancellationToken.None).ConfigureAwait(true); } /// @@ -118,7 +118,7 @@ public class ClassName public string JoinStrings(string first, string second) { return first + second; } }"; var expectedDiagnostic = Diagnostic().WithLocation(12, 9).WithArguments(element); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", element), expectedDiagnostic, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", element), expectedDiagnostic, CancellationToken.None).ConfigureAwait(true); } /// @@ -144,7 +144,7 @@ public class ClassName /// <$$>Not blank element. public string JoinStrings(string first, string second) { return first + second; } }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", element), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$$", element), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -168,7 +168,7 @@ public class ClassName /// public string JoinStrings(string first, string second) { return first + second; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -182,7 +182,7 @@ public async Task TestOrphanedIncludedDocumentationAsync() /// "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -201,7 +201,7 @@ public void TestMethod(int first) { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -220,7 +220,7 @@ public void TestMethod(int first) { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -239,7 +239,7 @@ public void TestMethod(int first) { } } "; var expected = Diagnostic().WithLocation(5, 9).WithArguments("permission"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -265,7 +265,7 @@ public void TestMethod(int first) { } Diagnostic().WithLocation(5, 9).WithArguments("permission"), Diagnostic().WithLocation(5, 9).WithArguments("exception"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1629UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1629UnitTests.cs index b50ca4808..d39e2af21 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1629UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1629UnitTests.cs @@ -168,7 +168,7 @@ public int TestMethod2(T arg1) Diagnostic().WithLocation(55, 89), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -197,7 +197,7 @@ public enum TestEnum var expected = Diagnostic().WithLocation(5, 20); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -271,7 +271,7 @@ public int TestMethod(T arg1) Diagnostic().WithLocation(23, 89), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -299,7 +299,7 @@ public int TestMethod(T arg1) Diagnostic().WithLocation(9, 16), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -312,7 +312,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -326,7 +326,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -365,7 +365,7 @@ public interface ITest Diagnostic().WithLocation(8, 41), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -404,7 +404,7 @@ public interface ITest Diagnostic().WithLocation(8, 61), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -443,7 +443,7 @@ public interface ITest Diagnostic().WithLocation(8, 62), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -472,7 +472,7 @@ public interface ITest DiagnosticResult expected = Diagnostic().WithLocation(3, 57); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -490,7 +490,7 @@ public interface ITest }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -515,7 +515,7 @@ public interface ITest "; DiagnosticResult expected = Diagnostic().WithLocation(3, 26); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -541,7 +541,7 @@ public interface ITest "; DiagnosticResult expected = Diagnostic().WithLocation(3, 12); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, default).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, default).ConfigureAwait(true); } [Theory] @@ -558,7 +558,7 @@ public interface ITest {{ }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, default).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, default).ConfigureAwait(true); } [Theory] @@ -584,7 +584,7 @@ public interface ITest "; DiagnosticResult expected = Diagnostic().WithLocation(3, 25); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, default).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, default).ConfigureAwait(true); } [Fact] @@ -619,7 +619,7 @@ public interface ITest Diagnostic().WithLocation(5, 22), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -649,7 +649,7 @@ public interface ITest DiagnosticResult expected = Diagnostic().WithLocation(5, 23); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -688,7 +688,7 @@ public interface ITest Diagnostic().WithLocation(7, 16), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -723,7 +723,7 @@ public interface ITest Diagnostic().WithLocation(5, 22), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -765,7 +765,7 @@ public interface ITest Diagnostic().WithLocation(7, 22), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -799,7 +799,7 @@ public interface ITest Diagnostic().WithLocation(5, 22), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -838,7 +838,7 @@ public interface ITest Diagnostic().WithLocation(8, 68), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -877,7 +877,7 @@ public interface ITest Diagnostic().WithLocation(8, 68), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -927,7 +927,7 @@ public interface ITest } "; - await VerifyCSharpDiagnosticAsync(testCode, testSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, testSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -957,7 +957,7 @@ public interface ITest Diagnostic().WithLocation(5, 32), }; - await VerifyCSharpDiagnosticAsync(testCode, testSettings, expectedResult, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, testSettings, expectedResult, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -979,7 +979,7 @@ public class TestClass {{ }}"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1633UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1633UnitTests.cs index 6ac8eb40f..27c4b52fa 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1633UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1633UnitTests.cs @@ -58,7 +58,7 @@ public virtual async Task TestNoFileHeaderAsync() "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMissing).WithLocation(1, 1); - await this.VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostic, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostic, CancellationToken.None).ConfigureAwait(true); } /// @@ -73,7 +73,7 @@ public async Task TestValidFileHeaderNoContentAsync() // "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -88,7 +88,7 @@ public async Task TestValidMultilineCommentFileHeaders1Async() */ "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -105,7 +105,7 @@ public async Task TestValidMultilineCommentFileHeaders2Async() */ "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -120,7 +120,7 @@ public async Task TestValidMultilineCommentFileHeaders3Async() */ "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -137,7 +137,7 @@ public async Task TestValidMultilineCommentFileHeaders4Async() */ "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -161,7 +161,7 @@ namespace Bar "; var expected = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMissing).WithLocation(1, 1); - await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -180,7 +180,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -208,7 +208,7 @@ namespace Foo "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMissing).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -236,7 +236,7 @@ namespace Foo this.useDecoratedXmlMultiLineHeaderTestSettings = true; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMissing).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -262,7 +262,7 @@ namespace Foo "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMalformed).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -289,7 +289,7 @@ namespace Foo "; var expected = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMalformed).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -318,7 +318,7 @@ namespace Foo "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1633DescriptorMalformed).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -341,7 +341,7 @@ public async Task TestValidXmlFileHeaderWithLeadingBlankLinesAsync(string prefix // "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -363,7 +363,7 @@ public async Task TestValidFileHeaderWithLeadingBlankLinesAsync(string prefix) var testCode = $@"{prefix}// copyright (c) FooCorp. All rights reserved. "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -398,7 +398,7 @@ public async Task TestIncompleteMultilineCommentAsync() DiagnosticResult.CompilerError("CS1035").WithMessage("End-of-file found, '*/' expected").WithLocation(3, 1), }; - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, expectedFixedDiagnostics, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedCode, expectedFixedDiagnostics, CancellationToken.None).ConfigureAwait(true); } /// diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1634UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1634UnitTests.cs index 8f6184246..78ccd0a89 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1634UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1634UnitTests.cs @@ -48,7 +48,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1634Descriptor).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -70,7 +70,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -96,7 +96,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1635Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -127,7 +127,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1634Descriptor).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -160,7 +160,7 @@ namespace Bar } } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -193,7 +193,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1634Descriptor).WithLocation(1, 5); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -226,7 +226,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1634Descriptor).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -261,7 +261,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1634Descriptor).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -296,7 +296,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1634Descriptor).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -339,7 +339,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1634Descriptor).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } protected override string GetSettings() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1635UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1635UnitTests.cs index e6c48c806..b88e0298a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1635UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1635UnitTests.cs @@ -38,7 +38,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1635Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -66,7 +66,7 @@ public async Task TestFileHeaderWithWhitespaceOnlyCopyrightAsync() "}\r\n"; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1635Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1636UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1636UnitTests.cs index 35ad8563a..470480066 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1636UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1636UnitTests.cs @@ -67,7 +67,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1636Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -95,7 +95,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1636Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -119,7 +119,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -143,7 +143,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -169,7 +169,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -191,7 +191,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -215,7 +215,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -239,7 +239,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -275,7 +275,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1636Descriptor).WithLocation(4, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -317,7 +317,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1636Descriptor).WithLocation(2, 8); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -360,7 +360,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1636Descriptor).WithLocation(3, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -403,7 +403,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1636Descriptor).WithLocation(3, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -445,7 +445,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1636Descriptor).WithLocation(2, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -487,7 +487,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1636Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1637UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1637UnitTests.cs index 0db76d9f1..9e0ae053e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1637UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1637UnitTests.cs @@ -40,7 +40,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1637Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1638UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1638UnitTests.cs index a46eee12d..e085802ad 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1638UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1638UnitTests.cs @@ -54,7 +54,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1638Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -88,7 +88,7 @@ namespace Bar this.useDecoratedXmlMultiLineHeaderTestSettings = true; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1638Descriptor).WithLocation(2, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1639UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1639UnitTests.cs index 9efae855d..dfb2285e3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1639UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1639UnitTests.cs @@ -34,7 +34,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1639Descriptor).WithLocation(1, 1); - await this.VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostic, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostic, CancellationToken.None).ConfigureAwait(true); } /// @@ -55,7 +55,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1639Descriptor).WithLocation(4, 4); - await this.VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostic, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostic, CancellationToken.None).ConfigureAwait(true); } /// @@ -76,7 +76,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1639Descriptor).WithLocation(4, 4); - await this.VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostic, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostic, CancellationToken.None).ConfigureAwait(true); } /// diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1640UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1640UnitTests.cs index ddded5bee..b7850e5fc 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1640UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1640UnitTests.cs @@ -40,7 +40,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1640Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -68,7 +68,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1640Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -96,7 +96,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1640Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1641UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1641UnitTests.cs index 902d84a71..9dbf5a166 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1641UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1641UnitTests.cs @@ -40,7 +40,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1641Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -68,7 +68,7 @@ namespace Bar "; var expectedDiagnostic = Diagnostic(FileHeaderAnalyzers.SA1641Descriptor).WithLocation(1, 4); - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1642UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1642UnitTests.cs index a31ed6e33..f35550901 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1642UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1642UnitTests.cs @@ -36,14 +36,14 @@ public Foo(int arg) }} }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.DataTypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestEmptyPublicConstructorAsync(string typeKind) { - await TestEmptyConstructorAsync(typeKind, "public").ConfigureAwait(false); + await TestEmptyConstructorAsync(typeKind, "public").ConfigureAwait(true); } [Theory] @@ -51,14 +51,14 @@ public async Task TestEmptyPublicConstructorAsync(string typeKind) [InlineData("struct")] public async Task TestEmptyNonPublicConstructorAsync(string typeKind) { - await TestEmptyConstructorAsync(typeKind, "private").ConfigureAwait(false); + await TestEmptyConstructorAsync(typeKind, "private").ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.DataTypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestEmptyStaticConstructorAsync(string typeKind) { - await TestEmptyConstructorAsync(typeKind, "static").ConfigureAwait(false); + await TestEmptyConstructorAsync(typeKind, "static").ConfigureAwait(true); } [Theory] @@ -72,7 +72,7 @@ await TestConstructorCorrectDocumentationSimpleAsync( "public", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, docTypeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -86,7 +86,7 @@ await TestConstructorCorrectDocumentationCustomizedAsync( "public", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, docTypeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -100,7 +100,7 @@ await TestConstructorCorrectDocumentationSimpleAsync( "public", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, docTypeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -114,7 +114,7 @@ await TestConstructorCorrectDocumentationCustomizedAsync( "public", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, docTypeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -128,7 +128,7 @@ await TestConstructorCorrectDocumentationAsync( string.Format(DocumentationResources.PrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.PrivateConstructorStandardTextSecondPart, typeKind), string.Empty, - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -142,7 +142,7 @@ await TestConstructorCorrectDocumentationAsync( string.Format(DocumentationResources.PrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.PrivateConstructorStandardTextSecondPart, typeKind) + " externally", string.Empty, - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -155,7 +155,7 @@ await TestConstructorCorrectDocumentationSimpleAsync( "private", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, typeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -168,7 +168,7 @@ await TestConstructorCorrectDocumentationCustomizedAsync( "private", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, typeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -182,7 +182,7 @@ await TestConstructorCorrectDocumentationAsync( string.Format(DocumentationResources.PrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.PrivateConstructorStandardTextSecondPart, typeKind), string.Empty, - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -196,7 +196,7 @@ await TestConstructorCorrectDocumentationAsync( string.Format(DocumentationResources.PrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.PrivateConstructorStandardTextSecondPart, typeKind) + " externally", string.Empty, - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -209,7 +209,7 @@ await TestConstructorCorrectDocumentationSimpleAsync( "private", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, typeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -222,7 +222,7 @@ await TestConstructorCorrectDocumentationCustomizedAsync( "private", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, typeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -237,7 +237,7 @@ await TestConstructorCorrectDocumentationAsync( string.Format(DocumentationResources.StaticConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.StaticConstructorStandardTextSecondPart, docTypeKind), string.Empty, - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -252,7 +252,7 @@ await TestConstructorCorrectDocumentationAsync( string.Format(DocumentationResources.StaticConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.StaticConstructorStandardTextSecondPart, docTypeKind), string.Empty, - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -266,7 +266,7 @@ await TestConstructorMissingDocumentationAsync( "public", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, docTypeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -280,7 +280,7 @@ await TestConstructorMissingDocumentationAsync( "public", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, docTypeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -293,7 +293,7 @@ await TestConstructorMissingDocumentationAsync( "private", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, typeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -306,7 +306,7 @@ await TestConstructorMissingDocumentationAsync( "private", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, typeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -320,7 +320,7 @@ await TestConstructorMissingDocumentationAsync( "static", string.Format(DocumentationResources.StaticConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.StaticConstructorStandardTextSecondPart, docTypeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -334,7 +334,7 @@ await TestConstructorMissingDocumentationAsync( "static", string.Format(DocumentationResources.StaticConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.StaticConstructorStandardTextSecondPart, docTypeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -348,7 +348,7 @@ await TestConstructorSimpleDocumentationAsync( "public", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, docTypeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -362,7 +362,7 @@ await TestConstructorSimpleDocumentationAsync( "public", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, docTypeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -375,7 +375,7 @@ await TestConstructorSimpleDocumentationAsync( "private", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, typeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -388,7 +388,7 @@ await TestConstructorSimpleDocumentationAsync( "private", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, typeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -402,7 +402,7 @@ await TestConstructorSimpleDocumentationAsync( "static", string.Format(DocumentationResources.StaticConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.StaticConstructorStandardTextSecondPart, docTypeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -416,7 +416,7 @@ await TestConstructorSimpleDocumentationAsync( "static", string.Format(DocumentationResources.StaticConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.StaticConstructorStandardTextSecondPart, docTypeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -430,7 +430,7 @@ await TestConstructorSimpleDocumentationWrongTypeNameAsync( "public", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, docTypeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -444,7 +444,7 @@ await TestConstructorSimpleDocumentationWrongTypeNameAsync( "public", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, docTypeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -457,7 +457,7 @@ await TestConstructorSimpleDocumentationWrongTypeNameAsync( "private", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, typeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -470,7 +470,7 @@ await TestConstructorSimpleDocumentationWrongTypeNameAsync( "private", string.Format(DocumentationResources.NonPrivateConstructorStandardTextFirstPart, typeKind), string.Format(DocumentationResources.NonPrivateConstructorStandardTextSecondPart, typeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } [Theory] @@ -484,7 +484,7 @@ await TestConstructorSimpleDocumentationWrongTypeNameAsync( "static", string.Format(DocumentationResources.StaticConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.StaticConstructorStandardTextSecondPart, docTypeKind), - false).ConfigureAwait(false); + false).ConfigureAwait(true); } [Theory] @@ -498,7 +498,7 @@ await TestConstructorSimpleDocumentationWrongTypeNameAsync( "static", string.Format(DocumentationResources.StaticConstructorStandardTextFirstPart, docTypeKind), string.Format(DocumentationResources.StaticConstructorStandardTextSecondPart, docTypeKind), - true).ConfigureAwait(false); + true).ConfigureAwait(true); } /// @@ -538,7 +538,7 @@ struct StructName "; DiagnosticResult expected = Diagnostic().WithLocation(6, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -563,7 +563,7 @@ public async Task TestAllowedOuterQualifiedNamesAsync(string outerTypeKind, stri }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -602,7 +602,7 @@ protected CustomizableBlockSubscriberBase() "; DiagnosticResult expected = Diagnostic().WithLocation(7, 43); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -635,7 +635,7 @@ public TestClass(int i) "; DiagnosticResult expected = Diagnostic().WithLocation(5, 43); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -668,7 +668,7 @@ public TestClass(int i) "; DiagnosticResult expected = Diagnostic().WithLocation(5, 43); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -704,7 +704,7 @@ public TestClass() // TODO: The codefix produces a wrong result for this scenario but its not easily fixed. DiagnosticResult expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -722,7 +722,7 @@ public TestClass() { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -740,7 +740,7 @@ public TestClass() { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -759,7 +759,7 @@ public TestClass() { } "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -778,7 +778,7 @@ public TestClass() { } "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -799,7 +799,7 @@ public class WrongClass { } "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -820,7 +820,7 @@ namespace WrongClass { } "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -839,7 +839,7 @@ public TestClass() { } "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -858,7 +858,7 @@ public TestClass() { } "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -877,7 +877,7 @@ public TestClass() { } "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -902,7 +902,7 @@ await TestConstructorCorrectDocumentationSimpleAsync( "public", "Initialises a new instance of the ", " " + typeKind, - false).ConfigureAwait(false); + false).ConfigureAwait(true); } /// @@ -933,7 +933,7 @@ public TestClass() { } "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -966,7 +966,7 @@ public TestClass() { } "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -998,7 +998,7 @@ public ClassName() }}"; DiagnosticResult expected = Diagnostic().WithLocation(5, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1022,7 +1022,7 @@ public TestClass() { } "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -1058,7 +1058,7 @@ public ClassName() }}"; DiagnosticResult expected = Diagnostic().WithLocation(5, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1088,7 +1088,7 @@ public B() var expectedDiagnostics = DiagnosticResult.EmptyDiagnosticResults; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, testCode, CancellationToken.None).ConfigureAwait(true); } private static async Task TestEmptyConstructorAsync(string typeKind, string modifiers) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1643UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1643UnitTests.cs index 566cc0b7e..9fa663aec 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1643UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1643UnitTests.cs @@ -33,43 +33,43 @@ public class Foo } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] public async Task TestDestructorCorrectDocumentationSimpleAsync() { - await TestDestructorCorrectDocumentationSimpleImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, false).ConfigureAwait(false); + await TestDestructorCorrectDocumentationSimpleImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, false).ConfigureAwait(true); } [Fact] public async Task TestDestructorCorrectDocumentationCustomizedAsync() { - await TestDestructorCorrectDocumentationCustomizedImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, false).ConfigureAwait(false); + await TestDestructorCorrectDocumentationCustomizedImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, false).ConfigureAwait(true); } [Fact] public async Task TestNonPrivateConstructorCorrectDocumentationGenericSimpleAsync() { - await TestDestructorCorrectDocumentationSimpleImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, true).ConfigureAwait(false); + await TestDestructorCorrectDocumentationSimpleImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, true).ConfigureAwait(true); } [Fact] public async Task TestDestructorCorrectDocumentationGenericCustomizedAsync() { - await TestDestructorCorrectDocumentationCustomizedImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, true).ConfigureAwait(false); + await TestDestructorCorrectDocumentationCustomizedImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, true).ConfigureAwait(true); } [Fact] public async Task TestDestructorMissingDocumentationAsync() { - await TestDestructorMissingDocumentationImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, false).ConfigureAwait(false); + await TestDestructorMissingDocumentationImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, false).ConfigureAwait(true); } [Fact] public async Task TestDestructorMissingDocumentationGenericAsync() { - await TestDestructorMissingDocumentationImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, true).ConfigureAwait(false); + await TestDestructorMissingDocumentationImplAsync(DocumentationResources.DestructorStandardTextFirstPart, DocumentationResources.DestructorStandardTextSecondPart, true).ConfigureAwait(true); } /// @@ -87,7 +87,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -105,7 +105,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -124,7 +124,7 @@ public class TestClass "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -143,7 +143,7 @@ public class TestClass "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -174,7 +174,7 @@ public class TestClass "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -205,7 +205,7 @@ public class TestClass "; var expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -224,7 +224,7 @@ public class Foo } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private static async Task TestDestructorCorrectDocumentationAsync(string part1, string part2, string part3, bool generic) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1648UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1648UnitTests.cs index 91594a512..f4189810d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1648UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1648UnitTests.cs @@ -33,7 +33,7 @@ public Base() { } public Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -54,7 +54,7 @@ public Test(string s, int b) } "; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -67,7 +67,7 @@ public async Task TestConstructorInheritsImplicitlyFromSystemObjectAsync(string public Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -80,7 +80,7 @@ public async Task TestConstructorInheritsExplicitlyFromSystemObjectAsync(string public Test() { } }"; - await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -95,7 +95,7 @@ public MyArgumentException() { } public MyArgumentException(string message) : base(message) { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -117,7 +117,7 @@ public Test(string s, int b) "; var expected = Diagnostic().WithLocation(9, 9); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -139,7 +139,7 @@ public Test(string s, int b) "; var expected = Diagnostic().WithLocation(9, 9); - await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode.Replace("$KEYWORD$", keyword), expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -149,7 +149,7 @@ public async Task TestClassOverridesClassAsync() /// class Test : Base { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -159,7 +159,7 @@ public async Task TestClassImplementsInterfaceAsync() /// class Test : IBase { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -170,7 +170,7 @@ interface IBase { } /// class Test : Base, IBase { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -180,7 +180,7 @@ public async Task TestInterfaceImplementsInterfaceAsync() /// interface ITest : IBase { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -196,7 +196,7 @@ public async Task TestTypeWithEmptyBaseListAsync(string declaration) var expected = Diagnostic().WithLocation(1, 5); - await VerifyCSharpDiagnosticAsync(testCode + declaration, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode + declaration, expected, CancellationToken.None).ConfigureAwait(true); } [Theory(DisplayName = "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1948")] @@ -210,7 +210,7 @@ public async Task TestTypeWithEmptyBaseListAndCrefAttributeAsync(string declarat var testCode = @"/// "; - await VerifyCSharpDiagnosticAsync(testCode + declaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode + declaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -233,7 +233,7 @@ public async Task TestMemberThatShouldNotHaveInheritDocAsync(string declaration) }}"; var expected = Diagnostic().WithLocation(3, 9); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, declaration), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, declaration), expected, CancellationToken.None).ConfigureAwait(true); } [Theory(DisplayName = "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1948")] @@ -255,7 +255,7 @@ public async Task TestMemberThatShouldNotHaveInheritDocButHasCrefAttributeAsync( {0} }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -280,7 +280,7 @@ class Test : TestBase {0} }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, declaration), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -307,7 +307,7 @@ void ITest.Foo() {{ }} event System.Action ITest.EventName {{ add {{ }} remove {{ }} }} }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, type), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, type), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -337,7 +337,7 @@ public void Foo() {{ }} public event System.Action EventName2 {{ add {{ }} remove {{ }} }} }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, type), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, type), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -357,7 +357,7 @@ public class TestClass : BaseClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -375,7 +375,7 @@ public class TestClass "; var expected = Diagnostic().WithLocation(2, 5); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -403,7 +403,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -428,7 +428,7 @@ public void TestMethod() { } "; var expected = Diagnostic().WithLocation(10, 7); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -444,7 +444,7 @@ public async Task TestIncorrectDelegateInheritDocAsync() public delegate bool TestDelegate(int value); "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } protected static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1649UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1649UnitTests.cs index bd7a61f66..7303f4064 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1649UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1649UnitTests.cs @@ -61,7 +61,7 @@ public async Task VerifyWrongFileNameAsync(string typeKeyword) "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("WrongFileName.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType.cs", fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("WrongFileName.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType.cs", fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -86,7 +86,7 @@ public async Task VerifyWrongFileNameGenericStyleCopAsync(string typeKeyword) "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("WrongFileName.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType{T}.cs", fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("WrongFileName.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType{T}.cs", fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -111,7 +111,7 @@ public async Task VerifyWrongFileNameGenericMetadataAsync(string typeKeyword) "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("WrongFileName.cs", testCode, MetadataSettings, expectedDiagnostic, "TestType`1.cs", fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("WrongFileName.cs", testCode, MetadataSettings, expectedDiagnostic, "TestType`1.cs", fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -137,7 +137,7 @@ public async Task VerifyWrongFileNameMultipleExtensionsAsync(string typeKeyword) "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("WrongFileName.svc.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType.svc.cs", fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("WrongFileName.svc.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType.svc.cs", fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -163,7 +163,7 @@ public async Task VerifyWrongFileNameNoExtensionAsync(string typeKeyword) "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("WrongFileName", testCode, StyleCopSettings, expectedDiagnostic, "TestType", fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("WrongFileName", testCode, StyleCopSettings, expectedDiagnostic, "TestType", fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -181,7 +181,7 @@ public async Task VerifyCaseInsensitivityAsync(string typeKeyword) }} "; - await VerifyCSharpDiagnosticAsync("testtype.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync("testtype.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -199,7 +199,7 @@ public async Task VerifyCaseInsensitivityGenericStyleCopAsync(string typeKeyword }} "; - await VerifyCSharpDiagnosticAsync("testtype{t}.cs", testCode, StyleCopSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync("testtype{t}.cs", testCode, StyleCopSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -217,7 +217,7 @@ public async Task VerifyCaseInsensitivityGenericMetadataAsync(string typeKeyword }} "; - await VerifyCSharpDiagnosticAsync("testtype`1.cs", testCode, MetadataSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync("testtype`1.cs", testCode, MetadataSettings, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -251,7 +251,7 @@ public enum IgnoredEnum {{ }} "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("TestType2.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType.cs", fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("TestType2.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType.cs", fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -285,7 +285,7 @@ public enum IgnoredEnum {{ }} "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("TestType2.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType{T}.cs", fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("TestType2.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType{T}.cs", fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -319,7 +319,7 @@ public enum IgnoredEnum {{ }} "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("TestType2.cs", testCode, MetadataSettings, expectedDiagnostic, "TestType`1.cs", fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("TestType2.cs", testCode, MetadataSettings, expectedDiagnostic, "TestType`1.cs", fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -339,7 +339,7 @@ public enum TestType2 "; // File names are not checked for 'enum' if more than one is present - await VerifyCSharpDiagnosticAsync("TestType2.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync("TestType2.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -354,7 +354,7 @@ public async Task VerifyMultipleDelegateTypesIgnoredAsync() "; // File names are not checked for 'delegate' if more than one is present - await VerifyCSharpDiagnosticAsync("TestType2.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync("TestType2.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -374,7 +374,7 @@ public partial {typeKeyword} TestType }} "; - await VerifyCSharpDiagnosticAsync("WrongFileName.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync("WrongFileName.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -395,8 +395,8 @@ public async Task VerifyStyleCopNamingConventionForGenericTypeAsync(string typeK "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpDiagnosticAsync("TestType.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpFixAsync("TestType`3.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType{T1,T2,T3}.cs", testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync("TestType.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpFixAsync("TestType`3.cs", testCode, StyleCopSettings, expectedDiagnostic, "TestType{T1,T2,T3}.cs", testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -417,10 +417,10 @@ public async Task VerifyMetadataNamingConventionForGenericTypeAsync(string typeK "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("TestType{T1,T2,T3}.cs", testCode, MetadataSettings, expectedDiagnostic, "TestType`3.cs", testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("TestType{T1,T2,T3}.cs", testCode, MetadataSettings, expectedDiagnostic, "TestType`3.cs", testCode, CancellationToken.None).ConfigureAwait(true); expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("TestType.cs", testCode, MetadataSettings, expectedDiagnostic, "TestType`3.cs", testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("TestType.cs", testCode, MetadataSettings, expectedDiagnostic, "TestType`3.cs", testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -450,7 +450,7 @@ public async Task VerifyMetadataNamingConventionForGenericTypeMultipleExtensions "; var expectedDiagnostic = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync("TestType.svc.cs", testCode, MetadataSettings, expectedDiagnostic, "TestType`1.svc.cs", fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync("TestType.svc.cs", testCode, MetadataSettings, expectedDiagnostic, "TestType`1.svc.cs", fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -465,7 +465,7 @@ public async Task VerifyWithoutFirstTypeAsync() } "; - await VerifyCSharpDiagnosticAsync("Test0.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync("Test0.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -484,7 +484,7 @@ public class Class2 } "; - await VerifyCSharpDiagnosticAsync("Class1.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync("Class1.cs", testCode, testSettings: null, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -537,7 +537,7 @@ public async Task VerifyWithLinkedFileAsync() // point to the same file, and only inserts '#pragma warning disable' in the primary project's file. // Then we would still get a diagnostic in the additional project. TestBehaviors = TestBehaviors.SkipSuppressionCheck, - }.RunAsync().ConfigureAwait(false); + }.RunAsync().ConfigureAwait(true); } [Fact] @@ -560,7 +560,7 @@ public void OnGet() { } .AddPackages(ImmutableArray.Create(new PackageIdentity("Microsoft.AspNetCore.Mvc.RazorPages", "2.2.0"))), }; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -579,7 +579,7 @@ public void OnGet() { } .AddPackages(ImmutableArray.Create(new PackageIdentity("Microsoft.AspNetCore.Mvc.RazorPages", "2.2.0"))), }; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -603,7 +603,7 @@ public void OnGet() { } }; test.ExpectedDiagnostics.Add(expectedDiagnostic); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } protected static string GetTypeDeclaration(string typeKind, string typeName, int? diagnosticKey = null) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1651UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1651UnitTests.cs index 66545c3a7..93e1ab1e3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1651UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1651UnitTests.cs @@ -31,7 +31,7 @@ public class ClassName } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -47,7 +47,7 @@ public class ClassName } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -74,7 +74,7 @@ public class ClassName }"; DiagnosticResult expected = Diagnostic().WithLocation(3, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -92,7 +92,7 @@ public class ClassName var fixedCode = testCode; DiagnosticResult expected = Diagnostic().WithLocation(3, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -119,7 +119,7 @@ public class ClassName }"; DiagnosticResult expected = Diagnostic().WithLocation(4, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -139,7 +139,7 @@ public class ClassName var fixedCode = testCode; DiagnosticResult expected = Diagnostic().WithLocation(4, 17); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -176,7 +176,7 @@ public class ClassName }"; DiagnosticResult expected = Diagnostic().WithLocation(8, 15); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -210,7 +210,7 @@ public class ClassName Diagnostic().WithLocation(4, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -227,7 +227,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -245,7 +245,7 @@ public class TestClass "; var expected = Diagnostic().WithLocation(2, 5); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ExclusionTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ExclusionTests.cs index 521fa6756..7e127dbc9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ExclusionTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ExclusionTests.cs @@ -70,7 +70,7 @@ public async Task TestIsExcludedAsync(string filename, string testCode) { (filename, testCode), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -98,7 +98,7 @@ public async Task TestIsNotExcludedAsync(string filename, string testCode) }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/HelperTests/IndentationHelperTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/HelperTests/IndentationHelperTests.cs index a49ea8257..6eec56eb9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/HelperTests/IndentationHelperTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/HelperTests/IndentationHelperTests.cs @@ -113,8 +113,8 @@ public class IndentationHelperTests public async Task VerifyGetIndentationStepsAsync(string indentationString, int expectedIndentationSteps, int indentationSize, int tabSize) { var testSource = $"{indentationString}public class TestClass {{}}"; - var document = await CreateTestDocumentAsync(testSource, indentationSize, false, tabSize, CancellationToken.None).ConfigureAwait(false); - var syntaxRoot = await document.GetSyntaxRootAsync(CancellationToken.None).ConfigureAwait(false); + var document = await CreateTestDocumentAsync(testSource, indentationSize, false, tabSize, CancellationToken.None).ConfigureAwait(true); + var syntaxRoot = await document.GetSyntaxRootAsync(CancellationToken.None).ConfigureAwait(true); StyleCopSettings settings = SettingsHelper.GetStyleCopSettingsInCodeFix(document.Project.AnalyzerOptions, syntaxRoot.SyntaxTree, CancellationToken.None); var firstToken = syntaxRoot.GetFirstToken(); @@ -131,8 +131,8 @@ public async Task VerifyGetIndentationStepsAsync(string indentationString, int e public async Task VerifyGetIndentationStepsForTokenNotAtStartOfLineAsync() { var testSource = " public class TestClass {}"; - var document = await CreateTestDocumentAsync(testSource, cancellationToken: CancellationToken.None).ConfigureAwait(false); - var syntaxRoot = await document.GetSyntaxRootAsync(CancellationToken.None).ConfigureAwait(false); + var document = await CreateTestDocumentAsync(testSource, cancellationToken: CancellationToken.None).ConfigureAwait(true); + var syntaxRoot = await document.GetSyntaxRootAsync(CancellationToken.None).ConfigureAwait(true); StyleCopSettings settings = SettingsHelper.GetStyleCopSettingsInCodeFix(document.Project.AnalyzerOptions, syntaxRoot.SyntaxTree, CancellationToken.None); var secondToken = syntaxRoot.GetFirstToken().GetNextToken(); diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.ArrayInitializers.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.ArrayInitializers.cs index 54cee1647..c7c2275fd 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.ArrayInitializers.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.ArrayInitializers.cs @@ -86,7 +86,7 @@ public void TestMethod() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -252,7 +252,7 @@ public void TestMethod() Diagnostic().WithLocation(54, 22), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -341,7 +341,7 @@ public void TestMethod() Diagnostic().WithLocation(26, 22), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -430,7 +430,7 @@ public class TestClass Diagnostic().WithLocation(29, 29), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -517,7 +517,7 @@ public class TestClass Diagnostic().WithLocation(24, 34), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Blocks.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Blocks.cs index 01d95684a..cb1c1e235 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Blocks.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Blocks.cs @@ -53,7 +53,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -103,7 +103,7 @@ public void Bar() Diagnostic().WithLocation(13, 29), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Constructors.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Constructors.cs index 2be4000d8..059ecedeb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Constructors.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Constructors.cs @@ -56,7 +56,7 @@ public Foo(ushort a) { Debug.Indent(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -160,7 +160,7 @@ public Foo(int a) Diagnostic().WithLocation(29, 5), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.DataTypes.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.DataTypes.cs index cea4fac60..040796b77 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.DataTypes.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.DataTypes.cs @@ -51,7 +51,7 @@ public async Task TestDataTypeValidAsync(string keyword) {{ public int Field; }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -144,7 +144,7 @@ public async Task TestDataTypeInvalidAsync(string keyword) Diagnostic().WithLocation(6), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Delegates.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Delegates.cs index e9e6ff8b5..570035a33 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Delegates.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Delegates.cs @@ -86,7 +86,7 @@ private void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -289,7 +289,7 @@ private void Bar() Diagnostic().WithLocation(64, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Destructors.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Destructors.cs index f4f25547f..7c29338d0 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Destructors.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Destructors.cs @@ -71,7 +71,7 @@ public class TestClass5 } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -211,7 +211,7 @@ public class TestClass6 Diagnostic().WithLocation(46, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.DoWhiles.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.DoWhiles.cs index 70b0716ce..71cf8ddcf 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.DoWhiles.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.DoWhiles.cs @@ -61,7 +61,7 @@ private void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -304,7 +304,7 @@ private void Bar() Diagnostic().WithLocation(76, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -343,7 +343,7 @@ private void Bar() Settings = testSettings, }; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -406,7 +406,7 @@ private void Bar() Settings = testSettings, }; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -463,7 +463,7 @@ private void Bar() Settings = testSettings, }; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Enums.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Enums.cs index 509f06d6c..7282ab7c1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Enums.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Enums.cs @@ -49,7 +49,7 @@ public enum ValidEnum2 { Test } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -137,7 +137,7 @@ public enum InvalidEnum6 Diagnostic().WithLocation(21, 5), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Events.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Events.cs index 54149cf9f..d028cdacc 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Events.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Events.cs @@ -79,7 +79,7 @@ public event EventHandler Event4 } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -276,7 +276,7 @@ public event EventHandler Event6 Diagnostic().WithLocation(70, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Ifs.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Ifs.cs index e6a234777..879c3babc 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Ifs.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Ifs.cs @@ -59,7 +59,7 @@ private void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -117,7 +117,7 @@ private void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -227,7 +227,7 @@ private void Bar() Diagnostic().WithLocation(31, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -373,7 +373,7 @@ private void Bar() Diagnostic().WithLocation(49, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Indexers.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Indexers.cs index 84374ef2e..851727e11 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Indexers.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Indexers.cs @@ -85,7 +85,7 @@ public bool this[uint index] { get { return this.test; } set { this.test = value; } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -347,7 +347,7 @@ public bool this[string index] Diagnostic().WithLocation(91, 5), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Interfaces.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Interfaces.cs index 10125f039..d1135b0e0 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Interfaces.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Interfaces.cs @@ -49,7 +49,7 @@ public interface ValidInterface2 { void Bar(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -140,7 +140,7 @@ public interface InvalidInterface6 Diagnostic().WithLocation(21, 5), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.LambdaExpressions.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.LambdaExpressions.cs index a4dfe3fed..769a76333 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.LambdaExpressions.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.LambdaExpressions.cs @@ -85,7 +85,7 @@ private void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -284,7 +284,7 @@ private void Bar() Diagnostic().WithLocation(62, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Methods.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Methods.cs index a34531811..a9a55ba03 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Methods.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Methods.cs @@ -56,7 +56,7 @@ public void Method5() { Debug.Indent(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -160,7 +160,7 @@ public void Method6() Diagnostic().WithLocation(29, 5), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Namespaces.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Namespaces.cs index 23f5ea612..c9ca1cdcd 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Namespaces.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Namespaces.cs @@ -46,7 +46,7 @@ namespace ValidNamespace2 { using System; } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -130,7 +130,7 @@ namespace InvalidNamespace6 Diagnostic().WithLocation(19, 1), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -156,7 +156,7 @@ namespace TestNamespace Diagnostic().WithLocation(4, 17), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.ObjectInitializers.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.ObjectInitializers.cs index 60354052d..576036dc9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.ObjectInitializers.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.ObjectInitializers.cs @@ -142,7 +142,7 @@ private class Contact } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -431,7 +431,7 @@ private class Contact Diagnostic().WithLocation(92, 34), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -499,7 +499,7 @@ public class TestClass Diagnostic().WithLocation(17, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Properties.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Properties.cs index c5408e4b0..f6e9bb1ed 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Properties.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Properties.cs @@ -98,7 +98,7 @@ public bool Property6 public int[] Property8 { get; set; } = { 0, 1, 2 }; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -427,7 +427,7 @@ public bool Property11 Diagnostic().WithLocation(116, 15), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -471,7 +471,7 @@ public int[] TestProperty Diagnostic().WithLocation(8, 45), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -506,7 +506,7 @@ int Property accessorError.WithLocation(6, 12), DiagnosticResult.CompilerError("CS1022").WithMessage("Type or namespace definition, or end-of-file expected").WithLocation(9, 1), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -532,7 +532,7 @@ int Property DiagnosticResult.CompilerError("CS1513").WithMessage("} expected").WithLocation(7, 10), DiagnosticResult.CompilerError("CS1513").WithMessage("} expected").WithLocation(7, 10), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.StatementBlocks.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.StatementBlocks.cs index e57fee316..0216baff9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.StatementBlocks.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.StatementBlocks.cs @@ -81,7 +81,7 @@ public void Bar() testCode = testCode.Replace("#TOKEN#", token); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -188,7 +188,7 @@ public void Bar() Diagnostic().WithLocation(27, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Switches.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Switches.cs index 93c56b937..8798a6abf 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Switches.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.Switches.cs @@ -52,7 +52,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -160,7 +160,7 @@ public void Bar() Diagnostic().WithLocation(31, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.TryCatchFinallys.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.TryCatchFinallys.cs index 781dff6ed..6757ddd4e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.TryCatchFinallys.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.TryCatchFinallys.cs @@ -91,7 +91,7 @@ private void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -295,7 +295,7 @@ private void Bar() Diagnostic().WithLocation(63, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.cs index e2657b12e..a44ed539a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1500/SA1500UnitTests.cs @@ -100,7 +100,7 @@ public static void Sample() Diagnostic().WithLocation(16, 19), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1501UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1501UnitTests.cs index c6afc16b6..0c0d8c5ac 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1501UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1501UnitTests.cs @@ -56,7 +56,7 @@ public void Bar(int i) lock (this) { Debug.Assert(true); } } }"; - await VerifyCSharpDiagnosticAsync(testCode, Diagnostic().WithLocation(6, 21), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, Diagnostic().WithLocation(6, 21), CancellationToken.None).ConfigureAwait(true); } /// @@ -84,7 +84,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, Diagnostic().WithLocation(10, 9), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, Diagnostic().WithLocation(10, 9), CancellationToken.None).ConfigureAwait(true); } /// @@ -105,7 +105,7 @@ public void Bar(int i) } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -126,7 +126,7 @@ public void Bar(int i) } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -146,7 +146,7 @@ public void Bar(int i) MyDelegate d = delegate(int x) { Debug.WriteLine(x); }; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -166,7 +166,7 @@ public void Bar(int i) var test = new Action(value => { Debug.WriteLine(value); }); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -181,7 +181,7 @@ public class Foo { public void Bar() { Debug.Assert(true); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -200,7 +200,7 @@ public int Bar set { } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -232,7 +232,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(7, 11); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -263,7 +263,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(6, 21); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -305,7 +305,7 @@ public async Task TestCodeFixProviderCorrectlyExpandsBlockInSourceFileWithTabsAs }, FixedCode = fixedTestCode, UseTabs = true, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -336,7 +336,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(6, 35); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -380,7 +380,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(10, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -402,7 +402,7 @@ public void Bar() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -451,7 +451,7 @@ public void Bar() Diagnostic().WithLocation(11, 13), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -485,7 +485,7 @@ public void Bar() "; DiagnosticResult expectedDiagnostics = Diagnostic().WithLocation(7, 12); - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -531,7 +531,7 @@ void MethodName() DiagnosticResult.CompilerError("CS1513").WithLocation(11, 23).WithMessage("} expected"), DiagnosticResult.CompilerError("CS1513").WithLocation(11, 23).WithMessage("} expected"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -555,7 +555,7 @@ public async Task TestNoSA1503StatementWithoutBracesAsync(string statementText) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -598,7 +598,7 @@ public void Bar(int i) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -644,7 +644,7 @@ public void Bar(string x, string y) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -834,7 +834,7 @@ public void Bar(int i) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -854,7 +854,7 @@ public async Task TestNoSA1503StatementWithBracesAsync(string statementText) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -898,7 +898,7 @@ public void Bar(int i) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -940,7 +940,7 @@ public void Bar(int i) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -976,7 +976,7 @@ public void Bar(int i) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -1019,7 +1019,7 @@ public void Bar(int i) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -1075,7 +1075,7 @@ public void Bar(int i) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -1100,7 +1100,7 @@ public async Task TestNoSA1503CodeFixForStatementAsync(string statementText) { SA1503BracesMustNotBeOmitted.DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } private string GenerateTestStatement(string statementText) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Constructors.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Constructors.cs index 91642b674..5c1b8c5fd 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Constructors.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Constructors.cs @@ -36,7 +36,7 @@ public Foo(int parameter) } }"; - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -54,7 +54,7 @@ public Foo(int parameter) { } }"; var expected = Diagnostic().WithLocation(3, 31); - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -72,7 +72,7 @@ public async Task TestConstructorOnSingleLineAsync(string elementType) }"; var expected = Diagnostic().WithLocation(3, 31); - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -91,7 +91,7 @@ public Foo(int parameter) }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -109,7 +109,7 @@ public Foo(int parameter) { int bar; } }"; - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -133,7 +133,7 @@ public Foo(int parameter) }"; var expected = Diagnostic().WithLocation(3, 31); - await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(true); } /// @@ -158,7 +158,7 @@ public Foo(int parameter) }"; var expected = Diagnostic().WithLocation(3, 31); - await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(true); } /// @@ -184,7 +184,7 @@ public Foo(int parameter) }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(true); } /// @@ -209,7 +209,7 @@ public Foo(int parameter) /* TR1 */ }"; var expected = Diagnostic().WithLocation(3, 41); - await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Destructors.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Destructors.cs index 7adcdc2a0..cf47955cb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Destructors.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Destructors.cs @@ -33,7 +33,7 @@ public async Task TestValidDestructorAsync() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -48,7 +48,7 @@ public async Task TestEmptyDestructorOnSingleLineAsync() ~Foo() { } }"; var expected = Diagnostic().WithLocation(3, 12); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -64,7 +64,7 @@ public async Task TestDestructorOnSingleLineAsync() }"; var expected = Diagnostic().WithLocation(3, 12); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -81,7 +81,7 @@ public async Task TestDestructorWithBlockOnSingleLineAsync() }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -97,7 +97,7 @@ public async Task TestDestructorWithBlockStartOnSameLineAsync() int bar; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -119,7 +119,7 @@ public async Task TestEmptyDestructorOnSingleLineCodeFixAsync() }"; var expected = Diagnostic().WithLocation(3, 12); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -142,7 +142,7 @@ public async Task TestDestructorOnSingleLineCodeFixAsync() }"; var expected = Diagnostic().WithLocation(3, 12); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -166,7 +166,7 @@ public async Task TestDestructorWithBlockOnSingleLineCodeFixAsync() }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -189,7 +189,7 @@ public async Task TestDestructorWithLotsOfTriviaCodeFixAsync() }"; var expected = Diagnostic().WithLocation(3, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Enums.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Enums.cs index 554c189f4..a482a3a68 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Enums.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Enums.cs @@ -30,7 +30,7 @@ public async Task TestValidEmptyEnumAsync() { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -43,7 +43,7 @@ public async Task TestEmptyEnumOnSingleLineAsync() var testCode = "public enum Foo { }"; var expected = Diagnostic().WithLocation(1, 17); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -56,7 +56,7 @@ public async Task TestEnumOnSingleLineAsync() var testCode = "public enum Foo { Value1 }"; var expected = Diagnostic().WithLocation(1, 17); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -70,7 +70,7 @@ public async Task TestEnumWithBlockOnSingleLineAsync() { Value1 }"; var expected = Diagnostic().WithLocation(2, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -83,7 +83,7 @@ public async Task TestEnumWithBlockStartOnSameLineAsync() var testCode = @"public enum Foo { Value1 }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -100,7 +100,7 @@ public async Task TestEmptyEnumOnSingleLineCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 17); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -118,7 +118,7 @@ public async Task TestEnumOnSingleLineCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 17); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -136,7 +136,7 @@ public async Task TestMultiValueEnumOnSingleLineCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 17); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -155,7 +155,7 @@ public async Task TestEnumWithBlockOnSingleLineCodeFixAsync() "; var expected = Diagnostic().WithLocation(2, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -173,7 +173,7 @@ public async Task TestEnumWithLotsOfTriviaCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 27); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Events.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Events.cs index fc2ea3fb4..15db646a4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Events.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Events.cs @@ -52,7 +52,7 @@ public event EventHandler Baz } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -72,7 +72,7 @@ public class Foo }"; var expected = Diagnostic().WithLocation(7, 35); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -93,7 +93,7 @@ public event EventHandler Bar }"; var expected = Diagnostic().WithLocation(8, 5); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -114,7 +114,7 @@ public event EventHandler Bar { remove { x -= value; } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -145,7 +145,7 @@ public event EventHandler Bar }"; var expected = Diagnostic().WithLocation(7, 35); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -177,7 +177,7 @@ public event EventHandler Bar }"; var expected = Diagnostic().WithLocation(8, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -208,7 +208,7 @@ public event EventHandler Bar /* TR1 */ }"; var expected = Diagnostic().WithLocation(7, 45); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Indexers.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Indexers.cs index 58d03f0bd..e2e7d4e6e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Indexers.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Indexers.cs @@ -42,7 +42,7 @@ public bool this[string index] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -58,7 +58,7 @@ public async Task TestIndexerOnSingleLineAsync() }"; var expected = Diagnostic().WithLocation(3, 33); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -75,7 +75,7 @@ public bool this[int index] }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -91,7 +91,7 @@ public bool this[int index] { get { return true; } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -106,7 +106,7 @@ public async Task TestIndexerWithExpressionBodyAsync() public bool this[int index] => index > 0; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -129,7 +129,7 @@ public bool this[int index] }"; var expected = Diagnostic().WithLocation(3, 33); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -153,7 +153,7 @@ public bool this[int index] }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -176,7 +176,7 @@ public bool this[int index] /* TR1 */ }"; var expected = Diagnostic().WithLocation(3, 43); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Interfaces.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Interfaces.cs index 5b26693cd..868c87176 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Interfaces.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Interfaces.cs @@ -30,7 +30,7 @@ public async Task TestValidEmptyInterfaceAsync() { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -43,7 +43,7 @@ public async Task TestEmptyInterfaceOnSingleLineAsync() var testCode = "public interface IFoo { }"; var expected = Diagnostic().WithLocation(1, 23); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -56,7 +56,7 @@ public async Task TestInterfaceOnSingleLineAsync() var testCode = "public interface IFoo { void Bar(); }"; var expected = Diagnostic().WithLocation(1, 23); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -70,7 +70,7 @@ public async Task TestInterfaceWithBlockOnSingleLineAsync() { void Bar(); }"; var expected = Diagnostic().WithLocation(2, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -83,7 +83,7 @@ public async Task TestInterfaceWithBlockStartOnSameLineAsync() var testCode = @"public interface Foo { void Bar(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -100,7 +100,7 @@ public async Task TestEmptyInterfaceOnSingleLineCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -118,7 +118,7 @@ public async Task TestInterfaceOnSingleLineCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -136,7 +136,7 @@ public async Task TestInterfaceOnSingleLineWithMultipleStatementsCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -155,7 +155,7 @@ public async Task TestInterfaceWithBlockOnSingleLineCodeFixAsync() "; var expected = Diagnostic().WithLocation(2, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -173,7 +173,7 @@ public async Task TestInterfaceWithLotsOfTriviaCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 32); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Methods.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Methods.cs index b795cd5ab..bea426116 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Methods.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Methods.cs @@ -36,7 +36,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -54,7 +54,7 @@ public void Bar() { } }"; var expected = Diagnostic().WithLocation(3, 23); - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -72,7 +72,7 @@ public async Task TestMethodOnSingleLineAsync(string elementType) }"; var expected = Diagnostic().WithLocation(3, 23); - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -91,7 +91,7 @@ public bool Bar() }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -109,7 +109,7 @@ public bool Bar() { return false; } }"; - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -126,7 +126,7 @@ public async Task TestMethodWithExpressionBodyAsync(string elementType) public bool Bar(int x, int y) => x > y; }"; - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, elementType), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -150,7 +150,7 @@ public void Bar() }"; var expected = Diagnostic().WithLocation(3, 23); - await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(true); } /// @@ -175,7 +175,7 @@ public bool Bar() }"; var expected = Diagnostic().WithLocation(3, 23); - await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(true); } /// @@ -201,7 +201,7 @@ public bool Bar() }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(true); } /// @@ -226,7 +226,7 @@ public bool Bar() /* TR1 */ }"; var expected = Diagnostic().WithLocation(3, 33); - await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, elementType), expected, FormatTestCode(fixedTestCode, elementType), CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Namespaces.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Namespaces.cs index 1f561e524..ee433d9f4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Namespaces.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Namespaces.cs @@ -30,7 +30,7 @@ public async Task TestValidEmptyNamespaceAsync() { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -43,7 +43,7 @@ public async Task TestEmptyNamespaceOnSingleLineAsync() var testCode = @"namespace Foo { }"; var expected = Diagnostic().WithLocation(1, 15); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -56,7 +56,7 @@ public async Task TestNamespaceOnSingleLineAsync() var testCode = @"namespace Foo { using System; }"; var expected = Diagnostic().WithLocation(1, 15); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -70,7 +70,7 @@ public async Task TestNamespaceWithBlockOnSingleLineAsync() { using System; }"; var expected = Diagnostic().WithLocation(2, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -84,7 +84,7 @@ public async Task TestNamespaceWithBlockStartkOnSameLineAsync() using System; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -101,7 +101,7 @@ public async Task TestEmptyNamespaceOnSingleLineCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 15); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -119,7 +119,7 @@ public async Task TestNamespaceOnSingleLineCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 15); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -138,7 +138,7 @@ public async Task TestNamespaceWithBlockOnSingleLineCodeFixAsync() "; var expected = Diagnostic().WithLocation(2, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -156,7 +156,7 @@ public async Task TestNamespaceWithLotsOfTriviaCodeFixAsync() "; var expected = Diagnostic().WithLocation(1, 25); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Operators.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Operators.cs index efe05602c..b2aec754a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Operators.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Operators.cs @@ -39,7 +39,7 @@ public static explicit operator TestClass(int value) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -75,7 +75,7 @@ public static explicit operator TestClass(int value) Diagnostic().WithLocation(5, 58), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -113,7 +113,7 @@ public static explicit operator TestClass(int value) Diagnostic().WithLocation(7, 9), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -130,7 +130,7 @@ public async Task TestOperatorsWithExpressionBodyAsync() public static explicit operator TestClass(int value) => new TestClass(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Properties.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Properties.cs index 9efda7546..8771e8813 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Properties.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.Properties.cs @@ -54,7 +54,7 @@ public bool Baz public int AutoBaz { get; } = 9; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -70,7 +70,7 @@ public async Task TestPropertyOnSingleLineAsync() }"; var expected = Diagnostic().WithLocation(3, 21); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -87,7 +87,7 @@ public bool Bar }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -104,7 +104,7 @@ public bool Bar { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -122,7 +122,7 @@ public async Task TestPropertyWithExpressionBodyAsync() public bool Bar => this.x ^ this.y; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -145,7 +145,7 @@ public bool Bar }"; var expected = Diagnostic().WithLocation(3, 21); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -169,7 +169,7 @@ public bool Bar }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -192,7 +192,7 @@ public bool Bar /* TR1 */ }"; var expected = Diagnostic().WithLocation(3, 31); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.TypeDeclarations.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.TypeDeclarations.cs index 59acf218e..468318af1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.TypeDeclarations.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1502/SA1502UnitTests.TypeDeclarations.cs @@ -33,7 +33,7 @@ public async Task TestValidEmptyTypeAsync(string token) { }"; - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, token), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, token), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -48,7 +48,7 @@ public async Task TestEmptyTypeOnSingleLineAsync(string token) var testCode = "public ##PH## Foo { }"; var expected = Diagnostic().WithLocation(1, 13 + token.Length); - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, token), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, token), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -63,7 +63,7 @@ public async Task TestTypeOnSingleLineAsync(string token) var testCode = "public ##PH## Foo { private int bar; }"; var expected = Diagnostic().WithLocation(1, 13 + token.Length); - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, token), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, token), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -79,7 +79,7 @@ public async Task TestTypeWithBlockOnSingleLineAsync(string token) { private int bar; }"; var expected = Diagnostic().WithLocation(2, 1); - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, token), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, token), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -95,7 +95,7 @@ public async Task TestTypeWithBlockStartOnSameLineAsync(string token) private int bar; }"; - await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, token), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(FormatTestCode(testCode, token), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -114,7 +114,7 @@ public async Task TestEmptyTypeOnSingleLineCodeFixAsync(string token) "; var expected = Diagnostic().WithLocation(1, 13 + token.Length); - await VerifyCSharpFixAsync(FormatTestCode(testCode, token), expected, FormatTestCode(fixedTestCode, token), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, token), expected, FormatTestCode(fixedTestCode, token), CancellationToken.None).ConfigureAwait(true); } /// @@ -134,7 +134,7 @@ public async Task TestTypeOnSingleLineCodeFixAsync(string token) "; var expected = Diagnostic().WithLocation(1, 13 + token.Length); - await VerifyCSharpFixAsync(FormatTestCode(testCode, token), expected, FormatTestCode(fixedTestCode, token), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, token), expected, FormatTestCode(fixedTestCode, token), CancellationToken.None).ConfigureAwait(true); } /// @@ -154,7 +154,7 @@ public async Task TestTypeOnSingleLineWithMultipleStatementsCodeFixAsync(string "; var expected = Diagnostic().WithLocation(1, 13 + token.Length); - await VerifyCSharpFixAsync(FormatTestCode(testCode, token), expected, FormatTestCode(fixedTestCode, token), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, token), expected, FormatTestCode(fixedTestCode, token), CancellationToken.None).ConfigureAwait(true); } /// @@ -175,7 +175,7 @@ public async Task TestTypeWithBlockOnSingleLineCodeFixAsync(string token) "; var expected = Diagnostic().WithLocation(2, 1); - await VerifyCSharpFixAsync(FormatTestCode(testCode, token), expected, FormatTestCode(fixedTestCode, token), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, token), expected, FormatTestCode(fixedTestCode, token), CancellationToken.None).ConfigureAwait(true); } /// @@ -195,7 +195,7 @@ public async Task TestTypeWithLotsOfTriviaCodeFixAsync(string token) "; var expected = Diagnostic().WithLocation(1, 23 + token.Length); - await VerifyCSharpFixAsync(FormatTestCode(testCode, token), expected, FormatTestCode(fixedTestCode, token), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(FormatTestCode(testCode, token), expected, FormatTestCode(fixedTestCode, token), CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1503UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1503UnitTests.cs index 29a07a906..50db9ca4c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1503UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1503UnitTests.cs @@ -52,7 +52,7 @@ public static IEnumerable TestStatements public async Task TestStatementWithoutBracesAsync(string statementText) { var expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpDiagnosticAsync(this.GenerateTestStatement(statementText), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.GenerateTestStatement(statementText), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -87,7 +87,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -100,7 +100,7 @@ public void Bar(int i) [MemberData(nameof(TestStatements))] public async Task TestStatementWithBracesAsync(string statementText) { - await VerifyCSharpDiagnosticAsync(this.GenerateFixedTestStatement(statementText), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.GenerateFixedTestStatement(statementText), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -128,7 +128,7 @@ public void Bar(int i) Diagnostic().WithLocation(9, 13), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -154,7 +154,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -185,7 +185,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -210,7 +210,7 @@ public void Bar(int i) Diagnostic().WithLocation(6, 33), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -276,7 +276,7 @@ public void Bar(int i) }, FixedCode = fixedTestCode, BatchFixedCode = batchFixedTestCode, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -317,7 +317,7 @@ public void Bar(int i) }, FixedCode = fixedTestCode, IndentationSize = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -359,7 +359,7 @@ public void Bar(int i) }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -398,7 +398,7 @@ public void Bar(int i) Diagnostic().WithLocation(6, 21), Diagnostic().WithLocation(6, 33), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -422,7 +422,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(8, 13); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -453,7 +453,7 @@ public void Bar(int i) test.DisabledDiagnostics.Add(SA1519BracesMustNotBeOmittedFromMultiLineChildStatement.DiagnosticId); } - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -514,7 +514,7 @@ public void Bar(int i) test.DisabledDiagnostics.Add(SA1519BracesMustNotBeOmittedFromMultiLineChildStatement.DiagnosticId); } - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } else { @@ -529,11 +529,11 @@ public void Bar(int i) test.DisabledDiagnostics.Add(SA1519BracesMustNotBeOmittedFromMultiLineChildStatement.DiagnosticId); } - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); // Test again with the fixedCode as the test code test.TestSources[0] = (test.TestSources[0].filename, SourceText.From(fixedCode)); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } } @@ -548,7 +548,7 @@ public void Bar(int i) public async Task TestCodeFixForStatementAsync(string statementText) { var expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(this.GenerateTestStatement(statementText), expected, this.GenerateFixedTestStatement(statementText), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(this.GenerateTestStatement(statementText), expected, this.GenerateFixedTestStatement(statementText), CancellationToken.None).ConfigureAwait(true); } private string GenerateTestStatement(string statementText) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1504UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1504UnitTests.cs index f5eb4c71a..faedb865b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1504UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1504UnitTests.cs @@ -66,7 +66,7 @@ public class Foo ExpectedDiagnostics = { expected }, FixedCode = fixedTestCodeSingle, CodeActionIndex = 0, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); await new CSharpTest { @@ -74,7 +74,7 @@ public class Foo ExpectedDiagnostics = { expected }, FixedCode = fixedTestCodeMultiple, CodeActionIndex = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -128,7 +128,7 @@ private void OnPropertyChanged() }}"; DiagnosticResult expected = Diagnostic().WithLocation(6, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCodeMultiple, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCodeMultiple, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -147,7 +147,7 @@ public class Foo }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -167,7 +167,7 @@ public class Foo }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -182,7 +182,7 @@ public int Prop } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -194,7 +194,7 @@ public class Foo public int Prop => 1; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -254,7 +254,7 @@ public event System.EventHandler NameChanged ExpectedDiagnostics = { expected }, FixedCode = fixedTestCodeSingle, CodeActionIndex = 0, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); await new CSharpTest { @@ -262,7 +262,7 @@ public event System.EventHandler NameChanged ExpectedDiagnostics = { expected }, FixedCode = fixedTestCodeMultiple, CodeActionIndex = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -281,7 +281,7 @@ public event System.EventHandler NameChanged } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -305,7 +305,7 @@ public int Prop }"; var expected = this.GetExpectedResultAccessorWithoutBody(); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -374,7 +374,7 @@ public int Prop ExpectedDiagnostics = { expected }, FixedCode = fixedTestCodeSingle, CodeActionIndex = 0, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); await new CSharpTest { @@ -382,7 +382,7 @@ public int Prop ExpectedDiagnostics = { expected }, FixedCode = fixedTestCodeMultiple, CodeActionIndex = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } protected virtual DiagnosticResult[] GetExpectedResultAccessorWithoutBody() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1505UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1505UnitTests.cs index 8567880bc..b46639fa2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1505UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1505UnitTests.cs @@ -62,7 +62,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -108,7 +108,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(10, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -141,7 +141,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -197,7 +197,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(14, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -227,7 +227,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -277,7 +277,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(10, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -305,7 +305,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -351,7 +351,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(8, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -386,7 +386,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -438,7 +438,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(11, 17); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -465,7 +465,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -509,7 +509,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(8, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -537,7 +537,7 @@ public int TestMethod(int x) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -585,7 +585,7 @@ public int TestMethod(int x) "; var expectedDiagnostic = Diagnostic().WithLocation(8, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -603,7 +603,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -631,7 +631,7 @@ public class TestClass "; var expectedDiagnostic = Diagnostic().WithLocation(2, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -653,7 +653,7 @@ public async Task TestValidTypeDeclarationAsync(string typeKeyword, string acces }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -686,7 +686,7 @@ public async Task TestInvalidTypeDeclarationAsync(string typeKeyword, string acc "; var expectedDiagnostic = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -706,7 +706,7 @@ public enum TestEnum } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -738,7 +738,7 @@ public enum TestEnum "; var expectedDiagnostic = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -762,7 +762,7 @@ public int TestProperty2 } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -798,7 +798,7 @@ public int TestProperty "; var expectedDiagnostic = Diagnostic().WithLocation(6, 9); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -828,7 +828,7 @@ public object TestMethod2() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -846,7 +846,7 @@ public async Task TestOpeningBraceAtEndOfFileAsync() "; var expected = DiagnosticResult.CompilerError("CS1513").WithMessage("} expected").WithLocation(2, 2); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1506UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1506UnitTests.cs index bbec38c2a..31e0cc0e9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1506UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1506UnitTests.cs @@ -55,7 +55,7 @@ public async Task TestValidTypeDeclarationAsync(string typeKeyword) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -91,7 +91,7 @@ public async Task TestInvalidTypeDeclarationAsync(string typeKeyword) "; var expectedResult = Diagnostic().WithLocation(6, 1); - await VerifyCSharpFixAsync(testCode, expectedResult, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResult, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -137,7 +137,7 @@ public void TestMethod2() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -213,7 +213,7 @@ public void TestMethod() Diagnostic().WithLocation(24, 1), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -256,7 +256,7 @@ public int this[byte index] } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -320,7 +320,7 @@ public int this[int index] Diagnostic().WithLocation(17, 1), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -344,7 +344,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -380,7 +380,7 @@ public class TestClass "; var expectedDiagnostic = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -401,7 +401,7 @@ public async Task TestValidDelegateDeclarationsAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -431,7 +431,7 @@ public async Task TestInvalidDelegateDeclarationsAsync() "; var expectedDiagnostic = Diagnostic().WithLocation(6, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -472,7 +472,7 @@ public event EventHandler TestEvent4 } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -536,7 +536,7 @@ public event EventHandler TestEvent2 Diagnostic().WithLocation(16, 1), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -600,7 +600,7 @@ public void TestMethod3() { } Diagnostic().WithLocation(20, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -623,7 +623,7 @@ public enum TestEnum } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -659,7 +659,7 @@ public enum TestEnum "; var expectedDiagnostic = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -686,7 +686,7 @@ public struct Foo } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -728,7 +728,7 @@ public struct Foo "; var expectedDiagnostic = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -755,7 +755,7 @@ public static explicit operator Foo(string s) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -797,7 +797,7 @@ public static explicit operator Foo(string s) "; var expectedDiagnostic = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1507UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1507UnitTests.cs index ec3179894..7136f3f68 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1507UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1507UnitTests.cs @@ -70,7 +70,7 @@ public class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -88,7 +88,7 @@ public async Task TestEmptyLinesAtEndOfFileAsync() "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -102,7 +102,7 @@ namespace Microsoft } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -115,7 +115,7 @@ namespace Microsoft } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -135,7 +135,7 @@ namespace Microsoft Diagnostic().WithLocation(3, 1), }; - await VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostics, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expectedDiagnostics, CancellationToken.None).ConfigureAwait(true); } /// @@ -159,7 +159,7 @@ public async Task TestVerbatimStringLiteralAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -182,7 +182,7 @@ public async Task TestInvalidMultipleBlankLinesAsync() Diagnostic().WithLocation(35, 1), }; - await VerifyCSharpDiagnosticAsync(TestCode, expectedDiagnostics, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(TestCode, expectedDiagnostics, CancellationToken.None).ConfigureAwait(true); } /// @@ -234,7 +234,7 @@ public void Bar() Diagnostic().WithLocation(27, 1), Diagnostic().WithLocation(35, 1), }; - await VerifyCSharpFixAsync(TestCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(TestCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -257,7 +257,7 @@ void Bar() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1508UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1508UnitTests.cs index 66ab000fd..13a71f437 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1508UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1508UnitTests.cs @@ -62,7 +62,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -108,7 +108,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(13, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -150,7 +150,7 @@ to determine the spacing with the close brace. } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -206,7 +206,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(18, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -236,7 +236,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -286,7 +286,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(15, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -314,7 +314,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -360,7 +360,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(13, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -395,7 +395,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -447,7 +447,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(15, 17); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -474,7 +474,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -518,7 +518,7 @@ public void TestMethod() "; var expectedDiagnostic = Diagnostic().WithLocation(12, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -546,7 +546,7 @@ public int TestMethod(int x) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -594,7 +594,7 @@ public int TestMethod(int x) "; var expectedDiagnostic = Diagnostic().WithLocation(14, 13); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -612,7 +612,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -640,7 +640,7 @@ public class TestClass "; var expectedDiagnostic = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -662,7 +662,7 @@ public async Task TestValidTypeDeclarationAsync(string typeKeyword, string acces }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -695,7 +695,7 @@ public async Task TestInvalidTypeDeclarationAsync(string typeKeyword, string acc "; var expectedDiagnostic = Diagnostic().WithLocation(7, 5); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -715,7 +715,7 @@ public enum TestEnum } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -747,7 +747,7 @@ public enum TestEnum "; var expectedDiagnostic = Diagnostic().WithLocation(8, 5); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -771,7 +771,7 @@ public int TestProperty2 } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -807,7 +807,7 @@ public int TestProperty "; var expectedDiagnostic = Diagnostic().WithLocation(9, 9); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -834,7 +834,7 @@ public class TestClass / DiagnosticResult.CompilerError("CS1022").WithMessage("Type or namespace definition, or end-of-file expected").WithLocation(6, 1), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1509UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1509UnitTests.cs index 03e890741..2b7823296 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1509UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1509UnitTests.cs @@ -30,7 +30,7 @@ class Foo { }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -52,7 +52,7 @@ class Foo { }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -64,7 +64,7 @@ class Foo }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -77,7 +77,7 @@ class Foo }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -91,7 +91,7 @@ that spans 2 lines */ }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -107,7 +107,7 @@ that spans 2 lines */ }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -133,7 +133,7 @@ that spans 2 lines */ { }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -153,7 +153,7 @@ struct Foo { }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -165,7 +165,7 @@ struct Foo }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -189,7 +189,7 @@ void Bar() { } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -214,7 +214,7 @@ void Bar() { } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -228,7 +228,7 @@ void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -252,7 +252,7 @@ class Foo { } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -265,7 +265,7 @@ class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -289,7 +289,7 @@ string Prop { get;set;} }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -301,7 +301,7 @@ class Foo string Prop { get;set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -341,7 +341,7 @@ void Bar() } } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -360,7 +360,7 @@ void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -382,7 +382,7 @@ void Bar() Diagnostic().WithLocation(8, 9), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); var fixedCode = @" class Foo @@ -393,7 +393,7 @@ void Bar() {} } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -409,7 +409,7 @@ void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -439,7 +439,7 @@ void Bar() { }; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -455,7 +455,7 @@ void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -483,7 +483,7 @@ void Bar() {1, 2, 3}; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -498,7 +498,7 @@ void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -536,7 +536,7 @@ void Bar() { Name = ""qwe""}; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -559,7 +559,7 @@ void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -587,7 +587,7 @@ void Bar() { Name = ""qwe""}; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -607,7 +607,7 @@ void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -641,7 +641,7 @@ void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -677,7 +677,7 @@ void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -713,7 +713,7 @@ void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -751,7 +751,7 @@ void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -808,7 +808,7 @@ void Bar() } } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -866,7 +866,7 @@ public interface TestInterface3 } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1510UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1510UnitTests.cs index 71eedfed1..436a8ca90 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1510UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1510UnitTests.cs @@ -65,7 +65,7 @@ public void TestCatchFinallyStatements() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -123,7 +123,7 @@ public int TestElseStatement(int x) Diagnostic().WithLocation(14, 13).WithArguments("else"), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -195,7 +195,7 @@ public void TestCatchFinallyStatements() Diagnostic().WithLocation(21, 13).WithArguments("finally"), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1511UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1511UnitTests.cs index f3ec851bb..8c7f77ede 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1511UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1511UnitTests.cs @@ -77,7 +77,7 @@ public int Quux() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -228,7 +228,7 @@ public int Corge() Diagnostic().WithLocation(61, 13), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1512UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1512UnitTests.cs index cf817ff7a..d53feca94 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1512UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1512UnitTests.cs @@ -66,7 +66,7 @@ public int Baz() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -116,7 +116,7 @@ public int Baz(int x) Diagnostic().WithLocation(11, 13), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -152,7 +152,7 @@ public class Bar Diagnostic().WithLocation(5, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -176,7 +176,7 @@ public class Bar } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -195,7 +195,7 @@ namespace Foo } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -215,7 +215,7 @@ namespace Foo } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -251,7 +251,7 @@ namespace Foo Diagnostic().WithLocation(5, 1), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -273,7 +273,7 @@ public void TestMethod() { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -295,7 +295,7 @@ public void TestMethod() { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -318,7 +318,7 @@ internal class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1513UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1513UnitTests.cs index b009423eb..7675100e2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1513UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1513UnitTests.cs @@ -425,7 +425,7 @@ public void TestTernaryConstruction() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -555,7 +555,7 @@ public void Example() Diagnostic().WithLocation(87, 18), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -732,7 +732,7 @@ public void Example() Diagnostic().WithLocation(53, 10), Diagnostic().WithLocation(69, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } // This is a regression test for #2062. @@ -785,7 +785,7 @@ public void Func2(bool flag) "; var expected = Diagnostic().WithLocation(16, 14); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -816,7 +816,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -873,7 +873,7 @@ var x in } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -903,7 +903,7 @@ public int Do(int i) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -990,7 +990,7 @@ private set } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1010,7 +1010,7 @@ public void TestMethod(string extraSupport) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1030,7 +1030,7 @@ public class TestClass // Hello".ReplaceLineEndings("\n"); - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1097,7 +1097,7 @@ public Bar(int id, string name) } }"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, testCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1514UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1514UnitTests.cs index 0fbee2dfc..9c9c7d0fa 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1514UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1514UnitTests.cs @@ -55,7 +55,7 @@ public async Task TestValidTypeDeclarationAsync(string typeKeyword) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -98,7 +98,7 @@ public async Task TestInvalidTypeDeclarationAsync(string typeKeyword) var expectedResult = Diagnostic().WithLocation(6, 5); - await VerifyCSharpFixAsync(testCode, expectedResult, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResult, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -144,7 +144,7 @@ public void TestMethod2() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -218,7 +218,7 @@ public void TestMethod() Diagnostic().WithLocation(18, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -261,7 +261,7 @@ public int this[byte index] } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -325,7 +325,7 @@ public int this[int index] Diagnostic().WithLocation(13, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -349,7 +349,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -387,7 +387,7 @@ public class TestClass "; var expectedDiagnostic = Diagnostic().WithLocation(6, 9); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -414,7 +414,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -458,7 +458,7 @@ public class TestClass "; var expectedDiagnostic = Diagnostic().WithLocation(6, 9); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -485,7 +485,7 @@ public static explicit operator TestClass(string foo) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -529,7 +529,7 @@ public static explicit operator TestClass(string foo) "; var expectedDiagnostic = Diagnostic().WithLocation(6, 9); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -550,7 +550,7 @@ public async Task TestValidDelegateDeclarationsAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -582,7 +582,7 @@ public async Task TestInvalidDelegateDeclarationsAsync() "; var expectedDiagnostic = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -623,7 +623,7 @@ public event EventHandler TestEvent4 } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -695,7 +695,7 @@ public event EventHandler TestEvent2 Diagnostic().WithLocation(12, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -747,7 +747,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -793,7 +793,7 @@ public class TestClass "; var expectedDiagnostic = Diagnostic().WithLocation(10, 9); - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -840,7 +840,7 @@ public void TestMethod() { } Diagnostic().WithLocation(10, 9), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -883,7 +883,7 @@ public class TestClass Diagnostic().WithLocation(6, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -921,7 +921,7 @@ public void SomeOtherMethod() "; var expected = Diagnostic().WithLocation(5, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -953,7 +953,7 @@ public void Method2() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1092,7 +1092,7 @@ public void Method7() Diagnostic().WithLocation(49, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1149,7 +1149,7 @@ public enum TestEnum Diagnostic().WithLocation(14, 9), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1167,7 +1167,7 @@ public class TestClass var expected = DiagnosticResult.EmptyDiagnosticResults; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1183,7 +1183,7 @@ public class TestClass var expected = DiagnosticResult.EmptyDiagnosticResults; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1203,7 +1203,7 @@ public class TestClass var expected = DiagnosticResult.EmptyDiagnosticResults; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1241,7 +1241,7 @@ public class TestClass Diagnostic().WithLocation(0).WithArguments(" not", "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1273,7 +1273,7 @@ public class TestClass Diagnostic().WithLocation(0).WithArguments(" not", "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1307,7 +1307,7 @@ public class TestClass Diagnostic().WithLocation(0).WithArguments(" not", "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1343,7 +1343,7 @@ public class TestClass Diagnostic().WithLocation(0).WithArguments(" not", "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1515UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1515UnitTests.cs index 07b810bd1..ed52cf1c3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1515UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1515UnitTests.cs @@ -68,7 +68,7 @@ public void Qux() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -120,7 +120,7 @@ public class Bar Diagnostic().WithLocation(12, 9), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -149,7 +149,7 @@ public int Baz() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -184,7 +184,7 @@ public async Task TestPreprocessorInteractionAsync() using System.Runtime.InteropServices; "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -205,7 +205,7 @@ public void TestMethod() { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -240,7 +240,7 @@ public class TestConstants Diagnostic().WithLocation(5, 3), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -266,7 +266,7 @@ public Class1() public double Value { get; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -297,7 +297,7 @@ class TestClass testCode = "#pragma warning disable CS1591" + Environment.NewLine + testCode; } - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -316,7 +316,7 @@ class TestClass 42; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -335,7 +335,7 @@ class TestClass 42; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -354,7 +354,7 @@ public int TestMethod(int x) => 42; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UnitTests.cs index 5c3fd3d97..1a4041f9b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UnitTests.cs @@ -86,7 +86,7 @@ public void DiagnosticMessageFormatIsCorrect() [Fact] public async Task TestCorrectSpacingAsync() { - await VerifyCSharpDiagnosticAsync(CorrectCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(CorrectCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -158,7 +158,7 @@ class Foo { } Diagnostic().WithLocation(46, 1), }; - await VerifyCSharpFixAsync(testCode, expected, CorrectCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, CorrectCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -182,7 +182,7 @@ public class Bar } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -244,7 +244,7 @@ public Bar() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -285,7 +285,7 @@ void Foo() { } void Bar() { } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -356,7 +356,7 @@ public event EventHandler MyEvent } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -385,7 +385,7 @@ public class Foo private string experiment2; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -401,7 +401,7 @@ public string FooProperty set { } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -417,7 +417,7 @@ public event System.EventHandler FooProperty remove { } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -440,7 +440,7 @@ public string FooProperty Diagnostic().WithLocation(8, 1), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -463,7 +463,7 @@ public event System.EventHandler FooProperty Diagnostic().WithLocation(8, 1), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -487,7 +487,7 @@ public string FooProperty Diagnostic().WithLocation(11, 1), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -510,7 +510,7 @@ public event System.EventHandler FooProperty Diagnostic().WithLocation(10, 1), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -530,7 +530,7 @@ public class TestClass private bool test2; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -711,7 +711,7 @@ private set Diagnostic().WithLocation(71, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -739,7 +739,7 @@ public async Task TestBlankLinesAroundAssemblyAttributesAsync(string followingEl Diagnostic().WithLocation(3, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UsingGroupsUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UsingGroupsUnitTests.cs index 2cf747a69..040b7327c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UsingGroupsUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UsingGroupsUnitTests.cs @@ -45,7 +45,7 @@ public async Task TestAllowForCompilationUnitAsync(string namespaceName) { TestCode = testCode, Settings = GetSettings(blankLinesBetweenUsingGroups: OptionSetting.Allow), - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } //// TODO: Add namespace checks to the remaining code using WrapWithNamespace @@ -100,7 +100,7 @@ namespace TestNamespace }, FixedCode = fixedTestCode, Settings = GetSettings(systemUsingDirectivesFirst: true, blankLinesBetweenUsingGroups: OptionSetting.Omit), - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -151,7 +151,7 @@ namespace TestNamespace }, FixedCode = fixedTestCode, Settings = GetSettings(systemUsingDirectivesFirst: false, blankLinesBetweenUsingGroups: OptionSetting.Omit), - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -184,7 +184,7 @@ namespace TestNamespace { TestCode = testCode, Settings = GetSettings(systemUsingDirectivesFirst: true, blankLinesBetweenUsingGroups: OptionSetting.Omit), - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -237,7 +237,7 @@ namespace TestNamespace }, FixedCode = fixedTestCode, Settings = GetSettings(systemUsingDirectivesFirst: true, blankLinesBetweenUsingGroups: OptionSetting.Require), - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -288,7 +288,7 @@ namespace TestNamespace }, FixedCode = fixedTestCode, Settings = GetSettings(systemUsingDirectivesFirst: false, blankLinesBetweenUsingGroups: OptionSetting.Require), - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } private static string GetSettings(bool systemUsingDirectivesFirst = true, OptionSetting blankLinesBetweenUsingGroups = OptionSetting.Allow) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1517UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1517UnitTests.cs index dbdec01d1..34f438d8c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1517UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1517UnitTests.cs @@ -36,7 +36,7 @@ public void Bar(int i) public async Task TestWithBlankLinesAtStartOfFileAsync() { var testCode = "\r\n\r\n" + BaseCode; - await VerifyCSharpDiagnosticAsync(testCode, this.GenerateExpectedWarning(1, 1), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, this.GenerateExpectedWarning(1, 1), CancellationToken.None).ConfigureAwait(true); } /// @@ -47,7 +47,7 @@ public async Task TestWithBlankLinesAtStartOfFileAsync() public async Task TestWithBlankLinefeedOnlyLinesAtStartOfFileAsync() { var testCode = "\n\n" + BaseCode; - await VerifyCSharpDiagnosticAsync(testCode, this.GenerateExpectedWarning(1, 1), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, this.GenerateExpectedWarning(1, 1), CancellationToken.None).ConfigureAwait(true); } /// @@ -58,7 +58,7 @@ public async Task TestWithBlankLinefeedOnlyLinesAtStartOfFileAsync() public async Task TestWithNonWhitespaceTriviaAsync() { var testCode = "#if true\r\n" + BaseCode + "\r\n#endif\r\n"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -69,7 +69,7 @@ public async Task TestWithNonWhitespaceTriviaAsync() public async Task TestWithNonWhitespaceTriviaAndLeadingBlankLinesAsync() { var testCode = "\r\n\r\n#if true\r\n" + BaseCode + "\r\n#endif\r\n"; - await VerifyCSharpDiagnosticAsync(testCode, this.GenerateExpectedWarning(1, 1), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, this.GenerateExpectedWarning(1, 1), CancellationToken.None).ConfigureAwait(true); } /// @@ -79,7 +79,7 @@ public async Task TestWithNonWhitespaceTriviaAndLeadingBlankLinesAsync() [Fact] public async Task TestWithoutCarriageReturnLineFeedAtStartOfFileAsync() { - await VerifyCSharpDiagnosticAsync(BaseCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(BaseCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -90,7 +90,7 @@ public async Task TestWithoutCarriageReturnLineFeedAtStartOfFileAsync() public async Task TestWithInvalidSpacingAsync() { var testCode = " " + BaseCode; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -104,7 +104,7 @@ public async Task TestCodeFixProviderStripsLeadingBlankLinesAsync() var fixedTestCode = BaseCode; var expected = Diagnostic().WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -118,7 +118,7 @@ public async Task TestCodeFixProviderHandlesWhitespaceProperlyAsync() var fixedTestCode = " " + BaseCode; var expected = Diagnostic().WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -132,7 +132,7 @@ public async Task TestCodeFixProviderHandlesBlankLinesWithWhitespaceProperlyAsyn var fixedTestCode = BaseCode; var expected = Diagnostic().WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -146,7 +146,7 @@ public async Task TestCodeFixProviderHandlesNonWhitespaceTriviaProperlyAsync() var fixedTestCode = "#if true\r\n" + BaseCode + "\r\n#endif\r\n"; var expected = Diagnostic().WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } private DiagnosticResult GenerateExpectedWarning(int line, int column) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1518UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1518UnitTests.cs index a802da902..e06469742 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1518UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1518UnitTests.cs @@ -48,7 +48,7 @@ internal async Task TestWithBlankLinesAtEndOfFileAsync(OptionSetting? newlineAtE var fixedCode = BaseCode + result; var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(8, 2); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -69,12 +69,12 @@ internal async Task TestWithWhiteSpaceOnlyAsync(OptionSetting? newlineAtEndOfFil if (expectedText == null) { - await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } else { var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(1, 1); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } @@ -96,12 +96,12 @@ internal async Task TestWithWhiteSpaceAndNewlineOnlyAsync(OptionSetting? newline if (expectedText == null) { - await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } else { var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(1, 1); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } @@ -118,7 +118,7 @@ internal async Task TestWithWhiteSpaceAndNewlineOnlyAsync(OptionSetting? newline internal async Task TestWithEmptyFileAsync(OptionSetting? newlineAtEndOfFile) { var testCode = string.Empty; - await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -138,7 +138,7 @@ internal async Task TestWithLineFeedOnlyBlankLinesAtEndOfFileAsync(OptionSetting var fixedCode = BaseCode + result; var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(8, 2); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -160,12 +160,12 @@ internal async Task TestWithSingleCarriageReturnLineFeedAtEndOfFileAsync(OptionS if (expectedText == null) { - await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } else { var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(8, 2); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } @@ -188,12 +188,12 @@ internal async Task TestWithSingleLineFeedAtEndOfFileAsync(OptionSetting? newlin if (expectedText == null) { - await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } else { var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(8, 2); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } @@ -216,12 +216,12 @@ internal async Task TestWithoutCarriageReturnLineFeedAtEndOfFileAsync(OptionSett if (expectedText == null) { - await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } else { var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(8, 2); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } @@ -242,7 +242,7 @@ internal async Task TestFileEndsWithSpacesAsync(OptionSetting? newlineAtEndOfFil var fixedCode = BaseCode + expectedText; var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(8, 2); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -264,12 +264,12 @@ internal async Task TestFileEndingWithCommentAsync(OptionSetting? newlineAtEndOf if (expectedText == null) { - await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } else { var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(9, 16); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } @@ -290,7 +290,7 @@ internal async Task TestFileEndingWithCommentAndSpuriousWhitespaceAsync(OptionSe var fixedCode = BaseCode + "\r\n// Test comment" + expectedText; var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(9, 16); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -312,12 +312,12 @@ internal async Task TestFileEndingWithEndIfAsync(OptionSetting? newlineAtEndOfFi if (expectedText == null) { - await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(newlineAtEndOfFile, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } else { var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(10, 7); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } @@ -338,7 +338,7 @@ internal async Task TestFileEndingWithEndIfWithSpuriousWhitespaceAsync(OptionSet var fixedCode = "#if true\r\n" + BaseCode + "\r\n#endif" + expectedText; var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(10, 7); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -358,7 +358,7 @@ internal async Task TestCodeFixProviderStripsTrailingBlankLinesAsync(OptionSetti var fixedCode = BaseCode + expectedText; var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(8, 2); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -378,7 +378,7 @@ internal async Task TestCodeFixProviderStripsTrailingBlankLinesIncludingWhitespa var fixedCode = BaseCode + expectedText; var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(8, 2); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -398,7 +398,7 @@ internal async Task TestCodeFixProviderStripsTrailingLinefeedOnlyBlankLinesInclu var fixedCode = BaseCode + expectedText; var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(8, 2); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -418,7 +418,7 @@ internal async Task TestCodeFixProviderOnlyStripsTrailingBlankLinesAsync(OptionS var fixedCode = "#if true\r\n" + BaseCode + "\r\n#endif" + expectedText; var expected = Diagnostic(this.GetDescriptor(newlineAtEndOfFile)).WithLocation(10, 7); - await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(newlineAtEndOfFile, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(OptionSetting? newlineAtEndOfFile, string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1519UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1519UnitTests.cs index 87807bfae..3f4f1138e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1519UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1519UnitTests.cs @@ -45,7 +45,7 @@ public static IEnumerable TestStatements [MemberData(nameof(TestStatements))] public async Task TestSingleLineStatementWithoutBracesAsync(string statementText) { - await VerifyCSharpDiagnosticAsync(this.GenerateSingleLineTestStatement(statementText), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.GenerateSingleLineTestStatement(statementText), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -59,7 +59,7 @@ public async Task TestSingleLineStatementWithoutBracesAsync(string statementText public async Task TestMultiLineStatementWithoutBracesAsync(string statementText) { var expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpDiagnosticAsync(this.GenerateMultiLineTestStatement(statementText), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.GenerateMultiLineTestStatement(statementText), expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -81,7 +81,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -118,7 +118,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -140,7 +140,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -192,7 +192,7 @@ public void Bar(int i) } } ", - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -205,7 +205,7 @@ public void Bar(int i) [MemberData(nameof(TestStatements))] public async Task TestStatementWithBracesAsync(string statementText) { - await VerifyCSharpDiagnosticAsync(this.GenerateFixedTestStatement(statementText), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(this.GenerateFixedTestStatement(statementText), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -228,7 +228,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -259,7 +259,7 @@ public void Bar(int i) Diagnostic().WithLocation(10, 13), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -285,7 +285,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -316,7 +316,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -336,7 +336,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -362,7 +362,7 @@ public void Bar(int i) Diagnostic().WithLocation(6, 33), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -377,7 +377,7 @@ unsafe private static void TestMethod() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -405,7 +405,7 @@ unsafe private static void TestMethod() }"; var expected = Diagnostic().WithLocation(6, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -422,7 +422,7 @@ unsafe private static void TestMethod() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -440,7 +440,7 @@ unsafe private static void TestMethod() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -454,7 +454,7 @@ unsafe private static void TestMethod() public async Task TestCodeFixForStatementAsync(string statementText) { var expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(this.GenerateMultiLineTestStatement(statementText), expected, this.GenerateFixedTestStatement(statementText), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(this.GenerateMultiLineTestStatement(statementText), expected, this.GenerateFixedTestStatement(statementText), CancellationToken.None).ConfigureAwait(true); } /// @@ -497,7 +497,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -540,7 +540,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(9, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -583,7 +583,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(11, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -626,7 +626,7 @@ public void Bar(int i) }, FixedCode = fixedTestCode, IndentationSize = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -670,7 +670,7 @@ public void Bar(int i) }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -711,7 +711,7 @@ public void Bar(int i) Diagnostic().WithLocation(6, 21), Diagnostic().WithLocation(6, 33), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -736,7 +736,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(8, 13); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } private string GenerateSingleLineTestStatement(string statementText) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1520UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1520UnitTests.cs index 74fa51560..b72ae2d15 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1520UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1520UnitTests.cs @@ -35,7 +35,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -60,7 +60,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -86,7 +86,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -117,7 +117,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -137,7 +137,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -158,7 +158,7 @@ public void Bar(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -207,7 +207,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -256,7 +256,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(11, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -305,7 +305,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(15, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -354,7 +354,7 @@ public void Bar(int i) }, FixedCode = fixedTestCode, IndentationSize = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -404,7 +404,7 @@ public void Bar(int i) }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -462,7 +462,7 @@ public void Bar(int i) Diagnostic().WithLocation(13, 13), Diagnostic().WithLocation(15, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -489,7 +489,7 @@ public void Bar(int i) }"; var expected = Diagnostic().WithLocation(8, 13); - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/DebugMessagesUnitTestsBase.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/DebugMessagesUnitTestsBase.cs index b0c27a0d5..4e524a589 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/DebugMessagesUnitTestsBase.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/DebugMessagesUnitTestsBase.cs @@ -36,13 +36,13 @@ protected abstract IEnumerable InitialArguments [Fact] public async Task TestConstantMessage_Field_PassAsync() { - await this.TestConstantMessage_Field_PassExecuterAsync("\" foo \"").ConfigureAwait(false); + await this.TestConstantMessage_Field_PassExecuterAsync("\" foo \"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Field_PassExpressionAsync() { - await this.TestConstantMessage_Field_PassExecuterAsync("\" \" + \"foo\" + \" \"").ConfigureAwait(false); + await this.TestConstantMessage_Field_PassExecuterAsync("\" \" + \"foo\" + \" \"").ConfigureAwait(true); } [Fact] @@ -55,19 +55,19 @@ public async Task TestConstantMessage_Field_PassWrongTypeAsync() DiagnosticResult.CompilerError("CS0029").WithSpan(new FileLinePositionSpan("/0/Test0.cs", startLinePosition, endLinePosition)).WithMessage("Cannot implicitly convert type 'int' to 'string'"), }; - await this.TestConstantMessage_Field_PassExecuterAsync("3", expected).ConfigureAwait(false); + await this.TestConstantMessage_Field_PassExecuterAsync("3", expected).ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Local_PassAsync() { - await this.TestConstantMessage_Local_PassExecuterAsync("\" foo \"").ConfigureAwait(false); + await this.TestConstantMessage_Local_PassExecuterAsync("\" foo \"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Local_PassExpressionAsync() { - await this.TestConstantMessage_Local_PassExecuterAsync("\" \" + \"foo\" + \" \"").ConfigureAwait(false); + await this.TestConstantMessage_Local_PassExecuterAsync("\" \" + \"foo\" + \" \"").ConfigureAwait(true); } [Fact] @@ -80,19 +80,19 @@ public async Task TestConstantMessage_Local_PassWrongTypeAsync() DiagnosticResult.CompilerError("CS0029").WithSpan(new FileLinePositionSpan("/0/Test0.cs", startLinePosition, endLinePosition)).WithMessage("Cannot implicitly convert type 'int' to 'string'"), }; - await this.TestConstantMessage_Local_PassExecuterAsync("3", expected).ConfigureAwait(false); + await this.TestConstantMessage_Local_PassExecuterAsync("3", expected).ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Inline_PassAsync() { - await this.TestConstantMessage_Inline_PassExecuterAsync("\" foo \"").ConfigureAwait(false); + await this.TestConstantMessage_Inline_PassExecuterAsync("\" foo \"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Inline_PassExpressionAsync() { - await this.TestConstantMessage_Inline_PassExecuterAsync("\" \" + \"foo\" + \" \"").ConfigureAwait(false); + await this.TestConstantMessage_Inline_PassExecuterAsync("\" \" + \"foo\" + \" \"").ConfigureAwait(true); } [Fact] @@ -118,79 +118,79 @@ public async Task TestConstantMessage_Inline_PassWrongTypeAsync() }; } - await this.TestConstantMessage_Inline_PassExecuterAsync("3", expected).ConfigureAwait(false); + await this.TestConstantMessage_Inline_PassExecuterAsync("3", expected).ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Field_FailNullAsync() { - await this.TestConstantMessage_Field_FailAsync("null").ConfigureAwait(false); + await this.TestConstantMessage_Field_FailAsync("null").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Field_FailEmptyAsync() { - await this.TestConstantMessage_Field_FailAsync("\"\"").ConfigureAwait(false); + await this.TestConstantMessage_Field_FailAsync("\"\"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Field_FailWhitespaceAsync() { - await this.TestConstantMessage_Field_FailAsync("\" \"").ConfigureAwait(false); + await this.TestConstantMessage_Field_FailAsync("\" \"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Field_FailExpressionWhitespaceAsync() { - await this.TestConstantMessage_Field_FailAsync("\" \" + \" \"").ConfigureAwait(false); + await this.TestConstantMessage_Field_FailAsync("\" \" + \" \"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Local_FailNullAsync() { - await this.TestConstantMessage_Local_FailAsync("null").ConfigureAwait(false); + await this.TestConstantMessage_Local_FailAsync("null").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Local_FailEmptyAsync() { - await this.TestConstantMessage_Local_FailAsync("\"\"").ConfigureAwait(false); + await this.TestConstantMessage_Local_FailAsync("\"\"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Local_FailWhitespaceAsync() { - await this.TestConstantMessage_Local_FailAsync("\" \"").ConfigureAwait(false); + await this.TestConstantMessage_Local_FailAsync("\" \"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Local_FailExpressionWhitespaceAsync() { - await this.TestConstantMessage_Local_FailAsync("\" \" + \" \"").ConfigureAwait(false); + await this.TestConstantMessage_Local_FailAsync("\" \" + \" \"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Inline_FailNullAsync() { - await this.TestConstantMessage_Inline_FailAsync("null").ConfigureAwait(false); + await this.TestConstantMessage_Inline_FailAsync("null").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Inline_FailEmptyAsync() { - await this.TestConstantMessage_Inline_FailAsync("\"\"").ConfigureAwait(false); + await this.TestConstantMessage_Inline_FailAsync("\"\"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Inline_FailWhitespaceAsync() { - await this.TestConstantMessage_Inline_FailAsync("\" \"").ConfigureAwait(false); + await this.TestConstantMessage_Inline_FailAsync("\" \"").ConfigureAwait(true); } [Fact] public async Task TestConstantMessage_Inline_FailExpressionWhitespaceAsync() { - await this.TestConstantMessage_Inline_FailAsync("\" \" + \" \"").ConfigureAwait(false); + await this.TestConstantMessage_Inline_FailAsync("\" \" + \" \"").ConfigureAwait(true); } [Fact] @@ -206,7 +206,7 @@ public void Bar() }} }}"; - await this.VerifyCSharpDiagnosticAsync(this.BuildTestCode(testCode), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(this.BuildTestCode(testCode), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -234,7 +234,7 @@ public static void Fail(string s) }} "; - await this.VerifyCSharpDiagnosticAsync(this.BuildTestCode(testCode), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(this.BuildTestCode(testCode), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -249,7 +249,7 @@ public void Bar() } }"; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -279,7 +279,7 @@ public void Bar() this.Diagnostic().WithLocation(12, 9), }; - await this.VerifyCSharpDiagnosticAsync(this.BuildTestCode(testCode), expected, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(this.BuildTestCode(testCode), expected, CancellationToken.None).ConfigureAwait(true); } protected DiagnosticResult Diagnostic() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/FileMayOnlyContainTestBase.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/FileMayOnlyContainTestBase.cs index ef8aeece5..2423f5f2a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/FileMayOnlyContainTestBase.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/FileMayOnlyContainTestBase.cs @@ -34,7 +34,7 @@ public async Task TestOneElementAsync() testCode = testCode.Replace("%1", this.Keyword); - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -65,14 +65,14 @@ public async Task TestTwoElementsAsync() if (this.SupportsCodeFix) { - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } else { - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(true); foreach (var (_, code) in fixedCode) { - await this.VerifyCSharpDiagnosticAsync(code, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(code, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } @@ -116,14 +116,14 @@ public async Task TestThreeElementsAsync() if (this.SupportsCodeFix) { - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } else { - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(true); foreach (var (_, code) in fixedCode) { - await this.VerifyCSharpDiagnosticAsync(code, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(code, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } @@ -160,14 +160,14 @@ public async Task TestRemoveWarningSuppressionAsync() if (this.SupportsCodeFix) { - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } else { - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(true); foreach (var (_, code) in fixedCode) { - await this.VerifyCSharpDiagnosticAsync(code, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(code, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } @@ -200,15 +200,15 @@ public async Task TestPreserveWarningSuppressionAsync() if (this.SupportsCodeFix) { - await this.VerifyCSharpFixAsync(testCode.Replace("%1", this.Keyword), this.GetSettings(), expected, fixedCode.Select(c => (c.Item1, c.Item2.Replace("%1", this.Keyword))).ToArray(), CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode.Replace("%1", this.Keyword), this.GetSettings(), expected, fixedCode.Select(c => (c.Item1, c.Item2.Replace("%1", this.Keyword))).ToArray(), CancellationToken.None).ConfigureAwait(true); } else { - await this.VerifyCSharpDiagnosticAsync(testCode.Replace("%1", this.Keyword), this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode.Replace("%1", this.Keyword), this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(true); foreach (var (_, code) in fixedCode) { - await this.VerifyCSharpDiagnosticAsync(code.Replace("%1", this.Keyword), this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(code.Replace("%1", this.Keyword), this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } @@ -245,14 +245,14 @@ public async Task TestRemovePreprocessorDirectivesAsync() if (this.SupportsCodeFix) { - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } else { - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(true); foreach (var (_, code) in fixedCode) { - await this.VerifyCSharpDiagnosticAsync(code, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(code, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } @@ -294,14 +294,14 @@ public async Task TestPreservePreprocessorDirectivesAsync() if (this.SupportsCodeFix) { - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } else { - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(true); foreach (var (_, code) in fixedCode) { - await this.VerifyCSharpDiagnosticAsync(code, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(code, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1119UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1119UnitTests.cs index 329f79f40..1b9580ffe 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1119UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1119UnitTests.cs @@ -29,7 +29,7 @@ public void Bar() int x = 1; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -57,7 +57,7 @@ public void Bar() int x = 1; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -88,7 +88,7 @@ public void Bar() int x = 1; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -101,7 +101,7 @@ public void Bar() string x = ToString(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -129,7 +129,7 @@ public void Bar() string x = ToString(); } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -143,7 +143,7 @@ public void Bar() string x = Local + Local.IndexOf('x'); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -175,7 +175,7 @@ public void Bar() string x = Local.ToString() + Local.IndexOf('x'); } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -189,7 +189,7 @@ public void Bar() this.Local = Local; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -219,7 +219,7 @@ public void Bar() this.Local = Local; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -248,7 +248,7 @@ public void Bar() int x = Local; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -261,7 +261,7 @@ public void Bar() int x = (int)3; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -289,7 +289,7 @@ public void Bar() int x = (int)3; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -303,7 +303,7 @@ public void Bar() x = (int)3; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -332,7 +332,7 @@ public void Bar() x = (int)3; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -345,7 +345,7 @@ public void Bar() string x = ((int)3).ToString(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -359,7 +359,7 @@ public void Bar() x = ((int)3).ToString(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -378,7 +378,7 @@ public void Bar() x = -x; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -432,7 +432,7 @@ public void Bar() x = -x; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -446,7 +446,7 @@ public void Bar() x = 3 * unchecked(5); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -479,7 +479,7 @@ public void Bar() x = 3 * unchecked(5); } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -492,7 +492,7 @@ public void Bar() string x = nameof(Foo) + ""Bar""; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -519,7 +519,7 @@ public void Bar() string x = nameof(Foo) + ""Bar""; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -532,7 +532,7 @@ public void Bar() bool x = """" is string; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -545,7 +545,7 @@ public void Bar() string x = ("""" is string).ToString(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -577,7 +577,7 @@ public void Bar() x = """" is string; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -591,7 +591,7 @@ public void Bar() string x = y = ""foo""; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -620,7 +620,7 @@ public void Bar() string x = y = ""foo""; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -635,7 +635,7 @@ public void Bar() x = (y = ""foo"").ToString(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -648,7 +648,7 @@ public void Bar() string x = true ? ""foo"" : ""bar""; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -675,7 +675,7 @@ public void Bar() string x = true ? ""foo"" : ""bar""; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -689,7 +689,7 @@ public void Bar() string y = (true ? ""foo"" : ""bar"").ToString(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -702,7 +702,7 @@ public void Bar() string x = ""foo"" ?? ""bar""; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -729,7 +729,7 @@ public void Bar() string x = ""foo"" ?? ""bar""; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -743,7 +743,7 @@ public void Bar() string y = (""foo"" ?? ""bar"").ToString(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -757,7 +757,7 @@ public void Bar() System.Func y = (v) => v; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -789,7 +789,7 @@ public void Bar() System.Func y = (v) => v; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -803,7 +803,7 @@ public void Bar() string y = ((System.Func)((v) => v))(""foo""); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -816,7 +816,7 @@ public void Bar() int[] x = new int[10]; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -843,7 +843,7 @@ public void Bar() int[] x = new int[10]; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -856,7 +856,7 @@ public void Bar() string x = (new int[10]).ToString(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -870,7 +870,7 @@ public void Bar() var x = from y in new int[10] select y + 1; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -899,7 +899,7 @@ public void Bar() var x = from y in new int[10] select y + 1; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -913,7 +913,7 @@ public void Bar() var x = (from y in new int[10] select y + 1).ToString(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -926,7 +926,7 @@ public async void Bar() var x = (await System.Threading.Tasks.Task.Delay(10).ContinueWith(task => System.Threading.Tasks.Task.FromResult(1))).ToString(); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -941,7 +941,7 @@ public void Bar() var z = 1 * ~(1 + 1); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -978,7 +978,7 @@ private bool Test() Diagnostic(ParenthesesDiagnosticId).WithLocation(10, 17), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -998,7 +998,7 @@ public async Task TestCodeFixWorksInTriviaAsync() Diagnostic(ParenthesesDiagnosticId).WithLocation(1, 20), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1027,7 +1027,7 @@ public string Bar() return foo; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1052,7 +1052,7 @@ public void Bar() Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 31), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1068,7 +1068,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1087,7 +1087,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1116,7 +1116,7 @@ public string Bar() Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 20), Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 34), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1137,7 +1137,7 @@ public void Bar() { DiagnosticId, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1152,7 +1152,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1170,7 +1170,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1200,7 +1200,7 @@ public void Bar() Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 42), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1215,7 +1215,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1230,7 +1230,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1260,7 +1260,7 @@ public void Bar() Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 35), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1275,7 +1275,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1290,7 +1290,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1320,7 +1320,7 @@ public void Bar() Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 30), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1335,7 +1335,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1350,7 +1350,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1380,7 +1380,7 @@ public void Bar() Diagnostic(ParenthesesDiagnosticId).WithLocation(6, 29), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1432,7 +1432,7 @@ public static void Main(string[] args) Diagnostic(ParenthesesDiagnosticId).WithLocation(10, 11), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1470,7 +1470,7 @@ private static void Main() Diagnostic(ParenthesesDiagnosticId).WithLocation(4, 104), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } // In this version of Roslyn, we end up with an extra space between the opening brace diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1400UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1400UnitTests.cs index b7f6cdaf8..3e451928b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1400UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1400UnitTests.cs @@ -20,135 +20,135 @@ public class SA1400UnitTests [MemberData(nameof(CommonMemberData.BaseTypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestTypeDeclarationAsync(string typeName) { - await this.TestTypeDeclarationImplAsync(typeName).ConfigureAwait(false); + await this.TestTypeDeclarationImplAsync(typeName).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.TypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestPartialTypeDeclarationAsync(string typeName) { - await this.TestTypeDeclarationImplAsync($"partial {typeName}", warning: false).ConfigureAwait(false); + await this.TestTypeDeclarationImplAsync($"partial {typeName}", warning: false).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.BaseTypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestTypeDeclarationWithAttributesAsync(string typeName) { - await this.TestTypeDeclarationWithAttributesImplAsync(typeName).ConfigureAwait(false); + await this.TestTypeDeclarationWithAttributesImplAsync(typeName).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.TypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestPartialTypeDeclarationWithAttributesAsync(string typeName) { - await this.TestTypeDeclarationWithAttributesImplAsync($"partial {typeName}", warning: false).ConfigureAwait(false); + await this.TestTypeDeclarationWithAttributesImplAsync($"partial {typeName}", warning: false).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.BaseTypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestTypeDeclarationWithDirectivesAsync(string typeName) { - await this.TestTypeDeclarationWithDirectivesImplAsync(typeName).ConfigureAwait(false); + await this.TestTypeDeclarationWithDirectivesImplAsync(typeName).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.TypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestPartialTypeDeclarationWithDirectivesAsync(string typeName) { - await this.TestTypeDeclarationWithDirectivesImplAsync($"partial {typeName}", warning: false).ConfigureAwait(false); + await this.TestTypeDeclarationWithDirectivesImplAsync($"partial {typeName}", warning: false).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.BaseTypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestNestedTypeDeclarationAsync(string typeName) { - await this.TestNestedTypeDeclarationImplAsync(typeName).ConfigureAwait(false); + await this.TestNestedTypeDeclarationImplAsync(typeName).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.BaseTypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestNestedTypeDeclarationWithAttributesAsync(string typeName) { - await this.TestNestedTypeDeclarationWithAttributesImplAsync(typeName).ConfigureAwait(false); + await this.TestNestedTypeDeclarationWithAttributesImplAsync(typeName).ConfigureAwait(true); } [Theory] [MemberData(nameof(CommonMemberData.BaseTypeDeclarationKeywords), MemberType = typeof(CommonMemberData))] public async Task TestNestedTypeDeclarationWithDirectivesAsync(string typeName) { - await this.TestNestedTypeDeclarationWithDirectivesImplAsync(typeName).ConfigureAwait(false); + await this.TestNestedTypeDeclarationWithDirectivesImplAsync(typeName).ConfigureAwait(true); } [Fact] public async Task TestDelegateDeclarationAsync() { - await this.TestDeclarationAsync("internal", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(false); + await this.TestDeclarationAsync("internal", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(true); } [Fact] public async Task TestDelegateDeclarationWithAttributesAsync() { - await this.TestDeclarationWithAttributesAsync("internal", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(false); + await this.TestDeclarationWithAttributesAsync("internal", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(true); } [Fact] public async Task TestDelegateDeclarationWithDirectivesAsync() { - await this.TestDeclarationWithDirectivesAsync("internal", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(false); + await this.TestDeclarationWithDirectivesAsync("internal", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(true); } [Fact] public async Task TestNestedDelegateDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(true); } [Fact] public async Task TestNestedDelegateDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(true); } [Fact] public async Task TestNestedDelegateDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "TypeName", "delegate int TypeName", " ( int\n parameter\n );").ConfigureAwait(true); } [Fact] public async Task TestEventDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(true); } [Fact] public async Task TestEventDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(true); } [Fact] public async Task TestEventDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(true); } [Fact] public async Task TestStaticEventDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "static event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "static event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(true); } [Fact] public async Task TestStaticEventDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "static event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "static event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(true); } [Fact] public async Task TestStaticEventDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "static event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "static event EventHandler MemberName", "{ add { } remove { } }").ConfigureAwait(true); } [Fact] @@ -156,7 +156,7 @@ public async Task TestExplicitInterfaceEventDeclarationAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { event EventHandler MemberName; }"; - await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] @@ -164,7 +164,7 @@ public async Task TestExplicitInterfaceEventDeclarationWithAttributesAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { event EventHandler MemberName; }"; - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] @@ -172,43 +172,43 @@ public async Task TestExplicitInterfaceEventDeclarationWithDirectivesAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { event EventHandler MemberName; }"; - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler IInterface.MemberName", "{ add { } remove { } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] public async Task TestMethodDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(true); } [Fact] public async Task TestMethodDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(true); } [Fact] public async Task TestMethodDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(true); } [Fact] public async Task TestStaticMethodDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "static void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "static void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(true); } [Fact] public async Task TestStaticMethodDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "static void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "static void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(true); } [Fact] public async Task TestStaticMethodDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "static void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "static void MemberName", " ( int\n parameter\n ) { }").ConfigureAwait(true); } [Fact] @@ -216,7 +216,7 @@ public async Task TestExplicitInterfaceMethodDeclarationAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { void MemberName(int parameter); }"; - await this.TestNestedDeclarationAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] @@ -224,7 +224,7 @@ public async Task TestExplicitInterfaceMethodDeclarationWithAttributesAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { void MemberName(int parameter); }"; - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] @@ -232,79 +232,79 @@ public async Task TestExplicitInterfaceMethodDeclarationWithDirectivesAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { void MemberName(int parameter); }"; - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "void IInterface.MemberName", " ( int\n parameter\n ) { }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] public async Task TestInterfaceMethodDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n );", containingType: "interface", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n );", containingType: "interface", warning: false).ConfigureAwait(true); } [Fact] public async Task TestInterfaceMethodDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n );", containingType: "interface", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n );", containingType: "interface", warning: false).ConfigureAwait(true); } [Fact] public async Task TestInterfaceMethodDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n );", containingType: "interface", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "void MemberName", " ( int\n parameter\n );", containingType: "interface", warning: false).ConfigureAwait(true); } [Fact] public async Task TestPartialMethodDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "partial void MemberName", " ( int\n parameter\n );", containingType: "partial class", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "partial void MemberName", " ( int\n parameter\n );", containingType: "partial class", warning: false).ConfigureAwait(true); } [Fact] public async Task TestPartialMethodDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "partial void MemberName", " ( int\n parameter\n );", containingType: "partial class", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "partial void MemberName", " ( int\n parameter\n );", containingType: "partial class", warning: false).ConfigureAwait(true); } [Fact] public async Task TestPartialMethodDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "partial void MemberName", " ( int\n parameter\n );", containingType: "partial class", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "partial void MemberName", " ( int\n parameter\n );", containingType: "partial class", warning: false).ConfigureAwait(true); } [Fact] public async Task TestPropertyDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }").ConfigureAwait(true); } [Fact] public async Task TestPropertyDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }").ConfigureAwait(true); } [Fact] public async Task TestPropertyDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }").ConfigureAwait(true); } [Fact] public async Task TestStaticPropertyDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "static EventHandler MemberName", "{ get; set; }").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "static EventHandler MemberName", "{ get; set; }").ConfigureAwait(true); } [Fact] public async Task TestStaticPropertyDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "static EventHandler MemberName", "{ get; set; }").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "static EventHandler MemberName", "{ get; set; }").ConfigureAwait(true); } [Fact] public async Task TestStaticPropertyDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "static EventHandler MemberName", "{ get; set; }").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "static EventHandler MemberName", "{ get; set; }").ConfigureAwait(true); } [Fact] @@ -312,7 +312,7 @@ public async Task TestExplicitInterfacePropertyDeclarationAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { EventHandler MemberName { get; set; } }"; - await this.TestNestedDeclarationAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] @@ -320,7 +320,7 @@ public async Task TestExplicitInterfacePropertyDeclarationWithAttributesAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { EventHandler MemberName { get; set; } }"; - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] @@ -328,133 +328,133 @@ public async Task TestExplicitInterfacePropertyDeclarationWithDirectivesAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { EventHandler MemberName { get; set; } }"; - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "EventHandler IInterface.MemberName", "{ get; set; }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] public async Task TestInterfacePropertyDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }", containingType: "interface", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }", containingType: "interface", warning: false).ConfigureAwait(true); } [Fact] public async Task TestInterfacePropertyDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }", containingType: "interface", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }", containingType: "interface", warning: false).ConfigureAwait(true); } [Fact] public async Task TestInterfacePropertyDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }", containingType: "interface", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "EventHandler MemberName", "{ get; set; }", containingType: "interface", warning: false).ConfigureAwait(true); } [Fact] public async Task TestEventFieldDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestEventFieldDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestEventFieldDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestStaticEventFieldDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "static event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "static event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestStaticEventFieldDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "static event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "static event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestStaticEventFieldDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "static event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "static event EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestInterfaceEventFieldDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;", containingType: "interface", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;", containingType: "interface", warning: false).ConfigureAwait(true); } [Fact] public async Task TestInterfaceEventFieldDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;", containingType: "interface", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;", containingType: "interface", warning: false).ConfigureAwait(true); } [Fact] public async Task TestInterfaceEventFieldDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;", containingType: "interface", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "event EventHandler MemberName", ", AnotherMemberName;", containingType: "interface", warning: false).ConfigureAwait(true); } [Fact] public async Task TestFieldDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestFieldDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestFieldDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestStaticFieldDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "MemberName", "static System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "MemberName", "static System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestStaticFieldDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "static System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "MemberName", "static System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestStaticFieldDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "static System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "MemberName", "static System.EventHandler MemberName", ", AnotherMemberName;").ConfigureAwait(true); } [Fact] public async Task TestIndexerDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "this", "EventHandler this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", elementName: "this[]").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "this", "EventHandler this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", elementName: "this[]").ConfigureAwait(true); } [Fact] public async Task TestIndexerDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "this", "EventHandler this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", elementName: "this[]").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "this", "EventHandler this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", elementName: "this[]").ConfigureAwait(true); } [Fact] public async Task TestIndexerDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "this", "EventHandler this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", elementName: "this[]").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "this", "EventHandler this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", elementName: "this[]").ConfigureAwait(true); } [Fact] @@ -462,7 +462,7 @@ public async Task TestExplicitInterfaceIndexerDeclarationAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { EventHandler this[int index] { get; set; } }"; - await this.TestNestedDeclarationAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] @@ -470,7 +470,7 @@ public async Task TestExplicitInterfaceIndexerDeclarationWithAttributesAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { EventHandler this[int index] { get; set; } }"; - await this.TestNestedDeclarationWithAttributesAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] @@ -478,43 +478,43 @@ public async Task TestExplicitInterfaceIndexerDeclarationWithDirectivesAsync() { string baseTypeList = ": IInterface"; string baseTypeDeclaration = "public interface IInterface { EventHandler this[int index] { get; set; } }"; - await this.TestNestedDeclarationWithDirectivesAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "this", "EventHandler IInterface.this[int", " index ] { get { throw new System.Exception(); } set { throw new System.Exception(); } }", baseTypeList: baseTypeList, baseTypeDeclarations: baseTypeDeclaration, warning: false).ConfigureAwait(true); } [Fact] public async Task TestConstructorDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "OuterTypeName", "OuterTypeName(", " ) { }", elementName: ".ctor").ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "OuterTypeName", "OuterTypeName(", " ) { }", elementName: ".ctor").ConfigureAwait(true); } [Fact] public async Task TestConstructorDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "OuterTypeName", "OuterTypeName(", " ) { }", elementName: ".ctor").ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "OuterTypeName", "OuterTypeName(", " ) { }", elementName: ".ctor").ConfigureAwait(true); } [Fact] public async Task TestConstructorDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "OuterTypeName", "OuterTypeName(", " ) { }", elementName: ".ctor").ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "OuterTypeName", "OuterTypeName(", " ) { }", elementName: ".ctor").ConfigureAwait(true); } [Fact] public async Task TestStaticConstructorDeclarationAsync() { - await this.TestNestedDeclarationAsync("private", "OuterTypeName", "static OuterTypeName(", " ) { }", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationAsync("private", "OuterTypeName", "static OuterTypeName(", " ) { }", warning: false).ConfigureAwait(true); } [Fact] public async Task TestStaticConstructorDeclarationWithAttributesAsync() { - await this.TestNestedDeclarationWithAttributesAsync("private", "OuterTypeName", "static OuterTypeName(", " ) { }", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithAttributesAsync("private", "OuterTypeName", "static OuterTypeName(", " ) { }", warning: false).ConfigureAwait(true); } [Fact] public async Task TestStaticConstructorDeclarationWithDirectivesAsync() { - await this.TestNestedDeclarationWithDirectivesAsync("private", "OuterTypeName", "static OuterTypeName(", " ) { }", warning: false).ConfigureAwait(false); + await this.TestNestedDeclarationWithDirectivesAsync("private", "OuterTypeName", "static OuterTypeName(", " ) { }", warning: false).ConfigureAwait(true); } private async Task TestTypeDeclarationImplAsync(string keyword, bool warning = true) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1401UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1401UnitTests.cs index 4ac2f2a78..37c8a7cd0 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1401UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1401UnitTests.cs @@ -27,7 +27,7 @@ public async Task TestClassWithPublicFieldAsync() DiagnosticResult expected = Diagnostic().WithLocation(3, 19); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -40,7 +40,7 @@ public async Task TestClassWithInternalFieldAsync() DiagnosticResult expected = Diagnostic().WithLocation(3, 21); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -51,7 +51,7 @@ public async Task TestClassWithFieldNoAccessModifierAsync() string bar; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -62,7 +62,7 @@ public async Task TestStructWithPublicFieldAsync() public string bar; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -72,7 +72,7 @@ public async Task TestClassWithConstFieldAsync() { public const string bar = ""qwe""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -87,7 +87,7 @@ public async Task TestClassWithStaticReadonlyFieldAsync(string accessModifier) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForBlockDeclarationUnitTestsBase.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForBlockDeclarationUnitTestsBase.cs index 76c2245a7..2b6d768a4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForBlockDeclarationUnitTestsBase.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForBlockDeclarationUnitTestsBase.cs @@ -57,7 +57,7 @@ public async Task TestTwoGenericElementsAsync() fixedCode = fixedCode.Select(c => (c.Item1, c.Item2.Replace("%1", this.Keyword))).ToArray(); DiagnosticResult expected = this.Diagnostic().WithLocation(4, this.Keyword.Length + 2); - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -74,7 +74,7 @@ public async Task TestTwoElementsWithRuleDisabledAsync() testCode = testCode.Replace("%1", this.Keyword); - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -106,11 +106,11 @@ public async Task TestTwoElementsWithDefaultRuleConfigurationAsync() if (this.IsConfiguredAsTopLevelTypeByDefault) { DiagnosticResult expected = this.Diagnostic().WithLocation(4, this.Keyword.Length + 2); - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } else { - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } @@ -125,7 +125,7 @@ public partial {this.Keyword} Foo }}"; - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -152,7 +152,7 @@ public partial {this.Keyword} Bar }; DiagnosticResult expected = this.Diagnostic().WithLocation(4, 17 + this.Keyword.Length); - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -177,7 +177,7 @@ public async Task TestPreferFilenameTypeAsync() }; DiagnosticResult expected = this.Diagnostic().WithLocation(1, 9 + this.Keyword.Length); - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -191,7 +191,7 @@ public async Task TestNestedTypesAsync() }} }}"; - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -245,7 +245,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -300,7 +300,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -354,7 +354,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -408,7 +408,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -458,7 +458,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -513,7 +513,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -567,7 +567,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -621,7 +621,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -674,7 +674,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -734,7 +734,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -793,7 +793,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -852,7 +852,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -905,7 +905,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -962,7 +962,7 @@ namespace TestNamespace this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1019,7 +1019,7 @@ namespace TestNamespace this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1073,7 +1073,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1127,7 +1127,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1181,7 +1181,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1235,7 +1235,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1288,7 +1288,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1344,7 +1344,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1398,7 +1398,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1452,7 +1452,7 @@ namespace TestNamespace }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1505,7 +1505,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1556,7 +1556,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1607,7 +1607,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1656,7 +1656,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1714,7 +1714,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1770,7 +1770,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1826,7 +1826,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1875,7 +1875,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -1931,7 +1931,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1987,7 +1987,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; - await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -2042,7 +2042,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2096,7 +2096,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2150,7 +2150,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2205,7 +2205,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2264,7 +2264,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2327,7 +2327,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2381,7 +2381,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2442,7 +2442,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2499,7 +2499,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2560,7 +2560,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2617,7 +2617,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2674,7 +2674,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2727,7 +2727,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2793,7 +2793,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2855,7 +2855,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2917,7 +2917,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -2975,7 +2975,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3042,7 +3042,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3107,7 +3107,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3172,7 +3172,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3235,7 +3235,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3298,7 +3298,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3353,7 +3353,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3413,7 +3413,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3470,7 +3470,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3530,7 +3530,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3587,7 +3587,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3644,7 +3644,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3698,7 +3698,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3763,7 +3763,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3825,7 +3825,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3887,7 +3887,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -3941,7 +3941,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -4008,7 +4008,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -4073,7 +4073,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -4138,7 +4138,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -4200,7 +4200,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -4260,7 +4260,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } [Fact] @@ -4316,7 +4316,7 @@ namespace TestNamespace var expected = new[] { this.Diagnostic().WithLocation(0).WithArguments("not", "preceded"), }; await this.VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None) - .ConfigureAwait(false); + .ConfigureAwait(true); } protected override string GetSettings() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForDelegateUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForDelegateUnitTests.cs index 90c623a29..a5b2d2fab 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForDelegateUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForDelegateUnitTests.cs @@ -22,7 +22,7 @@ public async Task TestOneElementAsync() { var testCode = @"public delegate void Foo();"; - await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -41,7 +41,7 @@ public async Task TestTwoElementsAsync() }; DiagnosticResult expected = Diagnostic().WithLocation(2, 22); - await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -69,7 +69,7 @@ public async Task TestTwoGenericElementsAsync(object namingConvention) }; DiagnosticResult expected = Diagnostic().WithLocation(2, 22); - await VerifyCSharpFixAsync(testCode, this.GetSettings((FileNamingConvention)namingConvention), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, this.GetSettings((FileNamingConvention)namingConvention), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -81,7 +81,7 @@ public async Task TestTwoElementsWithRuleDisabledAsync() public delegate void Bar(); "; - await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -93,7 +93,7 @@ public async Task TestTwoElementsWithDefaultRuleConfigurationAsync() public delegate void Bar(); "; - await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -120,7 +120,7 @@ public async Task TestThreeElementsAsync() Diagnostic().WithLocation(3, 22), }; - await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -139,7 +139,7 @@ public async Task TestPreferFilenameTypeAsync() }; DiagnosticResult expected = Diagnostic().WithLocation(1, 22); - await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForEnumUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForEnumUnitTests.cs index fc20e3cd6..5fe48f34a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForEnumUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1402ForEnumUnitTests.cs @@ -23,7 +23,7 @@ public async Task TestOneElementAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -54,7 +54,7 @@ enum Bar }; DiagnosticResult expected = Diagnostic().WithLocation(5, 6); - await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -72,7 +72,7 @@ enum Bar } "; - await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -90,7 +90,7 @@ enum Bar } "; - await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -135,7 +135,7 @@ enum FooBar Diagnostic().WithLocation(9, 6), }; - await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -166,7 +166,7 @@ enum Test0 }; DiagnosticResult expected = Diagnostic().WithLocation(1, 6); - await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, this.GetSettings(), expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1403UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1403UnitTests.cs index 2cfd1b18f..b9a6369a2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1403UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1403UnitTests.cs @@ -35,7 +35,7 @@ namespace Bar }"; DiagnosticResult expected = this.Diagnostic().WithLocation(3, 15); - await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, this.GetSettings(), expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1404UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1404UnitTests.cs index 9e2fc34c7..5f6925d1a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1404UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1404UnitTests.cs @@ -30,7 +30,7 @@ public void Bar() }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -46,7 +46,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -63,7 +63,7 @@ public void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(4, 34); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -101,7 +101,7 @@ public void Bar() }, NumberOfIncrementalIterations = 2, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -141,7 +141,7 @@ public void Bar() }, NumberOfIncrementalIterations = 2, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -181,7 +181,7 @@ public void Bar() }, NumberOfIncrementalIterations = 2, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -219,7 +219,7 @@ public void Bar() }, NumberOfIncrementalIterations = 2, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -257,7 +257,7 @@ public void Bar() }, NumberOfIncrementalIterations = 2, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -295,7 +295,7 @@ public void Bar() }, NumberOfIncrementalIterations = 2, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -333,7 +333,7 @@ public void Bar() }, NumberOfIncrementalIterations = 2, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -349,7 +349,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -389,7 +389,7 @@ public void Bar() }, NumberOfIncrementalIterations = 2, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -410,7 +410,7 @@ public void Bar() Diagnostic().WithLocation(4, 66), DiagnosticResult.CompilerError("CS0029").WithMessage("Cannot implicitly convert type 'int' to 'string'").WithLocation(4, 82), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -424,7 +424,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -442,7 +442,7 @@ public class Foo {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1405UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1405UnitTests.cs index 48253cb0c..b92f30a6a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1405UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1405UnitTests.cs @@ -47,7 +47,7 @@ public void Bar() }"; DiagnosticResult expected = this.Diagnostic().WithLocation(6, 9); - await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -79,7 +79,7 @@ public void Bar() this.Diagnostic().WithLocation(17, 13), }; - await this.VerifyCSharpDiagnosticAsync(testCode, expected, includeSystemDll: false, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, expected, includeSystemDll: false, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1406UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1406UnitTests.cs index 270b334ed..1b86ba50e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1406UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1406UnitTests.cs @@ -64,7 +64,7 @@ public void Bar() this.Diagnostic().WithLocation(17, 13), }; - await this.VerifyCSharpDiagnosticAsync(testCode, expected, includeSystemDll: false, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, expected, includeSystemDll: false, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1407UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1407UnitTests.cs index 7c7db8e74..3fc2d87eb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1407UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1407UnitTests.cs @@ -25,7 +25,7 @@ public void Bar() int x = 1 - 1 + 1 - 1; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -38,7 +38,7 @@ public void Bar() int x = 1 / 1 * 1 / 1; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -51,7 +51,7 @@ public void Bar() int x = 1 >> 1 << 1 >> 1; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -74,7 +74,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -97,7 +97,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -110,7 +110,7 @@ public void Bar() int x = 1 + (1 * 1); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -123,7 +123,7 @@ public void Bar() int x = (1 * 1) * 1; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -150,7 +150,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -177,7 +177,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -215,7 +215,7 @@ public void Bar() Diagnostic().WithLocation(9, 24), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1408UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1408UnitTests.cs index 28e0a7987..aa54ca400 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1408UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1408UnitTests.cs @@ -25,7 +25,7 @@ public void Bar() bool x = true || false || true || false; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -38,7 +38,7 @@ public void Bar() bool x = true && false && true && false; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -61,7 +61,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -84,7 +84,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -97,7 +97,7 @@ public void Bar() bool x = (true || false) && true; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -110,7 +110,7 @@ public void Bar() bool x = true || (false == true); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -124,7 +124,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -137,7 +137,7 @@ public void Bar() bool x = (true && false) || true; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -164,7 +164,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -201,7 +201,7 @@ public void Bar() Diagnostic().WithLocation(9, 22), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1410UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1410UnitTests.cs index 2af6cc915..dd30a4ab3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1410UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1410UnitTests.cs @@ -25,7 +25,7 @@ public void Bar() System.Func getRandomNumber = delegate { return 3; }; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -38,7 +38,7 @@ public void Bar() System.Func getNumber = delegate (int i) { return i; }; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -53,7 +53,7 @@ public void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(5, 52); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -76,7 +76,7 @@ public void Bar() }"; var expected = Diagnostic().WithLocation(5, 52); - await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -99,7 +99,7 @@ public void Bar() }"; var expected = Diagnostic().WithLocation(5, 59); - await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(true); } /// @@ -148,7 +148,7 @@ public static void TestMethod3(this TestClass obj, TestClass.Delegate2 d) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -227,7 +227,7 @@ public static void TestMethod6(this TestClass obj, TestClass.Delegate2 d) Diagnostic().WithLocation(12, 34), }; - await VerifyCSharpDiagnosticAsync(testCode, expectedResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expectedResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1411UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1411UnitTests.cs index 34db6bbbc..3f2b6072c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1411UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1411UnitTests.cs @@ -25,7 +25,7 @@ public void Bar() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -38,7 +38,7 @@ public void Bar() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -53,7 +53,7 @@ public void Bar() { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -68,7 +68,7 @@ public void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(3, 21); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -87,7 +87,7 @@ public void Bar() Diagnostic().WithLocation(3, 67), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -110,7 +110,7 @@ public void Bar() }"; var expected = Diagnostic().WithLocation(3, 21); - await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -133,7 +133,7 @@ public void Bar() }"; var expected = Diagnostic().WithLocation(3, 28); - await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -161,7 +161,7 @@ public void Bar() Diagnostic().WithLocation(3, 67), }; - await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1412UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1412UnitTests.cs index 5f3939b07..d0e9aeaf4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1412UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1412UnitTests.cs @@ -49,7 +49,7 @@ public async Task TestFileWithWrongEncodingAsync(int codepage) }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -68,15 +68,15 @@ public async Task TestFileWithUtf8EncodingWithoutBOMAsync() }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Theory] [MemberData(nameof(NonUtf8Encodings))] public async Task TestFixAllAsync(int codepage) { - await this.TestFixAllExecuterAsync(codepage, FixAllScope.Project).ConfigureAwait(false); - await this.TestFixAllExecuterAsync(codepage, FixAllScope.Solution).ConfigureAwait(false); + await this.TestFixAllExecuterAsync(codepage, FixAllScope.Project).ConfigureAwait(true); + await this.TestFixAllExecuterAsync(codepage, FixAllScope.Solution).ConfigureAwait(true); } [Fact] @@ -107,7 +107,7 @@ public async Task TestFixAllWithMultipleEncodingsAsync() }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } private async Task TestFixAllExecuterAsync(int codepage, FixAllScope scope) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1413UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1413UnitTests.cs index 427692e09..00e042a90 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1413UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/MaintainabilityRules/SA1413UnitTests.cs @@ -33,7 +33,7 @@ void Test() } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -71,7 +71,7 @@ void Foo() }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -136,7 +136,7 @@ void Foo() Diagnostic().WithLocation(19, 17), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -179,7 +179,7 @@ void Foo() Diagnostic().WithLocation(9, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -223,7 +223,7 @@ void Foo() Diagnostic().WithLocation(9, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -268,7 +268,7 @@ void Foo() Diagnostic().WithLocation(10, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -314,7 +314,7 @@ void Foo() Diagnostic().WithLocation(10, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -361,7 +361,7 @@ void Foo() Diagnostic().WithLocation(11, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -408,7 +408,7 @@ void Foo() Diagnostic().WithLocation(11, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -423,7 +423,7 @@ public async Task VerifyEmptyEnumAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -440,7 +440,7 @@ public async Task VerifyEnumWithTrailingCommaAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -469,7 +469,7 @@ public async Task VerifyEnumWithoutTrailingCommaAsync() Diagnostic().WithLocation(4, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -478,7 +478,7 @@ public async Task VerifySingleLineEnumWithoutCommaAsync() { // SA1413 is not reported whether or not the comma is included for single-line enums var testCode = @"enum TestEnum { One, Two }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -487,7 +487,7 @@ public async Task VerifySingleLineEnumWithCommaAsync() { // SA1413 is not reported whether or not the comma is included for single-line enums var testCode = @"enum TestEnum { One, Two, }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -514,7 +514,7 @@ public async Task VerifyEnumWithValueWithoutTrailingCommaAsync() Diagnostic().WithLocation(3, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -578,7 +578,7 @@ void Foo() Diagnostic().WithSpan(16, 21, 16, 36), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1300UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1300UnitTests.cs index 1cbc7f7fb..0c16cb2aa 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1300UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1300UnitTests.cs @@ -25,7 +25,7 @@ public async Task TestUpperCaseNamespaceAsync() }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -42,7 +42,7 @@ public async Task TestLowerCaseNamespaceAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(1, 11); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -67,7 +67,7 @@ public async Task TestAllowedLowerCaseNamespaceIsNotReportedAsync() { TestCode = testCode, Settings = customTestSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -90,7 +90,7 @@ public async Task TestLowerCaseComplicatedNamespaceAsync() Diagnostic().WithArguments("bar").WithLocation(1, 20), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -115,7 +115,7 @@ public async Task TestAllowedLowerCaseComplicatedNamespaceIsNotReportedAsync() { TestCode = testCode, Settings = customTestSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -126,7 +126,7 @@ public async Task TestUpperCaseClassAsync() }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -142,7 +142,7 @@ public async Task TestLowerCaseClassAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(1, 14); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -160,7 +160,7 @@ public class Test { }"; public class Test { }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(1, 14); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -171,7 +171,7 @@ public async Task TestUpperCaseInterfaceAsync() }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -183,7 +183,7 @@ public async Task TestLowerCaseInterfaceAsync() }"; // Reported as SA1302 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -194,7 +194,7 @@ public async Task TestUpperCaseStructAsync() }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -210,7 +210,7 @@ public async Task TestLowerCaseStructAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(1, 15); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -228,7 +228,7 @@ public class Test { }"; public class Test { }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(1, 15); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -239,7 +239,7 @@ public async Task TestUpperCaseEnumAsync() }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -255,7 +255,7 @@ public async Task TestLowerCaseEnumAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(1, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -273,7 +273,7 @@ public class Test { }"; public class Test { }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(1, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -289,7 +289,7 @@ public async Task TestLowerCaseEnumWithMemberMatchingTargetNameAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(1, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -300,7 +300,7 @@ public async Task TestUpperCaseEnumMemberAsync() Member }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -316,7 +316,7 @@ public async Task TestLowerCaseEnumMemberAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("member").WithLocation(3, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -334,7 +334,7 @@ public async Task TestLowerCaseEnumMemberWithConflictAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("member").WithLocation(3, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -354,7 +354,7 @@ public async Task TestLowerCaseEnumMemberWithTwoConflictsAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("member").WithLocation(3, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -372,7 +372,7 @@ public async Task TestLowerCaseEnumMemberWithNumberAndConflictAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("member1").WithLocation(3, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -383,7 +383,7 @@ public async Task TestUpperCaseDelegateAsync() public delegate void Test(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -399,7 +399,7 @@ public async Task TestLowerCaseDelegateAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(3, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -419,7 +419,7 @@ public async Task TestLowerCaseDelegateWithConflictAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(3, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -442,7 +442,7 @@ public event Test TestEvent } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -482,7 +482,7 @@ public event Test TestEvent }"; DiagnosticResult expected = Diagnostic().WithArguments("testEvent").WithLocation(5, 23); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -526,7 +526,7 @@ public event Test TestEvent1 }"; DiagnosticResult expected = Diagnostic().WithArguments("testEvent").WithLocation(5, 23); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -538,7 +538,7 @@ public async Task TestUpperCaseEventFieldAsync() public event Test TestEvent; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -556,7 +556,7 @@ public async Task TestLowerCaseEventFieldAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("testEvent").WithLocation(4, 23); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -576,7 +576,7 @@ public async Task TestLowerCaseEventFieldWithConflictAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("testEvent").WithLocation(4, 23); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -589,7 +589,7 @@ public void Test() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -609,7 +609,7 @@ public void Test() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(3, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -634,7 +634,7 @@ public void Test1() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(3, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -645,7 +645,7 @@ public async Task TestUpperCasePropertyAsync() public string Test { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -661,7 +661,7 @@ public async Task TestLowerCasePropertyAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(3, 15); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -679,7 +679,7 @@ public async Task TestLowerCasePropertyWithConflictAsync() }"; DiagnosticResult expected = Diagnostic().WithArguments("test").WithLocation(3, 15); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -690,7 +690,7 @@ public async Task TestUpperCasePublicFieldAsync() public string Test; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -701,7 +701,7 @@ public async Task TestUpperCaseInternalFieldAsync() internal string Test; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -712,7 +712,7 @@ public async Task TestUpperCaseConstFieldAsync() const string Test = ""value""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -723,7 +723,7 @@ public async Task TestUpperCaseProtectedReadOnlyFieldAsync() protected readonly string Test; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -734,7 +734,7 @@ public async Task TestLowerCaseProtectedFieldAsync() protected string Test; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -745,7 +745,7 @@ public async Task TestLowerCaseReadOnlyFieldAsync() readonly string test; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -757,7 +757,7 @@ public async Task TestLowerCasePublicFieldAsync() }"; // Handled by SA1307 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -769,7 +769,7 @@ public async Task TestLowerCaseInternalFieldAsync() }"; // Handled by SA1307 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -781,7 +781,7 @@ public async Task TestLowerCaseConstFieldAsync() }"; // Reported as SA1303 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -792,7 +792,7 @@ public async Task TestNativeMethodsExceptionAsync() public string test { get; set; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -804,7 +804,7 @@ public async Task TestLowerCaseProtectedReadOnlyFieldAsync() }"; // Handled by SA1304 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -874,7 +874,7 @@ public abstract class BaseClass Diagnostic().WithLocation(27, 47).WithArguments("fooBar"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -949,7 +949,7 @@ public interface IInterface Diagnostic().WithLocation(29, 12).WithArguments("iInterface"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -980,7 +980,7 @@ public async Task TestUnderscoreExclusionAsync() Diagnostic().WithLocation(6, 5).WithArguments("_Tock"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -1005,7 +1005,7 @@ public class TestClass }} }}"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1302UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1302UnitTests.cs index a7647b95c..c67a4ba55 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1302UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1302UnitTests.cs @@ -30,7 +30,7 @@ public interface IFoo { }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -54,7 +54,7 @@ public class Bar : IFoo { }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -72,7 +72,7 @@ public interface IiFoo { }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -88,7 +88,7 @@ public interface Foo DiagnosticResult expected = Diagnostic().WithLocation(4, 22); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -98,7 +98,7 @@ public async Task TestInterfaceDeclarationDoesStartWithIAsync() { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -112,7 +112,7 @@ public interface IFoo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -128,7 +128,7 @@ public interface FileOpenDialog } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -156,7 +156,7 @@ public interface IFileOpenDialog } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -175,7 +175,7 @@ public interface FileOpenDialog111 } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -195,7 +195,7 @@ public interface IFoo1 public interface IFoo { }"; DiagnosticResult expected = Diagnostic().WithLocation(2, 18); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -213,7 +213,7 @@ public interface IFoo }"; DiagnosticResult expected = Diagnostic().WithLocation(2, 18); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -239,7 +239,7 @@ public interface IFoo { } }"; DiagnosticResult expected = Diagnostic().WithLocation(4, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -261,7 +261,7 @@ public interface IFoo1 }"; DiagnosticResult expected = Diagnostic().WithLocation(4, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -287,7 +287,7 @@ public interface IFoo1 }"; DiagnosticResult expected = Diagnostic().WithLocation(4, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -311,7 +311,7 @@ public interface IDisposable1 "; DiagnosticResult expected = Diagnostic().WithLocation(4, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1303UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1303UnitTests.cs index 3a2e13d94..0749b341f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1303UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1303UnitTests.cs @@ -28,7 +28,7 @@ public async Task TestConstFieldStartingWithLowerCaseAsync() }"; DiagnosticResult expected = Diagnostic().WithLocation(3, 25); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -46,7 +46,7 @@ public async Task TestConstFieldStartingWithLowerCaseWithConflictAsync() }"; DiagnosticResult expected = Diagnostic().WithLocation(3, 25); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -57,7 +57,7 @@ public async Task TestConstFieldStartingWithLowerCaseNativeMethodsExampleOneAsyn public const string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -68,7 +68,7 @@ public async Task TestConstFieldStartingWithLowerCaseNativeMethodsExampleTwoAsyn public const string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -82,7 +82,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -99,7 +99,7 @@ public class FooInner } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -115,7 +115,7 @@ public async Task TestConstFieldStartingWithLowerCaseNativeMethodsIncorrectNameA }"; DiagnosticResult expected = Diagnostic().WithLocation(3, 25); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -151,7 +151,7 @@ public class FooInner }"; DiagnosticResult expected = Diagnostic().WithLocation(10, 36); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -162,7 +162,7 @@ public async Task TestConstFieldStartingWithUpperCaseAsync() public const string Bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -174,7 +174,7 @@ public async Task TestConstFieldStartingWithUnderscoreAsync() }"; // Fields starting with an underscore are reported as SA1309 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -185,7 +185,7 @@ public async Task TestFieldWhichIsNotConstStartingWithLowerCaseAsync() public string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -203,7 +203,7 @@ public enum SpecialFile iTunesMetadata }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1304UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1304UnitTests.cs index cc67d4589..41548aacd 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1304UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1304UnitTests.cs @@ -24,7 +24,7 @@ public async Task TestPublicReadonlyFieldStartingWithLowerCaseAsync() public readonly string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -35,7 +35,7 @@ public async Task TestPublicReadonlyFieldStartingWithUpperCaseAsync() public readonly string Bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -46,7 +46,7 @@ public async Task TestProtectedReadonlyFieldStartingWithLowerCaseAsync() protected readonly string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -58,7 +58,7 @@ public async Task TestProtectedReadonlyFieldStartingWithUpperCaseAsync() protected readonly string Bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -69,7 +69,7 @@ public async Task TestFieldInNativeMethodsClassAsync() internal readonly string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -86,7 +86,7 @@ public async Task TestInternalReadonlyFieldStartingWithLowerCaseAsync() { internal readonly string Bar = ""baz""; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -105,7 +105,7 @@ public async Task TestInternalReadonlyFieldStartingWithLowerCaseWithConflictAsyn internal readonly string BarValue = ""baz""; public string Bar => this.BarValue; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -126,7 +126,7 @@ public async Task TestInternalReadonlyFieldStartingWithLowerCaseWithTwoConflicts public string Bar => this.Bar1; public string BarValue => this.Bar1; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -137,7 +137,7 @@ public async Task TestInternalReadonlyFieldStartingWithUpperCaseAsync() internal readonly string Bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -148,7 +148,7 @@ public async Task TestlWithNoAccessibilityKeywordReadonlyFieldStartingWithLowerC readonly string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -159,7 +159,7 @@ public async Task TestlPublicFieldStartingWithLowerCaseAsync() public string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -170,7 +170,7 @@ public async Task TestPrivateReadonlyFieldStartingWithLowerCaseAsync() private readonly string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1305UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1305UnitTests.cs index 373977f28..d6ee06d7f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1305UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1305UnitTests.cs @@ -44,7 +44,7 @@ public async Task TestValidFieldNamesAreNotReportedAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -59,7 +59,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -74,7 +74,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -94,7 +94,7 @@ public async Task TestInvalidFieldNamesAreReportedAsync() Diagnostic().WithLocation(3, 29).WithArguments("field", "fAre"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -117,7 +117,7 @@ public void TestMethod() Diagnostic().WithLocation(5, 33).WithArguments("variable", "fAre"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -129,7 +129,7 @@ public async Task TestEventFieldsAreNotReportedAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -142,7 +142,7 @@ public async Task TestAllowedCommonPrefixesAsync(string prefix) }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -174,7 +174,7 @@ public async Task TestAllowedCommonPrefixesWhenDisabledAsync(string prefix) Diagnostic().WithLocation(3, 12).WithArguments("field", $"{prefix}R"), }, Settings = customTestSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -201,7 +201,7 @@ public async Task TestExcludedPrefixesAreNotReportedAsync() { TestCode = testCode, Settings = customTestSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -218,7 +218,7 @@ public interface TypeName Diagnostic().WithArguments("parameter", "abX").WithLocation(4, 26), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -237,7 +237,7 @@ public void MethodName(bool abX) Diagnostic().WithArguments("parameter", "abX").WithLocation(4, 33), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -251,7 +251,7 @@ public void MethodName(bool abX) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -270,7 +270,7 @@ public void MethodName(bool abX) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -293,7 +293,7 @@ public void MethodName(bool abX) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -314,7 +314,7 @@ public override void MethodName(bool abX) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -333,7 +333,7 @@ public TypeName(string abX) Diagnostic().WithArguments("parameter", "abX").WithLocation(4, 28), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -353,7 +353,7 @@ public int this[int abX] Diagnostic().WithArguments("parameter", "abX").WithLocation(4, 25), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -373,7 +373,7 @@ public int this[int abX] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -397,7 +397,7 @@ public int this[int abX] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -420,7 +420,7 @@ public override int this[int abX] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -441,7 +441,7 @@ public void Method() Diagnostic().WithArguments("parameter", "abX").WithLocation(7, 39), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -456,7 +456,7 @@ public async Task TestParameterInGlobalDelegateDeclarationAsync() Diagnostic().WithArguments("parameter", "abX").WithLocation(2, 38), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -473,7 +473,7 @@ public class TypeName Diagnostic().WithArguments("parameter", "abX").WithLocation(4, 42), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -499,7 +499,7 @@ public void MethodName() Diagnostic().WithArguments("variable", "exA").WithLocation(10, 26), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -520,7 +520,7 @@ public void MethodName() Diagnostic().WithArguments("variable", "abX").WithLocation(5, 22), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -543,7 +543,7 @@ public void MethodName() Diagnostic().WithArguments("variable", "abX").WithLocation(8, 18), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -567,7 +567,7 @@ select x into abY Diagnostic().WithArguments("variable", "abY").WithLocation(9, 27), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -591,7 +591,7 @@ public void MethodName() Diagnostic().WithArguments("variable", "abY").WithLocation(9, 17), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -615,7 +615,7 @@ public void MethodName() Diagnostic().WithArguments("variable", "abY").WithLocation(9, 18), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -639,7 +639,7 @@ public void MethodName() Diagnostic().WithArguments("variable", "abZ").WithLocation(9, 53), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1306UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1306UnitTests.cs index 6d132d02d..2caefa86d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1306UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1306UnitTests.cs @@ -46,7 +46,7 @@ public async Task TestThatDiagnosticIsNotReportedAsync(string modifiers) string Bar = """", car = """", Dar = """"; }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, modifiers), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, modifiers), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -61,7 +61,7 @@ public class TypeName event EventHandler Car; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -74,7 +74,7 @@ public void MethodName(string bar, string Car) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -91,7 +91,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -116,7 +116,7 @@ public void MethodName(string Parameter1, string parameter2) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -190,7 +190,7 @@ public async Task TestThatDiagnosticIsReported_SingleFieldAsync(string modifiers }; test.ExpectedDiagnostics.AddRange(expected); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -221,7 +221,7 @@ public async Task TestThatDiagnosticIsReported_MultipleFieldsAsync(string modifi string bar, car, dar; }}"; - await VerifyCSharpFixAsync(string.Format(testCode, modifiers), expected, string.Format(fixedCode, modifiers), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, modifiers), expected, string.Format(fixedCode, modifiers), CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -232,7 +232,7 @@ public async Task TestFieldStartingWithLetterAsync() public string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -245,7 +245,7 @@ public async Task TestFieldWithAllUnderscoresAsync() private string ___ = ""qux""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -256,7 +256,7 @@ public async Task TestFieldWithTrailingUnderscoreAsync() private string someVar_ = ""bar""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -275,7 +275,7 @@ public async Task TestFieldWithCodefixRenameConflictAsync() }"; var expected = Diagnostic().WithArguments("_Test").WithLocation(4, 20); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -286,7 +286,7 @@ public async Task TestFieldPlacedInsideNativeMethodsClassAsync() string Bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1307UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1307UnitTests.cs index 6a9b42bfb..4b3d3b980 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1307UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1307UnitTests.cs @@ -35,7 +35,7 @@ public async Task TestThatDiagnosticIsNotReportedAsync(string modifiers) string Bar = """", car = """", Dar = """"; }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, modifiers), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, modifiers), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -73,7 +73,7 @@ public async Task TestThatDiagnosticIsReported_SingleFieldAsync(string modifiers string Dar; }}"; - await VerifyCSharpFixAsync(string.Format(testCode, modifiers), expected, string.Format(fixedCode, modifiers), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, modifiers), expected, string.Format(fixedCode, modifiers), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -100,7 +100,7 @@ public async Task TestThatDiagnosticIsReported_MultipleFieldsAsync(string modifi string Bar, Car, Dar; }}"; - await VerifyCSharpFixAsync(string.Format(testCode, modifiers), expected, string.Format(fixedCode, modifiers), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, modifiers), expected, string.Format(fixedCode, modifiers), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -148,7 +148,7 @@ public async Task TestThatDiagnosticIsReported_MultipleFieldsWithConflictAsync(s }; test.ExpectedDiagnostics.AddRange(expected); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -165,7 +165,7 @@ public async Task TestFieldStartingWithVerbatimIdentifierAsync() }"; var expected = Diagnostic().WithArguments("bar").WithLocation(3, 19); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -177,7 +177,7 @@ public async Task TestFieldStartingWithAnUnderscoreAsync() public string _bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -188,7 +188,7 @@ public async Task TestFieldPlacedInsideNativeMethodsClassAsync() public string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1308UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1308UnitTests.cs index ad4a6106e..2163b0028 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1308UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1308UnitTests.cs @@ -41,12 +41,12 @@ public async Task TestFieldStartingWithPrefixesToTriggerDiagnosticAsync() { foreach (var modifier in this.modifiers) { - await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, "m_", "m_").ConfigureAwait(false); - await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, "s_", "s_").ConfigureAwait(false); - await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, "t_", "t_").ConfigureAwait(false); - await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, $"m{UnderscoreEscapeSequence}", "m_").ConfigureAwait(false); - await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, $"s{UnderscoreEscapeSequence}", "s_").ConfigureAwait(false); - await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, $"t{UnderscoreEscapeSequence}", "t_").ConfigureAwait(false); + await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, "m_", "m_").ConfigureAwait(true); + await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, "s_", "s_").ConfigureAwait(true); + await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, "t_", "t_").ConfigureAwait(true); + await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, $"m{UnderscoreEscapeSequence}", "m_").ConfigureAwait(true); + await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, $"s{UnderscoreEscapeSequence}", "s_").ConfigureAwait(true); + await this.TestFieldSpecifyingModifierAndPrefixAsync(modifier, $"t{UnderscoreEscapeSequence}", "t_").ConfigureAwait(true); } } @@ -60,7 +60,7 @@ public async Task TestMUnderscoreOnlyAsync() DiagnosticResult expected = Diagnostic().WithArguments("m_", "m_").WithLocation(3, 16); // When the variable name is simply the disallowed prefix, we will not offer a code fix, as we cannot infer the correct variable name. - await VerifyCSharpFixAsync(originalCode, expected, originalCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(originalCode, expected, originalCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -72,7 +72,7 @@ public async Task TestFieldStartingWithNonTriggeringPrefixAsync() string x_bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -84,7 +84,7 @@ public async Task TestFieldInsideNativeMethodsClassAsync() string m_bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -110,7 +110,7 @@ public async Task TestFixingMultipleIdenticalPrefixesAsync(string prefix) .WithLocation(3, 20); var fixedCode = testCode.Replace(prefix, string.Empty); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -129,7 +129,7 @@ public async Task TestMultipleIdenticalPrefixesOnlyAsync(string prefix) .WithLocation(3, 20); // A code fix is not offered as removing the prefixes would create an empty identifier. - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -156,7 +156,7 @@ public async Task TestFixingMultipleDistinctPrefixesAsync(string prefixes, strin .WithLocation(3, 20); var fixedCode = testCode.Replace(prefixes, string.Empty); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -175,7 +175,7 @@ public async Task TestMultipleDistinctPrefixesOnlyAsync(string prefixes, string .WithLocation(3, 20); // A code fix is not offered as removing the prefixes would create an empty identifier. - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } private static string UnescapeUnderscores(string identifier) => identifier.Replace(UnderscoreEscapeSequence, "_"); diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1309UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1309UnitTests.cs index f1f08b496..d06cf6ff5 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1309UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1309UnitTests.cs @@ -30,7 +30,7 @@ public async Task TestFieldStartingWithAnUnderscoreAsync() public string bar = ""baz""; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -41,7 +41,7 @@ public async Task TestFieldStartingWithLetterAsync() public string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -52,7 +52,7 @@ public async Task TestFieldStartingAnUnderscorePlacedInsideNativeMethodsClassAsy internal string _bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -70,7 +70,7 @@ public async Task TestFieldStartingAnUnderscorePlacedInsideNativeMethodsClassWit internal string bar = ""baz""; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -84,7 +84,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -99,7 +99,7 @@ public async Task TestUnderscoreOnlyVariableNameAsync() // no changes will be made var fixedCode = testCode; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -123,7 +123,7 @@ public async Task TestFieldStartingWithMultipleUnderscoresAsync() public string bar = ""baz""; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } // This a regression test for issue #2360. @@ -139,7 +139,7 @@ public async Task VerifyThatAFieldStartingWithAnUnderscoreAndADigitIsNotAffected // no changes will be made var fixedCode = testCode; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -156,7 +156,7 @@ public async Task VerifyThatAFieldStartingWithUnderscoreAndFollowedByKeywordTrig }"; DiagnosticResult expected = Diagnostic().WithArguments("_int").WithLocation(3, 20); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1310UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1310UnitTests.cs index 7fe910ec4..6913e7ade 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1310UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1310UnitTests.cs @@ -30,7 +30,7 @@ public async Task TestFieldWithUnderscoreAsync() public string nameBar = ""baz""; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -41,7 +41,7 @@ public async Task TestFieldStartingWithoutUnderscoreAsync() public string nameBar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -55,7 +55,7 @@ public async Task TestFieldStartingWithSpecialPrefixAsync(string prefix) public string {prefix}nameBar = ""baz""; }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -66,7 +66,7 @@ public async Task TestFieldWithUnderscorePlacedInsideNativeMethodsClassAsync() internal string name_bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -84,7 +84,7 @@ public async Task TestFieldWithUnderscorePlacedInsideNativeMethodsClassWithIncor internal string nameBar = ""baz""; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -98,7 +98,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -109,7 +109,7 @@ public async Task TestUnderscoreOnlyVariableNameAsync() internal string _ = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1311UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1311UnitTests.cs index fe0e1116b..3a8090a68 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1311UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1311UnitTests.cs @@ -30,7 +30,7 @@ public async Task TestStaticReadonlyFieldStartingWithLowerCaseAsync() public static readonly string Bar = ""baz""; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -50,7 +50,7 @@ public async Task TestStaticReadonlyFieldStartingWithLowerCaseWithConflictAsync( public int Bar => 0; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -68,7 +68,7 @@ public async Task TestStaticReadonlyFieldStartingWithLoweCaseFieldIsJustOneLette internal static readonly string B = ""baz""; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -96,7 +96,7 @@ static Foo() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -107,7 +107,7 @@ public async Task TestStaticReadonlyFieldStartingWithUpperCaseAsync() public static readonly string Bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -118,7 +118,7 @@ public async Task TestReadonlyFieldStartingWithLoweCaseAsync() public readonly string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -129,7 +129,7 @@ public async Task TestStaticFieldStartingWithLoweCaseAsync() public static string bar = ""baz""; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -157,7 +157,7 @@ static Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -189,7 +189,7 @@ static Foo() public static readonly string Bar; }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1312UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1312UnitTests.cs index c1e0b7327..fc3e95aae 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1312UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1312UnitTests.cs @@ -28,7 +28,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -42,7 +42,7 @@ public async Task TestThatDiagnosticIsNotReportedForFieldsAsync() string Car = nameof(Car); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -57,7 +57,7 @@ public class TypeName event EventHandler Car; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -70,7 +70,7 @@ public void MethodName(string bar, string Car) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -102,7 +102,7 @@ public void MethodName() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -130,7 +130,7 @@ public void MethodName() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -154,7 +154,7 @@ public void MethodName() }"; DiagnosticResult expected = Diagnostic().WithArguments("_bar").WithLocation(5, 16); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -168,7 +168,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -208,7 +208,7 @@ public void MethodName() Diagnostic().WithArguments("Ex").WithLocation(10, 26), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -238,7 +238,7 @@ public void MethodName() Diagnostic().WithArguments("X").WithLocation(5, 22), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -272,7 +272,7 @@ public void MethodName() Diagnostic().WithArguments("X").WithLocation(8, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -308,7 +308,7 @@ select x into y Diagnostic().WithArguments("Y").WithLocation(9, 27), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -344,7 +344,7 @@ public void MethodName() Diagnostic().WithArguments("Y").WithLocation(9, 17), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -380,7 +380,7 @@ public void MethodName() Diagnostic().WithArguments("Y").WithLocation(9, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -416,7 +416,7 @@ public void MethodName() Diagnostic().WithArguments("Z").WithLocation(9, 53), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -430,7 +430,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -456,7 +456,7 @@ public void MethodName() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -480,7 +480,7 @@ public void MethodName() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -504,7 +504,7 @@ public void MethodName(int parameter) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -525,7 +525,7 @@ public void MethodName(int parameter) Diagnostic().WithArguments("__").WithLocation(6, 16), }; - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1313UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1313UnitTests.cs index db1ec7451..8ab0811d5 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1313UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1313UnitTests.cs @@ -26,7 +26,7 @@ public async Task TestThatDiagnosticIsNotReportedForFieldsAsync() string Car = nameof(Car); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -41,7 +41,7 @@ public class TypeName event EventHandler Car; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -58,7 +58,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -80,7 +80,7 @@ public void MethodName(string bar) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -106,7 +106,7 @@ public void MethodName(string bar, string car, string par) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -119,7 +119,7 @@ public void MethodName(string bar) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -132,7 +132,7 @@ public void MethodName(string Bar) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -156,7 +156,7 @@ public void MethodName(string parameter1) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -178,7 +178,7 @@ public void MethodName(string @int) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -200,7 +200,7 @@ public void MethodName(string parameter1, int parameter) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -222,7 +222,7 @@ public void MethodName(string parameter, int parameter1) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -246,7 +246,7 @@ public void Method(int Param1, int param2, int param3) Diagnostic().WithLocation(4, 45).WithArguments("Param3"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -272,7 +272,7 @@ public void Method(int Param1, int param2, int Other) Diagnostic().WithLocation(9, 52).WithArguments("Other"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -297,7 +297,7 @@ void ITest.Method(int param1, int Param2) Diagnostic().WithLocation(0).WithArguments("Param2"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -323,7 +323,7 @@ public void Method(int param1, int {|#1:Other|}) Diagnostic().WithLocation(1).WithArguments("Other"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -348,7 +348,7 @@ public override void Method(int Param1, int param2, int param3) Diagnostic().WithLocation(4, 61).WithArguments("Param3"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -374,7 +374,7 @@ public override void Method(int Param1, int param2, int Other) Diagnostic().WithLocation(9, 61).WithArguments("Other"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -391,7 +391,7 @@ public void MethodName() DiagnosticResult expected = Diagnostic().WithArguments("Ignored").WithLocation(5, 37); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -408,7 +408,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -429,7 +429,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -446,7 +446,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -467,7 +467,7 @@ public void MethodName() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -490,7 +490,7 @@ public void MethodName() Diagnostic().WithArguments("___").WithLocation(6, 39), Diagnostic().WithArguments("___").WithLocation(7, 51), }; - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -505,7 +505,7 @@ public void MethodName(int _) }"; DiagnosticResult expected = Diagnostic().WithArguments("_").WithLocation(3, 32); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -520,7 +520,7 @@ public void MethodName(int __) }"; DiagnosticResult expected = Diagnostic().WithArguments("__").WithLocation(3, 32); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -547,7 +547,7 @@ public interface IDerivedTest : ITest, IEmptyInterface Diagnostic().WithLocation(12, 21).WithArguments("Param1"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -583,7 +583,7 @@ public TestClass(string text, bool flag) "; var expected = Diagnostic().WithLocation(4, 29).WithArguments("_text"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -612,7 +612,7 @@ public override void TestMethod(int p1, X int P2) "; DiagnosticResult[] expected = this.GetInvalidMethodOverrideShouldNotProduceDiagnosticAsyncDiagnostics(); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } protected virtual DiagnosticResult[] GetInvalidMethodOverrideShouldNotProduceDiagnosticAsyncDiagnostics() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1314UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1314UnitTests.cs index 348a7a26e..71039d35e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1314UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1314UnitTests.cs @@ -28,7 +28,7 @@ public interface IFoo { }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -56,7 +56,7 @@ void Test() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -74,7 +74,7 @@ public interface IFoo { }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -98,7 +98,7 @@ public class Foo } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -108,7 +108,7 @@ public async Task TestTypeParameterDoesStartWithTAsync() { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -122,7 +122,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -141,7 +141,7 @@ public class Foo }"; DiagnosticResult expected = Diagnostic().WithLocation(2, 18); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -163,7 +163,7 @@ public class Foo }"; DiagnosticResult expected = Diagnostic().WithLocation(4, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -187,7 +187,7 @@ public class Foo }"; DiagnosticResult expected = Diagnostic().WithLocation(4, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -211,7 +211,7 @@ public class Bar }"; DiagnosticResult expected = Diagnostic().WithLocation(6, 18); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -235,7 +235,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SX1309SUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SX1309SUnitTests.cs index f7c3be9cc..6a67bfc40 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SX1309SUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SX1309SUnitTests.cs @@ -76,7 +76,7 @@ public async Task TestCheckedFieldNotStartingWithAnUnderscoreAsync(string modifi {modifiers} string _bar = ""bar""; }}"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -88,7 +88,7 @@ public async Task TestUncheckedFieldNotStartingWithAnUnderscoreAsync(string modi {modifiers} string bar = ""bar""; }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -101,7 +101,7 @@ public async Task TestFieldNotStartingWithAnUnderscorePlacedInsideNativeMethodsC {modifiers} string bar = ""bar""; }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -120,7 +120,7 @@ public async Task TestCheckedFieldNotStartingWithAnUnderscorePlacedInsideNativeM {modifiers} string _bar = ""bar""; }}"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -132,7 +132,7 @@ public async Task TestUncheckedFieldNotStartingWithAnUnderscorePlacedInsideNativ {modifiers} string bar = ""bar""; }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -148,7 +148,7 @@ public class ClassName }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SX1309UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SX1309UnitTests.cs index 0f202e5f7..cc850f2ae 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SX1309UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SX1309UnitTests.cs @@ -76,7 +76,7 @@ public async Task TestCheckedFieldNotStartingWithAnUnderscoreAsync(string modifi {modifiers} string _bar = ""bar""; }}"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -88,7 +88,7 @@ public async Task TestUncheckedFieldNotStartingWithAnUnderscoreAsync(string modi {modifiers} string bar = ""bar""; }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -101,7 +101,7 @@ public async Task TestFieldNotStartingWithAnUnderscorePlacedInsideNativeMethodsC {modifiers} string bar = ""bar""; }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -120,7 +120,7 @@ public async Task TestCheckedFieldNotStartingWithAnUnderscorePlacedInsideNativeM {modifiers} string _bar = ""bar""; }}"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -132,7 +132,7 @@ public async Task TestUncheckedFieldNotStartingWithAnUnderscorePlacedInsideNativ {modifiers} string bar = ""bar""; }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -148,7 +148,7 @@ public class ClassName }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200OutsideNamespaceUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200OutsideNamespaceUnitTests.cs index 64683f691..b0834823f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200OutsideNamespaceUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200OutsideNamespaceUnitTests.cs @@ -79,7 +79,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorOutside).WithLocation(4, 5), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -112,7 +112,7 @@ namespace System Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorOutside).WithLocation(5, 5), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -148,7 +148,7 @@ namespace System.MyExtension Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorOutside).WithLocation(6, 5), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -169,7 +169,7 @@ public async Task TestValidUsingStatementsInCompilationUnitWithTypeDefinitionAsy {typeDefinition} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -206,7 +206,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorOutside).WithLocation(8, 5), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -224,7 +224,7 @@ namespace TestNamespace } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -258,7 +258,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorOutside).WithLocation(6, 5), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -296,7 +296,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorOutside).WithLocation(10, 5), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -346,7 +346,7 @@ private void Test() Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorOutside).WithLocation(5, 5), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } protected static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200PreserveUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200PreserveUnitTests.cs index 4370b0e4a..dfed6950a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200PreserveUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200PreserveUnitTests.cs @@ -62,7 +62,7 @@ public async Task TestValidUsingStatementsInNamespaceAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -83,7 +83,7 @@ public async Task TestValidUsingStatementsInCompilationUnitWithTypeDefinitionAsy {typeDefinition} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -104,7 +104,7 @@ namespace TestNamespace } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -123,7 +123,7 @@ namespace TestNamespace } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } protected static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200UnitTests.cs index cd897693a..8c2ba191f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1200UnitTests.cs @@ -52,7 +52,7 @@ public async Task TestValidUsingStatementsInNamespaceAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -73,7 +73,7 @@ public async Task TestValidUsingStatementsInCompilationUnitWithTypeDefinitionAsy {typeDefinition} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -94,7 +94,7 @@ namespace TestNamespace } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -125,7 +125,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(2, 1), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -154,7 +154,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(3, 1), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -185,7 +185,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(4, 1), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -215,7 +215,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(3, 1), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -247,7 +247,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(4, 1), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -283,7 +283,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(6, 1), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -315,7 +315,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(4, 1), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -349,7 +349,7 @@ namespace TestNamespace Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(5, 1), }; - await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1201UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1201UnitTests.cs index 2b8aa1668..bfefe8a03 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1201UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1201UnitTests.cs @@ -42,8 +42,8 @@ public struct FooStruct { } public class FooClass { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -63,8 +63,8 @@ public struct FooStruct { } Diagnostic().WithLocation(7, 15).WithArguments("struct", "class"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync("namespace OuterNamespace { " + testCode + " }", expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -93,7 +93,7 @@ public async Task TestClassBeforeStructAsync( Diagnostic().WithLocation(0).WithArguments(structKeyword, reportedClassKind), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -118,7 +118,7 @@ public class TestClass { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -142,7 +142,7 @@ public class TestClass { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -157,7 +157,7 @@ public async Task TestTypeMemberOrderCorrectOrderInterfaceAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -219,7 +219,7 @@ public class TestClass { } }; test.ExpectedDiagnostics.AddRange(expected); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -278,7 +278,7 @@ public class TestClass { } }; test.ExpectedDiagnostics.AddRange(expected); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -308,7 +308,7 @@ public async Task TestTypeMemberOrderWrongOrderInterfaceAsync() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -333,7 +333,7 @@ public string DiagnosticResult.CompilerError("CS1519").WithLocation(6, 1).WithArguments("}"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -348,7 +348,7 @@ public event System.Action TestEvent2 { add { } remove { } } public event System.Action TestEvent4 { add { } remove { } } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1202UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1202UnitTests.cs index 9924cf04d..bbac64565 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1202UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1202UnitTests.cs @@ -98,7 +98,7 @@ private class TestClass10 { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -120,7 +120,7 @@ public async Task TestTypeOrderingAsync(string keyword) internal {keyword} TestClass1 {{ }} "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -136,7 +136,7 @@ public async Task TestInternalInterfaceBeforePublicClassAsync(string keyword) public {keyword} TestClass2 {{ }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -176,7 +176,7 @@ public async Task TestPropertiesOfClassAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -210,7 +210,7 @@ public async Task TestPropertiesOfStructAsync(string keyword) }} "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -248,7 +248,7 @@ private void TestMethod1() { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -274,7 +274,7 @@ public async Task TestProtectedInternalBeforePublicAsync() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -299,7 +299,7 @@ public async Task TestProtectedBeforePublicAsync() protected string TestField1; } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -325,7 +325,7 @@ private event System.Action TestEvent1 { add { } remove { } } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -351,7 +351,7 @@ protected event System.Action TestEvent1 { add { } remove { } } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -377,7 +377,7 @@ public async Task TestPrivateBeforeInternalAsync() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -403,7 +403,7 @@ private void TestMethod1() { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -429,7 +429,7 @@ private void TestMethod1() { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -457,7 +457,7 @@ public async Task TestMembersWithoutAccessModifiersAsync() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -477,7 +477,7 @@ public class TestClass2 { } class TestClass1 { } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -512,7 +512,7 @@ public async Task TestOnlyFirstViolationReportedAsync() FixedCode = fixedCode, NumberOfIncrementalIterations = 2, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -548,7 +548,7 @@ private static void A() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -586,7 +586,7 @@ private static void TestMethod1() { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -618,7 +618,7 @@ public async Task TestConstOrderingAsync() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -646,7 +646,7 @@ private class TestClass2 { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -680,7 +680,7 @@ class TestClass1 { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -694,7 +694,7 @@ internal class Class4 { } class Class5 { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -710,7 +710,7 @@ class Class5 { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -733,7 +733,7 @@ public MyClass() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -771,7 +771,7 @@ private MyClass() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -885,7 +885,7 @@ protected void TestMethod2() { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -929,7 +929,7 @@ private static void ExampleMethod() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -957,7 +957,7 @@ public string DiagnosticResult.CompilerError("CS1519").WithLocation(6, 1).WithArguments("}"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -985,7 +985,7 @@ public string DiagnosticResult.CompilerError("CS1519").WithLocation(6, 1).WithArguments("}"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1203UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1203UnitTests.cs index 367a1c9e7..f0218be7c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1203UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1203UnitTests.cs @@ -88,7 +88,7 @@ private class TestClass10 { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -108,7 +108,7 @@ public class Foo private const int Bar = 2; private int Baz = 1; }"; - await VerifyCSharpFixAsync(testCode, firstDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, firstDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -128,7 +128,7 @@ public struct Foo private const int Bar = 2; private int baz; }"; - await VerifyCSharpFixAsync(testCode, firstDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, firstDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -150,7 +150,7 @@ public class Foo private const int FooBar = 2; private int Baz = 1; }"; - await VerifyCSharpFixAsync(testCode, firstDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, firstDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -166,7 +166,7 @@ public class Test var expected = Diagnostic().WithLocation(5, 15); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); var testCodeAfterFix1 = @" public class Test @@ -185,7 +185,7 @@ public class Test private int Test1 = 1; }"; - await VerifyCSharpFixAsync(testCodeAfterFix1, expected, fixCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCodeAfterFix1, expected, fixCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -234,7 +234,7 @@ public class Foo Diagnostic().WithLocation(10, 25), Diagnostic().WithLocation(14, 25), }; - await VerifyCSharpFixAsync(testCode, diagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, diagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -281,7 +281,7 @@ public async Task TestCodeFixAsync() Diagnostic().WithLocation(9, 26), Diagnostic().WithLocation(13, 25), }; - await VerifyCSharpFixAsync(testCode, diagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, diagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -330,7 +330,7 @@ public async Task TestCodeFixWithCommentsAsync() Diagnostic().WithLocation(10, 26), Diagnostic().WithLocation(14, 25), }; - await VerifyCSharpFixAsync(testCode, diagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, diagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -364,7 +364,7 @@ public async Task TestOnlyLeadingWhitespaceIsMovedAsync() string bar; } "; - await VerifyCSharpFixAsync(testCode, diagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, diagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -430,7 +430,7 @@ public async Task TestCodeFixWithoutOrderByAccessAsync() } } ", - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1204UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1204UnitTests.cs index ec75df4cb..ac8f2bf12 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1204UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1204UnitTests.cs @@ -101,7 +101,7 @@ private class TestClass10 { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -124,7 +124,7 @@ public static class TestClass2 { } public class TestClass1 { } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -165,7 +165,7 @@ public void TestMethod1() { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -206,7 +206,7 @@ public void TestMethod1() { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -230,7 +230,7 @@ public static event System.Action TestEvent4 { add { } remove { } } Diagnostic().WithLocation(5, 5), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -247,7 +247,7 @@ public async Task TestConstNotReportedBeforeInstanceMembersAsync() "; // should be reported by SA1203 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -275,7 +275,7 @@ internal class TestClass2 { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -303,7 +303,7 @@ internal static class TestClass4 { } internal class TestClass3 { } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -331,7 +331,7 @@ public async Task TestMembersWithoutAccessModifiersAsync() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -353,7 +353,7 @@ static class TestClass2 { } class TestClass1 { } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -377,7 +377,7 @@ public static class TestClass2 { } public class TestClass1 { } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -415,7 +415,7 @@ public static class TestClass2 { } public class TestClass1 { } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -441,7 +441,7 @@ class TestClass1 { } } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -501,7 +501,7 @@ public MyClass2() } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -525,7 +525,7 @@ private static void ExampleMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -553,7 +553,7 @@ public static string DiagnosticResult.CompilerError("CS1519").WithLocation(6, 1).WithArguments("}"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1205UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1205UnitTests.cs index cbacc2bcc..9cb32ca5e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1205UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1205UnitTests.cs @@ -166,7 +166,7 @@ public static IEnumerable ValidNestedDeclarations public async Task TestValidDeclarationAsync(string declaration) { var testCode = TestCodeTemplate.Replace("$$", declaration); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -181,7 +181,7 @@ public async Task TestInvalidDeclarationAsync(string declaration) var testCode = TestCodeTemplate.Replace("$$", declaration); var fixedTestCode = FixedTestCodeTemplate.Replace("##", "internal").Replace("$$", declaration); - await VerifyCSharpFixAsync(testCode, Diagnostic().WithLocation(1, 2 + declaration.Length), fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, Diagnostic().WithLocation(1, 2 + declaration.Length), fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -213,7 +213,7 @@ public partial class Foo } "; - await VerifyCSharpFixAsync(testCode, Diagnostic().WithLocation(6, 15), fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, Diagnostic().WithLocation(6, 15), fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -251,7 +251,7 @@ public partial class Foo } "; - await VerifyCSharpFixAsync(testCode, Diagnostic().WithLocation(9, 15), fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, Diagnostic().WithLocation(9, 15), fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -281,7 +281,7 @@ internal static partial class TestPartial _ => (LanguageVersion?)null, }; - await VerifyCSharpDiagnosticAsync(languageVersion, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(languageVersion, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -311,7 +311,7 @@ public class Foo }} "; - await VerifyCSharpFixAsync(testCode, Diagnostic().WithLocation(4, 6 + declaration.Length), fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, Diagnostic().WithLocation(4, 6 + declaration.Length), fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -357,7 +357,7 @@ public class Foo _ => (LanguageVersion?)null, }; - await VerifyCSharpFixAsync(languageVersion, testCode, Diagnostic().WithLocation(8, 14 + typeKeyword.Length), fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(languageVersion, testCode, Diagnostic().WithLocation(8, 14 + typeKeyword.Length), fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1206CodeFixProviderUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1206CodeFixProviderUnitTests.cs index e553e9d5c..a6902f9a9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1206CodeFixProviderUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1206CodeFixProviderUnitTests.cs @@ -30,7 +30,7 @@ public async Task VerifyKeywordReorderingInClassDeclarationAsync() var fixedTestCode = @"public abstract class FooBar {}"; var expected = Diagnostic().WithLocation(1, 10).WithArguments("public", "abstract"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -44,7 +44,7 @@ public async Task VerifyKeywordReorderingInStructDeclarationAsync() var fixedTestCode = @"public unsafe struct FooBar {}"; var expected = Diagnostic().WithLocation(1, 8).WithArguments("public", "unsafe"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -87,7 +87,7 @@ public class ExtendedTestClass : TestClass }"; var expected = Diagnostic().WithLocation(10, 9).WithArguments("protected", "new"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -101,7 +101,7 @@ public async Task VerifyKeywordReorderingInPropertyDeclarationAsync() var fixedTestCode = @"namespace N1 { public class C1 { public static int P { get; } } }"; var expected = Diagnostic().WithLocation(1, 41).WithArguments("public", "static"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -119,7 +119,7 @@ public async Task VerifyKeywordReorderingInMethodDeclarationAsync() Diagnostic().WithLocation(1, 38).WithArguments("static", "new"), Diagnostic().WithLocation(1, 45).WithArguments("public", "new"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -133,7 +133,7 @@ public async Task VerifyKeywordReorderingInFieldDeclarationAsync() var fixedTestCode = @"namespace N1 { public class C1 { public static int p; } }"; var expected = Diagnostic().WithLocation(1, 41).WithArguments("public", "static"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -151,7 +151,7 @@ public async Task VerifyKeywordReorderingInOperatorDeclarationAsync() Diagnostic().WithLocation(1, 41).WithArguments("public", "extern"), Diagnostic().WithLocation(1, 48).WithArguments("static", "extern"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -165,7 +165,7 @@ public async Task VerifyKeywordReorderingInIndexerDeclarationAsync() var fixedTestCode = @"namespace N1 { public class C1 { public extern int this[int index] { get; set; } } }"; var expected = Diagnostic().WithLocation(1, 41).WithArguments("public", "extern"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -179,7 +179,7 @@ public async Task VerifyKeywordReorderingInEventFieldDeclarationAsync() var fixedTestCode = @"namespace N1 { public class C1 { public virtual event System.EventHandler Changed; } }"; var expected = Diagnostic().WithLocation(1, 42).WithArguments("public", "virtual"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -193,7 +193,7 @@ public async Task VerifyKeywordReorderingInConversionDeclarationAsync() var fixedTestCode = @"namespace N1 { public class C1 { public static extern explicit operator C1(int n); } }"; var expected = Diagnostic().WithLocation(1, 48).WithArguments("static", "extern"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -224,7 +224,7 @@ public class ExtendedTestClass : TestClass }"; var expected = Diagnostic().WithLocation(8, 9).WithArguments("protected", "new"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -300,7 +300,7 @@ public class ExtendedTestClass : TestClass Diagnostic().WithLocation(26, 9).WithArguments("protected", "new"), }, FixedCode = fixedTestCode, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -329,7 +329,7 @@ public class TestClass "; var expected = Diagnostic().WithLocation(5, 29).WithArguments("public", "extern"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1206UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1206UnitTests.cs index 4366f16ed..1964471da 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1206UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1206UnitTests.cs @@ -28,7 +28,7 @@ public async Task TestKeywordsInClassDeclarationAsync() "; var expected = Diagnostic().WithLocation(1, 10).WithArguments("public", "abstract"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -44,7 +44,7 @@ public async Task TestKeywordsWithExpressionBodiedMemberAndAsyncKeywordAsync() Diagnostic().WithLocation(3, 18).WithArguments("public", "async"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -84,7 +84,7 @@ static public void ThirdMethod() {} Diagnostic().WithLocation(14, 23).WithArguments("static", "volatile"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -108,7 +108,7 @@ public class ExtendedTestClass : TestClass }"; var expected = Diagnostic().WithLocation(10, 9).WithArguments("protected", "new"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -125,7 +125,7 @@ public class ExtendedTestClass : TestClass }"; var expected = Diagnostic().WithLocation(8, 9).WithArguments("protected", "new"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -142,7 +142,7 @@ public class ExtendedClass : TestClass }"; var expected = Diagnostic().WithLocation(8, 9).WithArguments("public", "new"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -163,7 +163,7 @@ public async Task TestKeywordsWithOperatorDeclarationsAsync() Diagnostic().WithLocation(5, 19).WithArguments("static", "extern"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -179,7 +179,7 @@ public async Task TestWithUnsafeKeywordAndFixedAsync() Diagnostic().WithLocation(3, 12).WithArguments("public", "unsafe"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -196,7 +196,7 @@ public async Task TestWithIncompleteMembersAsync() DiagnosticResult.CompilerError("CS1519").WithSpan(4, 1, 4, 2).WithArguments("}"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -207,7 +207,7 @@ public async Task TestWithPartialKeywordAsync() static partial void PartialTest(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1207UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1207UnitTests.cs index c8d2fc32f..12acbd926 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1207UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1207UnitTests.cs @@ -113,7 +113,7 @@ private static IEnumerable DeclarationsWithoutAccessModifier public async Task TestValidDeclarationAsync(string declaration) { var testCode = TestCodeTemplate.Replace("$$", declaration); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -132,7 +132,7 @@ public async Task TestInvalidDeclarationAsync(string invalidDeclaration, int dia var fixedTestCode = TestCodeTemplate.Replace("$$", fixedDeclaration); DiagnosticResult expected = Diagnostic().WithArguments("protected", "internal").WithLocation(4, 4 + diagnosticColumn); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1208UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1208UnitTests.cs index 90c173c5c..eddd1079c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1208UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1208UnitTests.cs @@ -25,7 +25,7 @@ class A { }"; - await VerifyCSharpDiagnosticAsync(usingsInCompilationUnit, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(usingsInCompilationUnit, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -41,7 +41,7 @@ class A } }"; - await VerifyCSharpDiagnosticAsync(usingsInNamespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(usingsInNamespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -55,7 +55,7 @@ public async Task TestSystemUsingDirectivesWithEscapeSequenceAsync() using System.Threading; }"; - await VerifyCSharpDiagnosticAsync(usingsInNamespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(usingsInNamespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -83,7 +83,7 @@ class A Diagnostic().WithLocation("/0/Test2.cs", 3, 1).WithArguments("System.IO", "Xyz"), Diagnostic().WithLocation("/0/Test2.cs", 5, 1).WithArguments("System.Threading.Tasks", "Xyz"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -112,7 +112,7 @@ class A Diagnostic().WithLocation("/0/Test2.cs", 4, 5).WithArguments("System.Threading", "Namespace"), Diagnostic().WithLocation("/0/Test2.cs", 5, 5).WithArguments("System.IO", "Namespace"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -146,7 +146,7 @@ class A Diagnostic().WithLocation("/0/Test3.cs", 8, 5).WithArguments("System.Threading", "Xyz"), Diagnostic().WithLocation("/0/Test3.cs", 9, 5).WithArguments("System", "Xyz"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -178,7 +178,7 @@ class A { Diagnostic().WithLocation("/0/Test3.cs", 8, 5).WithArguments("System.Threading", "Xyz"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -205,7 +205,7 @@ class A } }"; - await VerifyCSharpDiagnosticAsync(compilationUnitWithoutDiagnostic, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(compilationUnitWithoutDiagnostic, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); await new CSharpTest { @@ -219,7 +219,7 @@ class A { Diagnostic().WithLocation("/0/Test2.cs", 6, 5).WithArguments("System.IO", "System.IO.Path"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -242,8 +242,8 @@ class A DiagnosticResult expected = Diagnostic().WithLocation(2, 1).WithArguments("System", "System.IO.Path"); - await VerifyCSharpDiagnosticAsync(namespaceDeclarationWithoutDiagnostic, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(source, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(namespaceDeclarationWithoutDiagnostic, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(source, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -274,7 +274,7 @@ class A { Diagnostic().WithLocation("/0/Test2.cs", 5, 5).WithArguments("System.Threading", "Namespace"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -303,7 +303,7 @@ class A Diagnostic().WithLocation("/0/Test2.cs", 4, 5).WithArguments("System.Threading", "Namespace"), Diagnostic().WithLocation("/0/Test2.cs", 5, 5).WithArguments("System.IO", "Namespace"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -352,7 +352,7 @@ public async Task TestPreprocessorDirectivesAsync() Diagnostic().WithLocation(9, 1).WithArguments("System.Collections", "Microsoft.CodeAnalysis.CSharp"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -377,7 +377,7 @@ namespace Foo using Microsoft; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1209UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1209UnitTests.cs index 83243cc8e..cf8b556e0 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1209UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1209UnitTests.cs @@ -25,7 +25,7 @@ class A { }"; - await VerifyCSharpDiagnosticAsync(usingsInCompilationUnit, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(usingsInCompilationUnit, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -41,7 +41,7 @@ class A } }"; - await VerifyCSharpDiagnosticAsync(usingsInNamespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(usingsInNamespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -68,7 +68,7 @@ class A DiagnosticResult expectedForCompilationUnit = Diagnostic().WithLocation(1, 1); - await VerifyCSharpFixAsync(testCodeCompilationUnit, expectedForCompilationUnit, fixedTestCodeCompilationUnit, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCodeCompilationUnit, expectedForCompilationUnit, fixedTestCodeCompilationUnit, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -101,7 +101,7 @@ class A DiagnosticResult expectedForNamespaceDeclaration = Diagnostic().WithLocation(5, 5); - await VerifyCSharpFixAsync(testCodeNamespace, expectedForNamespaceDeclaration, fixedTestCodeNamespace, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCodeNamespace, expectedForNamespaceDeclaration, fixedTestCodeNamespace, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -139,7 +139,7 @@ class A DiagnosticResult expected = Diagnostic().WithLocation("/0/Test0.cs", 2, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -159,7 +159,7 @@ class A } }"; - await VerifyCSharpDiagnosticAsync(compilationUnit, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(compilationUnit, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -191,7 +191,7 @@ class A DiagnosticResult expected = Diagnostic().WithLocation("/0/Test0.cs", 4, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -225,7 +225,7 @@ class A DiagnosticResult expected = Diagnostic().WithLocation("/0/Test0.cs", 4, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -260,7 +260,7 @@ public async Task TestPreprocessorDirectivesAsync() // else block is skipped var expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1210CombinedSystemDirectivesUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1210CombinedSystemDirectivesUnitTests.cs index edfba6a6f..335aef205 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1210CombinedSystemDirectivesUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1210CombinedSystemDirectivesUnitTests.cs @@ -46,7 +46,7 @@ namespace Bar } "; - await VerifyCSharpDiagnosticAsync(namespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(namespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -87,7 +87,7 @@ namespace Bar Diagnostic().WithLocation(11, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -123,7 +123,7 @@ namespace Food Diagnostic().WithLocation(3, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -163,7 +163,7 @@ namespace Food Diagnostic().WithLocation(5, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -177,7 +177,7 @@ public async Task TestValidOrderedUsingDirectivesWithStaticUsingDirectivesAsync( using static System.Math; }"; - await VerifyCSharpDiagnosticAsync(namespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(namespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -216,7 +216,7 @@ public async Task TestPreprocessorDirectivesAsync() Diagnostic().WithLocation(7, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } private static Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expected, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1210UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1210UnitTests.cs index 5e7441864..625b4ff70 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1210UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1210UnitTests.cs @@ -26,7 +26,7 @@ public async Task TestProperOrderedUsingDirectivesInCompilationUnitAsync() using System.IO; using System.Threading;"; - await VerifyCSharpDiagnosticAsync(compilationUnit, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(compilationUnit, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -45,7 +45,7 @@ namespace Bar } "; - await VerifyCSharpDiagnosticAsync(namespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(namespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -68,7 +68,7 @@ public async Task TestInvalidOrderedUsingDirectivesInCompilationUnitAsync() Diagnostic().WithLocation(2, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -109,7 +109,7 @@ namespace Bar Diagnostic().WithLocation(11, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -135,7 +135,7 @@ namespace Second { } namespace second { }"; DiagnosticResult expected = Diagnostic().WithLocation(3, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -156,7 +156,7 @@ public async Task TestInvalidOrderedUsingDirectivesWithInlineCommentsAsync() }"; DiagnosticResult expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -187,7 +187,7 @@ namespace Foo }"; DiagnosticResult expected = Diagnostic().WithLocation(3, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -235,7 +235,7 @@ namespace Foo Diagnostic().WithLocation(7, 1), }, FixedCode = fixedTestCode, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -249,7 +249,7 @@ public async Task TestValidOrderedUsingDirectivesWithStaticUsingDirectivesAsync( using static System.Math; }"; - await VerifyCSharpDiagnosticAsync(namespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(namespaceDeclaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -267,7 +267,7 @@ public async Task TestInvalidOrderedUsingWithUsingAliasDirectivesAsync() "; DiagnosticResult expected = Diagnostic().WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -294,7 +294,7 @@ namespace Test }"; DiagnosticResult expected = Diagnostic().WithLocation(6, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -328,7 +328,7 @@ public async Task TestPreprocessorDirectivesAsync() // else block is skipped var expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -376,7 +376,7 @@ namespace Newtonsoft.Json Diagnostic().WithLocation(8, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -417,7 +417,7 @@ namespace Newtonsoft.Json Diagnostic().WithLocation(5, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1211UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1211UnitTests.cs index 76ca3a2a4..7b280faef 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1211UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1211UnitTests.cs @@ -36,7 +36,7 @@ public async Task TestValidUsingDirectivesInNamespaceAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -70,7 +70,7 @@ namespace Spam } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -91,7 +91,7 @@ public class Foo } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -156,7 +156,7 @@ namespace Spam Diagnostic().WithLocation(21, 5).WithArguments("Character", "int"), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -191,7 +191,7 @@ public async Task TestPreprocessorDirectivesAsync() // else block is skipped var expected = Diagnostic().WithLocation(8, 1).WithArguments("AThing", "BThing"); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -221,7 +221,7 @@ public async Task TestSameUsingWithDifferentAliasAsync() var expected = Diagnostic().WithLocation(4, 5).WithArguments("Func1", "Func2"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1212UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1212UnitTests.cs index 03c79e1b5..fcd27af1e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1212UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1212UnitTests.cs @@ -70,7 +70,7 @@ public int Prop } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -116,7 +116,7 @@ public int Prop }"; DiagnosticResult expected = Diagnostic().WithLocation(9, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -166,7 +166,7 @@ public int Prop } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -224,7 +224,7 @@ public int Prop } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -270,7 +270,7 @@ public int Prop } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -295,7 +295,7 @@ public int Prop } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -315,7 +315,7 @@ public int Prop } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -335,7 +335,7 @@ public int Prop } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -362,7 +362,7 @@ public int Prop } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -408,7 +408,7 @@ public int this[int index] } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -433,7 +433,7 @@ public int this[int index] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -453,7 +453,7 @@ public int this[int index] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -473,7 +473,7 @@ public int this[int index] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -489,7 +489,7 @@ public class Foo public int Property => field; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1213UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1213UnitTests.cs index 2924db36d..4e22372ff 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1213UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1213UnitTests.cs @@ -58,7 +58,7 @@ public event EventHandler NameChanged } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -110,7 +110,7 @@ public event EventHandler NameChanged } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -170,7 +170,7 @@ public event EventHandler NameChanged } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -203,7 +203,7 @@ public event EventHandler NameChanged } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -222,7 +222,7 @@ public event EventHandler NameChanged } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -240,7 +240,7 @@ public event EventHandler NameChanged } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -258,7 +258,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1214UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1214UnitTests.cs index af7998313..065c69e67 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1214UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1214UnitTests.cs @@ -81,7 +81,7 @@ private void TestMethod10() { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -105,7 +105,7 @@ public class Foo private static readonly int j = 0; private static int i = 0; }"; - await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -118,7 +118,7 @@ public class Foo private static readonly int j = 0; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -140,7 +140,7 @@ public class Foo { private static readonly int j = 0; private static int i = 0;}"; - await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -153,7 +153,7 @@ public class Foo private static int j = 0; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -174,7 +174,7 @@ public class Foo var expected = Diagnostic().WithLocation(5, 26); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -198,7 +198,7 @@ public struct Foo private static readonly int j = 0; private static int i = 0; }"; - await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -258,7 +258,7 @@ public class FooInner public static readonly int j = 0; }"; - await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -286,7 +286,7 @@ public class FooInner public static readonly int j = 0; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -299,7 +299,7 @@ public async Task TestStaticFollowedByReadOnlyAtDifferentAccessLevelAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1215UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1215UnitTests.cs index 53ab6ab2c..2c173c202 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1215UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1215UnitTests.cs @@ -88,7 +88,7 @@ private void TestMethod10() { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -105,7 +105,7 @@ public async Task TestStaticReadonlyIsIgnoredAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -130,7 +130,7 @@ public async Task TestReadonlyOrderingInClassAsync() public int TestField1; } "; - await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -155,7 +155,7 @@ public async Task TestReadonlyOrderingInStructAsync() public int TestField1; } "; - await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -172,7 +172,7 @@ public async Task TestNonStaticFollowedByReadOnlyAtDifferentAccessLevelAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -189,7 +189,7 @@ public async Task TestConstBeforeReadonlyAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1216UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1216UnitTests.cs index a9b1a6105..46790e296 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1216UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1216UnitTests.cs @@ -34,7 +34,7 @@ public async Task TestValidUsingDirectivesInNamespaceAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -60,7 +60,7 @@ namespace Bar } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -80,7 +80,7 @@ public class Foo } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -128,7 +128,7 @@ namespace Bar Diagnostic().WithLocation(11, 5), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -169,7 +169,7 @@ public async Task TestPreprocessorDirectivesAsync() // else block is skipped var expected = Diagnostic().WithLocation(9, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1217UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1217UnitTests.cs index 4811f030d..292b1b164 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1217UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1217UnitTests.cs @@ -55,7 +55,7 @@ public async Task TestValidUsingDirectivesInNamespaceAsync() } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -82,7 +82,7 @@ namespace Bar } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -102,7 +102,7 @@ public class Foo } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -152,7 +152,7 @@ namespace Bar Diagnostic().WithLocation(11, 5).WithArguments("System.Math", "System.Array"), }; - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -171,7 +171,7 @@ public async Task TestValidUsingDirectivesWithInlineCommentsAsync() } "; - await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -204,7 +204,7 @@ public async Task TestInvalidUsingDirectivesWithGlobalPrefixAsync() Diagnostic().WithLocation(5, 5).WithArguments("System.Math", "global::System.Array"), }; - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -248,7 +248,7 @@ public async Task TestPreprocessorDirectivesAsync() Diagnostic().WithLocation(8, 1).WithArguments("System.String", "System.Math"), }; - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -296,7 +296,7 @@ public static void TestMethod() Diagnostic().WithLocation(2, 1).WithArguments("MyNamespace.TestClass", "System.Math"), }; - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -344,7 +344,7 @@ public static void TestMethod() Diagnostic().WithLocation(2, 1).WithArguments("System.Math", "System.Activator"), }; - await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } private static DiagnosticResult Diagnostic() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderCombinedSystemDirectivesUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderCombinedSystemDirectivesUnitTests.cs index 22ab20737..a56050bec 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderCombinedSystemDirectivesUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderCombinedSystemDirectivesUnitTests.cs @@ -80,7 +80,7 @@ public class Bar StyleCopDiagnosticVerifier.Diagnostic().WithLocation(9, 1), Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(10, 1), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -122,7 +122,7 @@ public class Bar StyleCopDiagnosticVerifier.Diagnostic().WithLocation(3, 1), Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(4, 1), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -176,7 +176,7 @@ public class Bar StyleCopDiagnosticVerifier.Diagnostic().WithLocation(7, 1).WithArguments("MyFunc", "SystemAction"), StyleCopDiagnosticVerifier.Diagnostic().WithLocation(9, 1), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -215,7 +215,7 @@ public class Bar this.usingDirectivesPlacement = UsingDirectivesPlacement.OutsideNamespace; var expected = StyleCopDiagnosticVerifier.Diagnostic().WithLocation(3, 1); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -258,7 +258,7 @@ public class Bar this.usingDirectivesPlacement = UsingDirectivesPlacement.OutsideNamespace; var expected = StyleCopDiagnosticVerifier.Diagnostic().WithLocation(5, 1); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -301,7 +301,7 @@ public class Bar this.usingDirectivesPlacement = UsingDirectivesPlacement.OutsideNamespace; var expected = StyleCopDiagnosticVerifier.Diagnostic().WithLocation(5, 1); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -384,7 +384,7 @@ namespace TestNamespace2 Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(8, 1), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, remainingDiagnostics, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, remainingDiagnostics, CancellationToken.None).ConfigureAwait(true); } /// @@ -442,7 +442,7 @@ public class Bar StyleCopDiagnosticVerifier.Diagnostic().WithLocation(7, 1).WithArguments("MyFunc", "SystemAction"), StyleCopDiagnosticVerifier.Diagnostic().WithLocation(9, 1), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private Task VerifyCSharpFixAsync(string source, DiagnosticResult[] expected, string fixedSource, DiagnosticResult[] remainingDiagnostics, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderGroupSeparationUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderGroupSeparationUnitTests.cs index b25cec42c..482c4b750 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderGroupSeparationUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderGroupSeparationUnitTests.cs @@ -87,7 +87,7 @@ public class Bar Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(8, 1), StyleCopDiagnosticVerifier.Diagnostic().WithLocation(8, 1).WithArguments("System.Collections", "System.Math"), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -151,7 +151,7 @@ public class Bar Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorOutside).WithLocation(10, 5), StyleCopDiagnosticVerifier.Diagnostic().WithLocation(10, 5).WithArguments("System.Collections", "System.Math"), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } private Task VerifyCSharpFixAsync(string source, DiagnosticResult[] expected, string fixedSource, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderRegressionUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderRegressionUnitTests.cs index 166dcfa9f..31536353c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderRegressionUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderRegressionUnitTests.cs @@ -84,7 +84,7 @@ namespace Microsoft.VisualStudio.Shell "; var expected = StyleCopDiagnosticVerifier.Diagnostic().WithLocation(6, 1); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -117,7 +117,7 @@ namespace MyNamespace "; var expected = StyleCopDiagnosticVerifier.Diagnostic().WithLocation(2, 1); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } private Task VerifyCSharpFixAsync(string source, DiagnosticResult[] expected, string fixedSource, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderUnitTests.cs index 0d636b115..4c68f5bb5 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderUnitTests.cs @@ -82,7 +82,7 @@ public class Bar Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(10, 1), StyleCopDiagnosticVerifier.Diagnostic().WithLocation(10, 1).WithArguments("System.Collections", "System.Math"), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -124,7 +124,7 @@ public class Bar Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(4, 1), StyleCopDiagnosticVerifier.Diagnostic().WithLocation(4, 1).WithArguments("System", "Microsoft.CodeAnalysis"), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -181,7 +181,7 @@ public class Bar StyleCopDiagnosticVerifier.Diagnostic().WithLocation(9, 1), StyleCopDiagnosticVerifier.Diagnostic().WithLocation(10, 1).WithArguments("System.Collections", "System.Math"), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -220,7 +220,7 @@ public class Bar this.usingDirectivesPlacement = UsingDirectivesPlacement.OutsideNamespace; var expected = StyleCopDiagnosticVerifier.Diagnostic().WithLocation(4, 1).WithArguments("System", "Microsoft.CodeAnalysis"); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -263,7 +263,7 @@ public class Bar this.usingDirectivesPlacement = UsingDirectivesPlacement.OutsideNamespace; var expected = StyleCopDiagnosticVerifier.Diagnostic().WithLocation(6, 1).WithArguments("System", "Microsoft.CodeAnalysis"); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -306,7 +306,7 @@ public class Bar this.usingDirectivesPlacement = UsingDirectivesPlacement.OutsideNamespace; var expected = StyleCopDiagnosticVerifier.Diagnostic().WithLocation(6, 1).WithArguments("System", "Microsoft.CodeAnalysis"); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -392,7 +392,7 @@ namespace TestNamespace2 Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(8, 1), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, remainingDiagnostics, cancellationToken: CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, remainingDiagnostics, cancellationToken: CancellationToken.None).ConfigureAwait(true); } /// @@ -453,7 +453,7 @@ public class Bar StyleCopDiagnosticVerifier.Diagnostic().WithLocation(9, 1), StyleCopDiagnosticVerifier.Diagnostic().WithLocation(10, 1).WithArguments("System.Collections", "System.Math"), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -483,7 +483,7 @@ public class TestClass1 "; var expected = Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -508,7 +508,7 @@ namespace TestNamespace2 "; var expected = Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(1, 1); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -541,7 +541,7 @@ public async Task VerifyCodefixForElsePartOfDirectiveTriviaAsync() } "; var expected = StyleCopDiagnosticVerifier.Diagnostic().WithLocation(6, 5); - await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, new[] { expected }, fixedTestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -639,7 +639,7 @@ public class Haddock { } Diagnostic(SA1200UsingDirectivesMustBePlacedCorrectly.DescriptorInside).WithLocation(11, 1), }; - await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, fixedExpected, cancellationToken: CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTestCode, fixedExpected, cancellationToken: CancellationToken.None).ConfigureAwait(true); } private Task VerifyCSharpFixAsync(string source, DiagnosticResult[] expected, string fixedSource, DiagnosticResult[] remainingDiagnostics, CancellationToken cancellationToken) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1100UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1100UnitTests.cs index e0c05a624..b9493a7fa 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1100UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1100UnitTests.cs @@ -53,7 +53,7 @@ protected void Baz() this.Bar(); } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -94,7 +94,7 @@ protected void Baz() this.Bar(); } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -121,7 +121,7 @@ protected void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -170,7 +170,7 @@ protected void Bar(string param) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -197,7 +197,7 @@ protected void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -238,7 +238,7 @@ protected void Baz() var s = this.Bar; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -286,7 +286,7 @@ protected void Bar(string param) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -334,7 +334,7 @@ protected void Bar(long l) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -382,7 +382,7 @@ protected void Bar(ref string s) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -430,7 +430,7 @@ protected void Bar(out string s) s = string.Empty; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -478,7 +478,7 @@ protected void Bar(string param) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -526,7 +526,7 @@ protected void Bar(ref string s, int i) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -574,7 +574,7 @@ protected void Bar(out string s, int i) s = string.Empty; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -622,7 +622,7 @@ protected void Bar(int i, string s) } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -649,7 +649,7 @@ protected override void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -676,7 +676,7 @@ protected override void Bar(string s, int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -704,7 +704,7 @@ protected void Bar(string s, ref int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -732,7 +732,7 @@ protected override string Bar } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -771,7 +771,7 @@ protected void Baz() this.MyEvent += () => { }; } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -795,7 +795,7 @@ protected void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -819,7 +819,7 @@ protected void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -844,7 +844,7 @@ public string Baz() return this.ToString(); } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -909,7 +909,7 @@ protected void Baz2() this.Bar2(); } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -954,7 +954,7 @@ protected void Baz() .Bar(); } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -989,7 +989,7 @@ protected void Baz() .ToString(); } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1002,7 +1002,7 @@ class ClassName : System.Collections.Generic.List public int Property { get { return base[0]; } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1021,7 +1021,7 @@ class ClassName : System.Collections.Generic.List { public int Property { get { return this[0]; } } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1040,7 +1040,7 @@ class ClassName : System.Collections.Generic.List> { public int Property { get { return this[0](); } } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1101UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1101UnitTests.cs index a40ed7bf9..52091c0fb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1101UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1101UnitTests.cs @@ -259,7 +259,7 @@ public void InstanceMethodName(int ParameterName) Diagnostic().WithLocation(107, 48), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -294,7 +294,7 @@ public void ConvertAll(T value) { } Diagnostic().WithLocation(7, 9), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -314,7 +314,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -333,7 +333,7 @@ public class TestClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -351,7 +351,7 @@ public class Foo } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -365,7 +365,7 @@ public class Foo } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -395,7 +395,7 @@ public class Foo Diagnostic().WithLocation(6, 23), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -411,7 +411,7 @@ public class Foo } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -450,7 +450,7 @@ public T this[int i] Diagnostic().WithLocation(9, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -480,7 +480,7 @@ public class Foo Diagnostic().WithLocation(6, 28), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -523,7 +523,7 @@ public event EventHandler Bar Diagnostic().WithLocation(11, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -553,7 +553,7 @@ public class Foo Diagnostic().WithLocation(6, 28), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -588,7 +588,7 @@ public DerivedTestClass() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1102UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1102UnitTests.cs index 587097ca9..1df02cfc2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1102UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1102UnitTests.cs @@ -52,7 +52,7 @@ where m > 0 DiagnosticResult expected = Diagnostic(SA110xQueryClauses.SA1102Descriptor).WithLocation(13, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -114,7 +114,7 @@ group m by m into g Diagnostic(SA110xQueryClauses.SA1102Descriptor).WithLocation(23, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -133,7 +133,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -183,7 +183,7 @@ orderby m descending Diagnostic(SA110xQueryClauses.SA1102Descriptor).WithLocation(16, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1103UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1103UnitTests.cs index 703d28529..bbb1a1298 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1103UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1103UnitTests.cs @@ -65,7 +65,7 @@ public void TestMethod() Diagnostic(SA110xQueryClauses.SA1103Descriptor).WithLocation(11, 21), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -123,7 +123,7 @@ public void TestMethod() }; test.ExpectedDiagnostics.AddRange(expectedDiagnostics); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -201,7 +201,7 @@ orderby g.Key }; test.ExpectedDiagnostics.AddRange(expectedDiagnostics); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -249,7 +249,7 @@ public void TestMethod() Diagnostic(SA110xQueryClauses.SA1103Descriptor).WithLocation(11, 21), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -307,7 +307,7 @@ public void TestMethod() }; test.ExpectedDiagnostics.AddRange(expectedDiagnostics); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -365,7 +365,7 @@ public void TestMethod() Diagnostic(SA110xQueryClauses.SA1103Descriptor).WithLocation(11, 21), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -390,7 +390,7 @@ public void TestMethod() "; var expectedDiagnostics = new DiagnosticResult("CS0742", DiagnosticSeverity.Error).WithLocation(12, 38).WithMessage("A query body must end with a select clause or a group clause"); - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -451,7 +451,7 @@ where element < 3 }, }, CodeActionIndex = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1104UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1104UnitTests.cs index 68fa99ce5..34e3c9c25 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1104UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1104UnitTests.cs @@ -78,7 +78,7 @@ from element in TestMethod1 Diagnostic(SA110xQueryClauses.SA1104Descriptor).WithLocation(18, 19), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -138,7 +138,7 @@ public void TestMethod2() Diagnostic(SA110xQueryClauses.SA1104Descriptor).WithLocation(17, 19), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -212,7 +212,7 @@ orderby g.Key Diagnostic(SA110xQueryClauses.SA1104Descriptor).WithLocation(16, 32), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -274,7 +274,7 @@ from element in TestMethod1 Diagnostic(SA110xQueryClauses.SA1104Descriptor).WithLocation(18, 30), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1105UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1105UnitTests.cs index 3195a99c0..c8c6273d4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1105UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1105UnitTests.cs @@ -78,7 +78,7 @@ select TestMethod1 Diagnostic(SA110xQueryClauses.SA1105Descriptor).WithLocation(15, 51), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -140,7 +140,7 @@ group element by TestMethod1 Diagnostic(SA110xQueryClauses.SA1105Descriptor).WithLocation(15, 51), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -214,7 +214,7 @@ orderby g.Key Diagnostic(SA110xQueryClauses.SA1105Descriptor).WithLocation(14, 24), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -276,7 +276,7 @@ select TestMethod1 Diagnostic(SA110xQueryClauses.SA1105Descriptor).WithLocation(15, 62), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1106UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1106UnitTests.cs index 7cf5cfcd6..a5b159a48 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1106UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1106UnitTests.cs @@ -43,7 +43,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -73,7 +73,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -105,7 +105,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic().WithLocation(9, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -122,7 +122,7 @@ public void TestMethod() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -146,7 +146,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic().WithLocation(6, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -162,7 +162,7 @@ public void TestMethod() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -190,7 +190,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -218,7 +218,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -248,7 +248,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -303,7 +303,7 @@ public void TestMethod() Diagnostic().WithLocation(18, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -316,7 +316,7 @@ public async Task TestMemberAsync(string declarationKeyword) DiagnosticResult expected = Diagnostic().WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -360,7 +360,7 @@ public void TestMethod2() Diagnostic().WithLocation(11, 62), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -389,7 +389,7 @@ public void TestMethod() var expected = Diagnostic().WithLocation(6, 26); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1107UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1107UnitTests.cs index b1c753a11..35a65f964 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1107UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1107UnitTests.cs @@ -44,7 +44,7 @@ public static void Foo(string a, string b) } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -102,7 +102,7 @@ public static void Foo(string a, string b) } "; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -117,7 +117,7 @@ public static void Foo(string a, string b) } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -138,7 +138,7 @@ int i } "; DiagnosticResult expected = DiagnosticResult.CompilerError("CS1002").WithLocation(7, 14).WithMessage("; expected"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -165,7 +165,7 @@ static void Main(string[] args) NumberOfIncrementalIterations = 1, NumberOfFixAllIterations = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } protected virtual string? GetFixedCodeTestEmptyStatementAfterBlock() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1108UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1108UnitTests.cs index e9ab748e4..2868b0081 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1108UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1108UnitTests.cs @@ -38,7 +38,7 @@ public void F() var firstDiagnostic = Diagnostic().WithLocation(8, 9); var secondDiagnostic = Diagnostic().WithLocation(13, 9); - await VerifyCSharpDiagnosticAsync(testCode, new[] { firstDiagnostic, secondDiagnostic }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { firstDiagnostic, secondDiagnostic }, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -56,7 +56,7 @@ public void F() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -79,7 +79,7 @@ line 2 */ DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -97,7 +97,7 @@ public void F() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -118,7 +118,7 @@ public void F() }"; DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -136,7 +136,7 @@ public void F() DiagnosticResult expected = Diagnostic().WithLocation(7, 22); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -158,7 +158,7 @@ public void F() DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -186,7 +186,7 @@ public void F() DiagnosticResult first = Diagnostic().WithLocation(8, 9); DiagnosticResult second = Diagnostic().WithLocation(13, 9); - await VerifyCSharpDiagnosticAsync(testCode, new[] { first, second }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { first, second }, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -214,7 +214,7 @@ unsafe static void TestMethod() DiagnosticResult expected = Diagnostic().WithLocation(13, 31); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -254,7 +254,7 @@ line 2 */ DiagnosticResult third = Diagnostic().WithLocation(17, 9); DiagnosticResult fourth = Diagnostic().WithLocation(22, 9); - await VerifyCSharpDiagnosticAsync(testCode, new[] { first, second, third, fourth }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { first, second, third, fourth }, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -281,7 +281,7 @@ public void F() DiagnosticResult expected = Diagnostic().WithLocation(9, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -303,7 +303,7 @@ public void F() DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -325,7 +325,7 @@ public void F() DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -347,7 +347,7 @@ public void F() DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -364,7 +364,7 @@ public void F() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -381,7 +381,7 @@ public class Bar } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -407,7 +407,7 @@ public int Prop } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -420,7 +420,7 @@ namespace Foo //inner }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1110UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1110UnitTests.cs index 280fae602..d2d2eb394 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1110UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1110UnitTests.cs @@ -36,7 +36,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(5, 21); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -60,7 +60,7 @@ public Foo() DiagnosticResult expected = Diagnostic().WithLocation(5, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -76,7 +76,7 @@ public void } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -90,7 +90,7 @@ public Foo() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -116,7 +116,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -142,7 +142,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -168,7 +168,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -196,7 +196,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -216,7 +216,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -250,7 +250,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(11, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -270,7 +270,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -293,7 +293,7 @@ public Foo Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -319,7 +319,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -334,7 +334,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -366,7 +366,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(10, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -391,7 +391,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -424,7 +424,7 @@ int index] DiagnosticResult expected = Diagnostic().WithLocation(5, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -442,7 +442,7 @@ internal string this[int index] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -485,7 +485,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(15, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -514,7 +514,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -537,7 +537,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -553,7 +553,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -581,7 +581,7 @@ public void Bar() }"; DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -598,7 +598,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -635,7 +635,7 @@ public void Baz() Diagnostic().WithLocation(7, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -654,7 +654,7 @@ public void Baz() }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -675,7 +675,7 @@ public delegate void MyDel( DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -687,7 +687,7 @@ public class Foo public delegate void MyDel(int i); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -722,7 +722,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -740,7 +740,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -758,7 +758,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -776,7 +776,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -805,7 +805,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -821,7 +821,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -839,7 +839,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -866,7 +866,7 @@ public class Foo DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -893,7 +893,7 @@ public class Foo DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -908,7 +908,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -935,7 +935,7 @@ public static explicit operator Foo( DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -950,7 +950,7 @@ public static explicit operator Foo(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -969,7 +969,7 @@ public void TestMethod() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1009,7 +1009,7 @@ public void TestMethod1 RemainingDiagnostics = { expected }, NumberOfIncrementalIterations = 1, NumberOfFixAllIterations = 1, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1111UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1111UnitTests.cs index da9a2d243..5f14258a3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1111UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1111UnitTests.cs @@ -36,7 +36,7 @@ public void Bar(string s) DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -66,7 +66,7 @@ public void Bar(string s, DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -82,7 +82,7 @@ public void Bar( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -97,7 +97,7 @@ public void Bar(string s) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -123,7 +123,7 @@ public Foo(string s) DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -153,7 +153,7 @@ public Foo(string s, DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -169,7 +169,7 @@ public Foo( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -184,7 +184,7 @@ public Foo(string s) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -220,7 +220,7 @@ public void Baz() DiagnosticResult expected = Diagnostic().WithLocation(12, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -241,7 +241,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -279,7 +279,7 @@ public void Baz() DiagnosticResult expected = Diagnostic().WithLocation(13, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -300,7 +300,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -321,7 +321,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -356,7 +356,7 @@ public void Baz() }"; DiagnosticResult expected = Diagnostic().WithLocation(12, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -394,7 +394,7 @@ public void Baz() DiagnosticResult expected = Diagnostic().WithLocation(13, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -415,7 +415,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -436,7 +436,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -468,7 +468,7 @@ public int this[int index] DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -504,7 +504,7 @@ int index3] DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -522,7 +522,7 @@ public int this[int index] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -564,7 +564,7 @@ public void Test() DiagnosticResult expected = Diagnostic().WithLocation(15, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -592,7 +592,7 @@ public void Test() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -622,7 +622,7 @@ public void Test() DiagnosticResult expected = Diagnostic().WithLocation(9, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -652,7 +652,7 @@ public void Test() DiagnosticResult expected = Diagnostic().WithLocation(9, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -678,7 +678,7 @@ public void Test(System.Collections.Generic.List list) DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -710,7 +710,7 @@ public void Test() DiagnosticResult expected = Diagnostic().WithLocation(9, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -744,7 +744,7 @@ public void Test() DiagnosticResult expected = Diagnostic().WithLocation(11, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -780,7 +780,7 @@ public void Test() DiagnosticResult expected = Diagnostic().WithLocation(12, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -808,7 +808,7 @@ public void Test() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -836,7 +836,7 @@ public void Test() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -882,7 +882,7 @@ public void Test() DiagnosticResult expected = Diagnostic().WithLocation(17, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -897,7 +897,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -917,7 +917,7 @@ public class Foo DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -929,7 +929,7 @@ public class Foo public delegate void Del(int i, string s); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -941,7 +941,7 @@ public class Foo public delegate void Del(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -975,7 +975,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -994,7 +994,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1014,7 +1014,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1047,7 +1047,7 @@ public void Baz() Diagnostic().WithLocation(7, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1064,7 +1064,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1076,7 +1076,7 @@ public class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1090,7 +1090,7 @@ public class FooAttribute : System.Attribute { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1103,7 +1103,7 @@ public class FooAttribute : System.Attribute { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1116,7 +1116,7 @@ public class FooAttribute: System.Attribute { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1134,7 +1134,7 @@ public class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1160,7 +1160,7 @@ public class Foo : System.Attribute }"; DiagnosticResult expected = Diagnostic().WithLocation(4, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1190,7 +1190,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(9, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1206,7 +1206,7 @@ public void Bar() MyEvent(1,2); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1223,7 +1223,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1255,7 +1255,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1293,7 +1293,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(12, 17); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1310,7 +1310,7 @@ public void Bar() }; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1325,7 +1325,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1351,7 +1351,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1377,7 +1377,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1392,7 +1392,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1460,7 +1460,7 @@ public void TestMethod2() test.ExpectedDiagnostics.AddRange(expected); test.RemainingDiagnostics.AddRange(expected); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -1489,7 +1489,7 @@ public static explicit operator TestClass(int value) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1520,7 +1520,7 @@ public class TestClass DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1551,7 +1551,7 @@ public class TestClass DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1582,7 +1582,7 @@ public static explicit operator TestClass(int value) DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1112UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1112UnitTests.cs index 1b61d7039..d1a90f3d8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1112UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1112UnitTests.cs @@ -38,7 +38,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -53,7 +53,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -69,7 +69,7 @@ public void Bar( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -95,7 +95,7 @@ public Foo() DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -110,7 +110,7 @@ public Foo() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -126,7 +126,7 @@ public Foo( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -152,7 +152,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -168,7 +168,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -183,7 +183,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -209,7 +209,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -231,7 +231,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -246,7 +246,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -265,7 +265,7 @@ public int this[int index } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -280,7 +280,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -342,7 +342,7 @@ public void TestMethod2() test.ExpectedDiagnostics.AddRange(expected); test.RemainingDiagnostics.AddRange(expected); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1113UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1113UnitTests.cs index 1b6ec48f2..259345e1e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1113UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1113UnitTests.cs @@ -35,7 +35,7 @@ public void Bar(string s, DiagnosticResult expected = Diagnostic().WithLocation(4, 21); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -64,7 +64,7 @@ public void Bar(string s, Diagnostic().WithLocation(5, 21), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -78,7 +78,7 @@ public void Bar(string s, } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -103,7 +103,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(6, 37); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -134,7 +134,7 @@ public void Bar() Diagnostic().WithLocation(7, 37), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -149,7 +149,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -180,7 +180,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(9, 30); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -217,7 +217,7 @@ public void Bar() Diagnostic().WithLocation(10, 30), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -235,7 +235,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -258,7 +258,7 @@ public Foo(string s, DiagnosticResult expected = Diagnostic().WithLocation(4, 16); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -287,7 +287,7 @@ public Foo(string s, Diagnostic().WithLocation(5, 16), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -301,7 +301,7 @@ public Foo(string s, } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -332,7 +332,7 @@ int i] DiagnosticResult expected = Diagnostic().WithLocation(4, 21); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -369,7 +369,7 @@ int i2] Diagnostic().WithLocation(5, 21), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -387,7 +387,7 @@ int i] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -426,7 +426,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(13, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -471,7 +471,7 @@ public void Bar() Diagnostic().WithLocation(14, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -493,7 +493,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -526,7 +526,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -544,7 +544,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -563,7 +563,7 @@ delegate void Del(string str, DiagnosticResult expected = Diagnostic().WithLocation(4, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -588,7 +588,7 @@ delegate void Del(string str, Diagnostic().WithLocation(5, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -599,7 +599,7 @@ public async Task TestDelegateDeclarationCommaPlacedAtTheSameLineAsThePreviousPa delegate void Del(string str, int i); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -630,7 +630,7 @@ public void Bar() Diagnostic().WithLocation(7, 17), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -644,7 +644,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -658,7 +658,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -683,7 +683,7 @@ public class SimpleApiOriginal DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -697,7 +697,7 @@ public class SimpleApiOriginal public static extern int MessageBox(IntPtr hWnd, String text, String caption, uint type); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -730,7 +730,7 @@ public void Bar() Diagnostic().WithLocation(6, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -745,7 +745,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -772,7 +772,7 @@ public class Foo DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -787,7 +787,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -803,7 +803,7 @@ public static Foo operator + } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -830,7 +830,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -845,7 +845,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -860,7 +860,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -880,7 +880,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -909,7 +909,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -925,7 +925,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -941,7 +941,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -980,7 +980,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(13, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1001,7 +1001,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1022,7 +1022,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1090,7 +1090,7 @@ public void TestMethod2() test.ExpectedDiagnostics.AddRange(expected); test.RemainingDiagnostics.AddRange(expected); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -1136,7 +1136,7 @@ protected ClassName(int x, int y) DiagnosticResult expected = Diagnostic().WithLocation(12, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1175,7 +1175,7 @@ protected ClassName(int x, int y, int z) DiagnosticResult expected = Diagnostic().WithLocation(9, 13); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1114UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1114UnitTests.cs index 34d9202d6..51ce4f18c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1114UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1114UnitTests.cs @@ -29,7 +29,7 @@ public void Bar( DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -45,7 +45,7 @@ public void Bar( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -60,7 +60,7 @@ public void Bar(string s) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -77,7 +77,7 @@ public void Bar( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -96,7 +96,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -112,7 +112,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -127,7 +127,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -144,7 +144,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -163,7 +163,7 @@ public Foo( DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -179,7 +179,7 @@ public Foo( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -194,7 +194,7 @@ public Foo(string s) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -208,7 +208,7 @@ public Foo () } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -231,7 +231,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(12, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -251,7 +251,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -270,7 +270,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -287,7 +287,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -309,7 +309,7 @@ int i] DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -328,7 +328,7 @@ int i] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -346,7 +346,7 @@ int this[int i] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -365,7 +365,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -398,7 +398,7 @@ public void Bar() Diagnostic().WithLocation(14, 1), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -414,7 +414,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -429,7 +429,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -449,7 +449,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(9, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -466,7 +466,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -482,7 +482,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -513,7 +513,7 @@ public void Bar() Diagnostic().WithLocation(16, 1), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -536,7 +536,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -557,7 +557,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -577,7 +577,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -594,7 +594,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -610,7 +610,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -623,7 +623,7 @@ class Foo }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -643,7 +643,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -660,7 +660,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -676,7 +676,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -692,7 +692,7 @@ public delegate void Bar( DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -705,7 +705,7 @@ public delegate void Bar( string s); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -717,7 +717,7 @@ class Foo public delegate void Bar(string s); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -729,7 +729,7 @@ class Foo public delegate void Bar(); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -751,7 +751,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -770,7 +770,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -788,7 +788,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -806,7 +806,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -824,7 +824,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -846,7 +846,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -865,7 +865,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -883,7 +883,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -901,7 +901,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -920,7 +920,7 @@ public static explicit operator Foo( DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -936,7 +936,7 @@ public static explicit operator Foo( } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -951,7 +951,7 @@ public static explicit operator Foo(int i) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -970,7 +970,7 @@ public class Foo DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -989,7 +989,7 @@ public class Foo DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1005,7 +1005,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1020,7 +1020,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1035,7 +1035,7 @@ public static void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1064,7 +1064,7 @@ private void SomeOtherMethod(int someParameter) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1093,7 +1093,7 @@ public void TestMethod( } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1115UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1115UnitTests.cs index d18fa2f9e..8101c2b36 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1115UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1115UnitTests.cs @@ -32,7 +32,7 @@ public void Bar(int i, int z, DiagnosticResult expected1 = Diagnostic().WithLocation(6, 1); DiagnosticResult expected2 = Diagnostic().WithLocation(8, 1); - await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -47,7 +47,7 @@ public void Bar(int i, } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -61,7 +61,7 @@ public void Bar(int i, string s) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -80,7 +80,7 @@ public Foo(int i, int z, DiagnosticResult expected = Diagnostic().WithLocation(7, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -102,7 +102,7 @@ public Foo(int i, int z) DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -124,7 +124,7 @@ public Foo(int i, int z) : base(i, DiagnosticResult expected = Diagnostic().WithLocation(10, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -139,7 +139,7 @@ public Foo(int i, } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -153,7 +153,7 @@ public Foo(int i, string s) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -176,7 +176,7 @@ public void Baz() DiagnosticResult expected = Diagnostic().WithLocation(12, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -201,7 +201,7 @@ public void Baz() DiagnosticResult[] expected = DiagnosticResult.EmptyDiagnosticResults; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -221,7 +221,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -245,7 +245,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -271,7 +271,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -290,7 +290,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -316,7 +316,7 @@ public void Baz() DiagnosticResult expected1 = Diagnostic().WithLocation(12, 1); DiagnosticResult expected2 = Diagnostic().WithLocation(14, 1); - await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -337,7 +337,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -356,7 +356,7 @@ public void Baz() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -380,7 +380,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -405,7 +405,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(9, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -429,7 +429,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -450,7 +450,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -472,7 +472,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -497,7 +497,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -519,7 +519,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -539,7 +539,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -558,7 +558,7 @@ int j] DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -574,7 +574,7 @@ int j] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -589,7 +589,7 @@ class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -608,7 +608,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -624,7 +624,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -639,7 +639,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -659,7 +659,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(9, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -676,7 +676,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -692,7 +692,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -716,7 +716,7 @@ class Foo DiagnosticResult expected = Diagnostic().WithLocation(12, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -737,7 +737,7 @@ class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -757,7 +757,7 @@ class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -780,7 +780,7 @@ class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -801,7 +801,7 @@ class Foo DiagnosticResult expected = Diagnostic().WithLocation(9, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -824,7 +824,7 @@ class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -847,7 +847,7 @@ class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -865,7 +865,7 @@ class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -882,7 +882,7 @@ class Foo { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -906,7 +906,7 @@ public void Bar() DiagnosticResult expected1 = Diagnostic().WithLocation(8, 1); DiagnosticResult expected2 = Diagnostic().WithLocation(11, 1); - await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -925,7 +925,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -940,7 +940,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -966,7 +966,7 @@ public void Bar() DiagnosticResult expected2 = Diagnostic().WithLocation(11, 1); DiagnosticResult expected3 = Diagnostic().WithLocation(13, 1); - await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2, expected3 }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2, expected3 }, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -992,7 +992,7 @@ public void Bar() DiagnosticResult expected2 = Diagnostic().WithLocation(11, 1); DiagnosticResult expected3 = Diagnostic().WithLocation(13, 1); - await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2, expected3 }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2, expected3 }, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1010,7 +1010,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1025,7 +1025,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1045,7 +1045,7 @@ delegate void Del(int i, DiagnosticResult expected1 = Diagnostic().WithLocation(6, 1); DiagnosticResult expected2 = Diagnostic().WithLocation(9, 1); - await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1059,7 +1059,7 @@ delegate void Del(int i, int z); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1071,7 +1071,7 @@ class Foo delegate void Del(int i, int j, int z); }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1090,7 +1090,7 @@ public class Foo DiagnosticResult expected = Diagnostic().WithLocation(6, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1106,7 +1106,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1121,7 +1121,7 @@ public class Foo } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1151,7 +1151,7 @@ public void TestMethod( } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1190,7 +1190,7 @@ public void TestMethod() }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1241,7 +1241,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1267,7 +1267,7 @@ public static void DoWork( { } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1116UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1116UnitTests.cs index 355ed2af0..3030e932b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1116UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1116UnitTests.cs @@ -67,7 +67,7 @@ class Foo {{ {declaration} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -85,7 +85,7 @@ class Foo {fixedDeclaration} }}"; DiagnosticResult expected = Diagnostic().WithLocation(4, column); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -116,7 +116,7 @@ public Derived(int i, string z) }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -165,7 +165,7 @@ public Derived(int i, string z) }}"; DiagnosticResult expected = Diagnostic().WithLocation(12, 16); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -192,7 +192,7 @@ public void Baz() public long this[int a, int s] => a + s; }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -229,7 +229,7 @@ public void Baz() }}"; DiagnosticResult expected = Diagnostic().WithLocation(10, column); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -244,7 +244,7 @@ class Foo }; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -270,7 +270,7 @@ class ObsoleteType { }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -307,7 +307,7 @@ class Foo }"; DiagnosticResult expected = Diagnostic().WithLocation(10, 14); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1117UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1117UnitTests.cs index 9e232ce89..eafc8403d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1117UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1117UnitTests.cs @@ -135,7 +135,7 @@ class Foo {{ {declaration} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -149,7 +149,7 @@ class Foo }}"; DiagnosticResult expected = Diagnostic().WithLocation(0); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -178,7 +178,7 @@ public Derived(int i, int j, string z) }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -208,7 +208,7 @@ public Derived(int i, int j, string z) }}"; DiagnosticResult expected = Diagnostic().WithLocation(0); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -234,7 +234,7 @@ public void Baz() public long this[int a, int b, int s] => a + b + s; }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -258,7 +258,7 @@ public void Baz() }}"; DiagnosticResult expected = Diagnostic().WithLocation(0); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -282,7 +282,7 @@ class Foo {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -305,7 +305,7 @@ class Foo DiagnosticResult expected = Diagnostic().WithLocation(0); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1118UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1118UnitTests.cs index 47beece60..9f0f6be60 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1118UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1118UnitTests.cs @@ -54,7 +54,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(11, 13); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -81,7 +81,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(11, 13); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -108,7 +108,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(11, 13); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -133,7 +133,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(11, 13); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -159,7 +159,7 @@ public void FunB() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -183,7 +183,7 @@ public void FunB() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -204,7 +204,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -227,7 +227,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(11, 11); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -249,7 +249,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -274,7 +274,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(11, 11); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -294,7 +294,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 11); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -312,7 +312,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -340,7 +340,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(8, 24); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -359,7 +359,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(7, 20); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -383,7 +383,7 @@ public class Foo DiagnosticResult expected = Diagnostic().WithLocation(11, 16); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -405,7 +405,7 @@ public void Bar() }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1120UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1120UnitTests.cs index 59ec2076c..b39def301 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1120UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1120UnitTests.cs @@ -36,7 +36,7 @@ public void Bar() { } }"; - await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -61,7 +61,7 @@ public void Bar() System.Console.WriteLine(""A""); } }"; - await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -85,7 +85,7 @@ public void Bar() { } }"; - await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -111,7 +111,7 @@ public void Bar() { } }"; - await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -126,7 +126,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -153,7 +153,7 @@ public void Bar() // Bar } }"; - await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -181,7 +181,7 @@ public void Bar() // Bar } }"; - await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -210,7 +210,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, new[] { expected, expected2 }, expectedFixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, new[] { expected, expected2 }, expectedFixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -238,7 +238,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, expectedFixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -256,7 +256,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -298,7 +298,7 @@ private IEnumerable Build(int argument) Diagnostic().WithLocation(11, 9), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -340,7 +340,7 @@ public SomeException() Diagnostic().WithLocation(9, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -364,7 +364,7 @@ public class TestClass var expected = Diagnostic().WithLocation(1, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -386,7 +386,7 @@ public async Task VerifyThatEmptyCommentAtFileEndWillBeHandledProperlyAsync() var expected = Diagnostic().WithLocation(4, 1); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -412,7 +412,7 @@ public async Task VerifyThatUnclosedCommentAtFileEndWillBeHandledProperlyAsync() TestCode = testCode, FixedCode = fixedTestCode, FixedState = { MarkupHandling = MarkupMode.Ignore }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1121UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1121UnitTests.cs index 9067cb08d..d0dabe435 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1121UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1121UnitTests.cs @@ -154,7 +154,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(6, 9); - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -178,8 +178,8 @@ public struct @{0} {{ }} }} }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testSource, predefined), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(string.Format(testSource, fullName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testSource, predefined), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(string.Format(testSource, fullName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -198,7 +198,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(6, 28); - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -217,7 +217,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(6, 27); - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -239,7 +239,7 @@ public class Foo Diagnostic().WithLocation(6, 24), }; - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -257,7 +257,7 @@ public enum Bar : {0} DiagnosticResult expected = Diagnostic().WithLocation(4, 23); - await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -275,7 +275,7 @@ public unsafe void Bar() }}"; DiagnosticResult expected = Diagnostic().WithLocation(6, 9); - await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -293,7 +293,7 @@ public void Bar({0} test) DiagnosticResult expected = Diagnostic().WithLocation(4, 21); - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -318,7 +318,7 @@ public class Foo Diagnostic().WithLocation(7, 30), }; - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -342,7 +342,7 @@ public void Bar() Diagnostic().WithLocation(8, 22), }; - await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -361,7 +361,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(6, 25); - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -380,7 +380,7 @@ public unsafe void Bar() DiagnosticResult expected = Diagnostic().WithLocation(6, 32); - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -404,7 +404,7 @@ public void Bar() Diagnostic().WithLocation(7, 29), }; - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -421,7 +421,7 @@ public class Foo Diagnostic().WithLocation(2, 33), }; - await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -439,7 +439,7 @@ public static class StaticGenericClass {{ }}"; Diagnostic().WithLocation(2, 33), }; - await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -456,7 +456,7 @@ public class Foo DiagnosticResult expected = Diagnostic().WithLocation(3, 20); - await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -470,7 +470,7 @@ public class Foo }}"; DiagnosticResult expected = Diagnostic().WithLocation(2, 38); - await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -489,7 +489,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(6, 25); - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -508,7 +508,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(6, 9); - await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testSource, fullName), expected, string.Format(testSource, predefined), CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -538,7 +538,7 @@ class Bar TestCode = oldSource, ExpectedDiagnostics = { Diagnostic().WithLocation(6, 5) }, FixedCode = newSource, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -568,7 +568,7 @@ class Bar TestCode = oldSource, ExpectedDiagnostics = { Diagnostic().WithLocation(6, 5) }, FixedCode = newSource, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -599,7 +599,7 @@ class Bar ExpectedDiagnostics = { Diagnostic().WithLocation(6, 5) }, FixedCode = newSource, Settings = AllowBuiltInTypeAliasesSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -619,7 +619,7 @@ class Bar { TestCode = testSource, Settings = AllowBuiltInTypeAliasesSettings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -637,8 +637,8 @@ public class {0} {{}} "; foreach (var item in AllTypesData) { - await VerifyCSharpDiagnosticAsync(string.Format(testCode, "@" + item.Item1), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, item.Item2), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, "@" + item.Item1), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, item.Item2), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } @@ -660,8 +660,8 @@ public class Bar {{ }} "; foreach (var item in AllTypesData) { - await VerifyCSharpDiagnosticAsync(string.Format(testCode, "@" + item.Item1), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, item.Item2), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, "@" + item.Item1), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, item.Item2), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } @@ -685,7 +685,7 @@ public void Bar() }} "; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, fullName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, fullName), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -706,7 +706,7 @@ public void Bar() "; DiagnosticResult expected = Diagnostic().WithLocation(8, 34); - await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(testCode, fullName), expected, string.Format(testCode, predefined), CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1122UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1122UnitTests.cs index cb26508c7..730156f5e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1122UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1122UnitTests.cs @@ -32,7 +32,7 @@ public void Bar() string test = {0}"" ""; }} }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -45,7 +45,7 @@ public void Bar() string test = null; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -69,7 +69,7 @@ public void Bar() }"; var expected = Diagnostic().WithLocation(5, 26); - await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(oldSource, expected, newSource, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -87,7 +87,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(5, 23); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -105,7 +105,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(5, 24); - await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty), expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty), expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -129,7 +129,7 @@ public void Bar() Diagnostic().WithLocation(6, 15), }; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty, isConst ? "const" : string.Empty), isConst ? DiagnosticResult.EmptyDiagnosticResults : expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty, isConst ? "const" : string.Empty), isConst ? DiagnosticResult.EmptyDiagnosticResults : expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -153,7 +153,7 @@ public void Bar() Diagnostic().WithLocation(6, 16), }; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty, isConst ? "const" : string.Empty), isConst ? DiagnosticResult.EmptyDiagnosticResults : expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty, isConst ? "const" : string.Empty), isConst ? DiagnosticResult.EmptyDiagnosticResults : expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -170,7 +170,7 @@ public void Bar() {{ }} }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -186,7 +186,7 @@ public void Bar(string x = {0}"""", string y = ({0}"""")) }} }}"; - await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(string.Format(testCode, useVerbatimLiteral ? "@" : string.Empty), DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -210,7 +210,7 @@ public void Bar() }"; var expected = Diagnostic().WithLocation(5, 23); - await VerifyCSharpFixAsync(string.Format(oldSource, useVerbatimLiteral ? "@" : string.Empty), expected, newSource, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(string.Format(oldSource, useVerbatimLiteral ? "@" : string.Empty), expected, newSource, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -232,7 +232,7 @@ void Bar() }"; var expected = Diagnostic().WithLocation(5, 28); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -245,7 +245,7 @@ class ClassName } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -265,7 +265,7 @@ class ClassName "; DiagnosticResult expected = Diagnostic().WithLocation(4, 36); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -278,7 +278,7 @@ class ClassName } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -298,7 +298,7 @@ class ClassName "; DiagnosticResult expected = Diagnostic().WithLocation(4, 28); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -325,7 +325,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1123UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1123UnitTests.cs index bc205c467..ff73bbb63 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1123UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1123UnitTests.cs @@ -43,7 +43,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -59,7 +59,7 @@ public void Bar() #endregion }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -74,7 +74,7 @@ public void Bar() } #endregion }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -93,7 +93,7 @@ public void FooBar() #endregion } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -109,7 +109,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -125,7 +125,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -141,7 +141,7 @@ public void Bar() #endregion }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -188,7 +188,7 @@ void MethodName() Diagnostic().WithLocation(13, 9), Diagnostic().WithLocation(14, 9), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1124UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1124UnitTests.cs index d2297c4cc..be674c7fb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1124UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1124UnitTests.cs @@ -35,7 +35,7 @@ public void Bar() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -53,7 +53,7 @@ public void Bar() DiagnosticResult expected = Diagnostic().WithLocation(5, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -79,7 +79,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -113,7 +113,7 @@ public void FooBar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -139,7 +139,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -165,7 +165,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -191,7 +191,7 @@ public void Bar() } }"; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1125UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1125UnitTests.cs index d5420fc7d..e1a3b4159 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1125UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1125UnitTests.cs @@ -43,7 +43,7 @@ class ClassName }} "; string testCode = string.Format(template, form); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -70,7 +70,7 @@ class ClassName }} "; string testCode = string.Format(template, form); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -105,8 +105,8 @@ class ClassName string fixedCode = string.Format(template, shortForm); DiagnosticResult expected = Diagnostic().WithLocation(6, 55); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -150,10 +150,10 @@ class ClassName if (testCode != fixedCode) { DiagnosticResult expected = Diagnostic().WithLocation(7, 36); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -181,8 +181,8 @@ class ClassName string fixedCode = string.Format(template, shortForm); DiagnosticResult expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -213,8 +213,8 @@ void MethodName() string fixedCode = string.Format(template, shortForm); DiagnosticResult expected = Diagnostic().WithLocation(9, 41); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -242,7 +242,7 @@ class ClassName }} "; string testCode = string.Format(template, form); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -274,7 +274,7 @@ class ClassName }} "; string testCode = string.Format(template, form); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -302,7 +302,7 @@ class ClassName }} "; string testCode = string.Format(template, form); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -331,8 +331,8 @@ class ClassName string fixedCode = string.Format(template, shortForm); DiagnosticResult expected = Diagnostic().WithLocation(8, 43); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } // This is a regression test for issue 2284. @@ -356,8 +356,8 @@ class ClassName string fixedCode = string.Format(template, shortForm); DiagnosticResult expected = Diagnostic().WithLocation(7, 9); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); + await VerifyCSharpDiagnosticAsync(fixedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1127UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1127UnitTests.cs index 2d2611776..12f64854e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1127UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1127UnitTests.cs @@ -35,7 +35,7 @@ public static IEnumerable GetTypeDeclarationTests() [MemberData(nameof(GetNullTests))] public async Task TestNullScenariosAsync(string declaration) { - await VerifyCSharpDiagnosticAsync(declaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(declaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -46,7 +46,7 @@ public async Task TestViolationWithTypeDeclarationAsync(string declaration, stri var fixedCode = $"{fixedDeclaration}"; var expected = Diagnostic().WithLocation(1, column); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -65,7 +65,7 @@ private void Method() {{ }} }}"; var expected = Diagnostic().WithLocation(4, 30); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -87,7 +87,7 @@ private void Method() { } }"; var expected = Diagnostic().WithLocation(5, 30); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -111,7 +111,7 @@ private void Method( { } }"; var expected = Diagnostic().WithLocation(6, 16); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -135,7 +135,7 @@ private void Method() {{ }} }}"; var expected = Diagnostic().WithLocation(6, 30); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -159,7 +159,7 @@ private void Method() #endregion }}"; var expected = Diagnostic().WithLocation(5, 30); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -178,7 +178,7 @@ private string Method() => typeof(T).Name; }}"; var expected = Diagnostic().WithLocation(4, 32); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -204,7 +204,7 @@ T Method() }} }}"; var expected = Diagnostic().WithLocation(3, 14); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -222,7 +222,7 @@ T GenericMethod() where T : class; }}"; var expected = Diagnostic().WithLocation(4, 26); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -245,7 +245,7 @@ T GenericMethod() Diagnostic().WithLocation(4, 29), Diagnostic().WithLocation(4, 45), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -263,7 +263,7 @@ class Foo }}"; var expected = Diagnostic().WithLocation(2, 17); var expected2 = Diagnostic().WithLocation(2, 33); - await VerifyCSharpFixAsync(testCode, new[] { expected, expected2 }, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, new[] { expected, expected2 }, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -281,7 +281,7 @@ class Foo {{ }}"; var expected = Diagnostic().WithLocation(2, 17); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -304,7 +304,7 @@ private void Method() var expected = Diagnostic().WithLocation(4, 39); var expected2 = Diagnostic().WithLocation(4, 56); var expected3 = Diagnostic().WithLocation(4, 73); - await VerifyCSharpFixAsync(testCode, new[] { expected, expected2, expected3 }, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, new[] { expected, expected2, expected3 }, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -330,7 +330,7 @@ T GenericMethod() }} }}"; var expected = Diagnostic().WithLocation(5, 26); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -348,7 +348,7 @@ class Foo {{ }}"; var expected = Diagnostic().WithLocation(2, 17); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1128UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1128UnitTests.cs index a5c1b830e..886e72b8b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1128UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1128UnitTests.cs @@ -27,7 +27,7 @@ public static IEnumerable GetNullTests() [MemberData(nameof(GetNullTests))] public async Task TestNullScenariosAsync(string declaration) { - await VerifyCSharpDiagnosticAsync(declaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(declaration, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -49,7 +49,7 @@ public TypeName() } }"; var expected = Diagnostic().WithLocation(4, 23); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -79,7 +79,7 @@ public TypeName(int value) } }"; var expected = Diagnostic().WithLocation(4, 23); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -111,7 +111,7 @@ public TypeName(int value) } }"; var expected = Diagnostic().WithLocation(5, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -142,7 +142,7 @@ public TypeName(int value) } }"; var expected = Diagnostic().WithLocation(4, 23); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -172,7 +172,7 @@ public TypeName(int value) } }"; var expected = Diagnostic().WithLocation(4, 32); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1129UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1129UnitTests.cs index 3a84acdbb..ed0ed1d8c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1129UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1129UnitTests.cs @@ -47,7 +47,7 @@ public TestClass2(int x) } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -78,7 +78,7 @@ public TestStruct(int x) } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -126,7 +126,7 @@ private struct TestStruct Diagnostic().WithLocation(1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -181,7 +181,7 @@ public void TestMethod() { Sources = { fixedTestCode }, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -239,7 +239,7 @@ private struct TestStruct Diagnostic().WithLocation(1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -286,7 +286,7 @@ public T TestMethod2() Diagnostic().WithLocation(0), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -327,7 +327,7 @@ public void TestMethod() }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -368,7 +368,7 @@ public void TestMethod() }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -411,7 +411,7 @@ public void TestMethod() TestCode = testCode, FixedCode = fixedTestCode, CodeActionValidationMode = CodeActionValidationMode.None, // Differences in syntax nodes (SimpleMemberAccessExpression vs QualifiedName) - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -455,7 +455,7 @@ private struct {typeName} }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -491,7 +491,7 @@ public class TestClass }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -533,7 +533,7 @@ private enum MyEnum {{ {declarationBody} }} Diagnostic().WithLocation(0), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -574,7 +574,7 @@ private enum MyEnum {{ {declarationBody} }} Diagnostic().WithLocation(0), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -619,7 +619,7 @@ public class TestClass }} "; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1130UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1130UnitTests.cs index cced40910..521414aa4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1130UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1130UnitTests.cs @@ -65,7 +65,7 @@ public void Test() Diagnostic().WithLocation(8, 26), Diagnostic().WithLocation(9, 31), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -103,7 +103,7 @@ public void Test() var expected = Diagnostic().WithLocation(12, 14); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -129,7 +129,7 @@ public void Test() Test(delegate { }); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -178,7 +178,7 @@ public void Test() }"; var expected = Diagnostic().WithLocation(18, 14); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -240,7 +240,7 @@ private void Method(object o) test.ExpectedDiagnostics.AddRange(expected); test.RemainingDiagnostics.AddRange(expectedAfterFix); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -279,7 +279,7 @@ public void Test() Diagnostic().WithLocation(9, 36), Diagnostic().WithLocation(10, 37), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -367,7 +367,7 @@ public static void TestMethod2(TestDelegate testDelegate) Diagnostic().WithLocation(25, 25), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -391,7 +391,7 @@ public void Test() var expected = DiagnosticResult.CompilerError("CS1660").WithLocation(13, 14); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -433,7 +433,7 @@ public void Test() Diagnostic().WithLocation(12, 28), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -468,7 +468,7 @@ public void Test() } }"; var expected = Diagnostic().WithLocation(12, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -494,7 +494,7 @@ public void Test() new TypeName(delegate { }); } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -541,7 +541,7 @@ public void Test() } }"; var expected = Diagnostic().WithLocation(18, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -576,7 +576,7 @@ public void Test() } }"; var expected = Diagnostic().WithLocation(12, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -600,7 +600,7 @@ public void Test() int _ = this[delegate { }]; } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -647,7 +647,7 @@ public void Test() } }"; var expected = Diagnostic().WithLocation(18, 22); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -670,7 +670,7 @@ public unsafe class TypeName void Caller() => Method(delegate { }); }"; var expected = DiagnosticResult.CompilerError("CS1660").WithLocation(7, 29); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -697,7 +697,7 @@ static void Main(string[] args) DiagnosticResult.CompilerError("CS0103").WithLocation(10, 13), }; - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -770,7 +770,7 @@ public static EventHandler TestProperty1 Diagnostic().WithLocation(25, 49), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -799,7 +799,7 @@ public class TestClass Diagnostic().WithLocation(5, 47), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -826,7 +826,7 @@ public class TestClass test.ExpectedDiagnostics.AddRange(expected); test.RemainingDiagnostics.AddRange(expected); - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -864,7 +864,7 @@ public class TestClass Diagnostic().WithLocation(8, 16), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -914,7 +914,7 @@ private void Test2(string description = null, Func resolve = nul Diagnostic().WithSpan(8, 24, 8, 32), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -945,7 +945,7 @@ private void Test2(string description = null, Func resolve = nul .WithSpan(8, 15, 8, 27) .WithArguments("Test2", "unknownParam"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -992,7 +992,7 @@ public void Test() }} }}"; - await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, fixedCode, CancellationToken.None).ConfigureAwait(true); } protected virtual DiagnosticResult[] GetCompilerExpectedResultCodeFixSpecialCases() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1131UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1131UnitTests.cs index cec4977e4..8b7627dc7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1131UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1131UnitTests.cs @@ -51,7 +51,7 @@ public void Test() { Diagnostic().WithLocation(9, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -91,7 +91,7 @@ public void Test(bool argument) {{ }} { Diagnostic().WithLocation(9, 14), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -129,7 +129,7 @@ public void Test() { Diagnostic().WithLocation(9, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -165,7 +165,7 @@ public void Test() { Diagnostic().WithLocation(8, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -203,7 +203,7 @@ public void Test() { Diagnostic().WithLocation(9, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -235,7 +235,7 @@ public void Test() { Diagnostic().WithLocation(8, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -267,7 +267,7 @@ public void Test() { Diagnostic().WithLocation(8, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -313,7 +313,7 @@ struct TestStruct { Diagnostic().WithLocation(8, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -330,7 +330,7 @@ public void Test() if (j == i) { } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -353,7 +353,7 @@ public void Test() bool b = j {@operator} i; }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -376,7 +376,7 @@ public void Test() bool b = i {@operator} j; }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -399,7 +399,7 @@ public void Test() bool b = i {@operator} j; }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -422,7 +422,7 @@ public void Test() bool b = i {@operator} j; }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -445,7 +445,7 @@ public void Test() if (j {@operator} i) {{ }} }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -468,7 +468,7 @@ public void Test() bool b = j {@operator} i; }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -506,7 +506,7 @@ public void Test() { Diagnostic().WithLocation(9, 23), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -523,7 +523,7 @@ public void Test() [WorkItem(3677, "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3677")] public async Task TestSimpleMethodsAsync(string expr1, string expr2, bool shouldTrigger) { - await this.TestMethodAsync(expr1, expr2, shouldTrigger).ConfigureAwait(false); + await this.TestMethodAsync(expr1, expr2, shouldTrigger).ConfigureAwait(true); } [Theory] @@ -542,7 +542,7 @@ public async Task TestSimpleMethodsAsync(string expr1, string expr2, bool should [WorkItem(3759, "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3759")] public async Task TestComplexMethodsAsync(string expr1, string expr2, bool shouldTrigger) { - await this.TestMethodAsync(expr1, expr2, shouldTrigger).ConfigureAwait(false); + await this.TestMethodAsync(expr1, expr2, shouldTrigger).ConfigureAwait(true); } [Theory] @@ -566,7 +566,7 @@ public void Test(int x, int y, Func a) var r3 = a() {@operator} y; }} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private async Task TestMethodAsync(string expr1, string expr2, bool shouldTrigger) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1132UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1132UnitTests.cs index 9b48c2f28..9cab952c2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1132UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1132UnitTests.cs @@ -26,7 +26,7 @@ class Foo {declaration} }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -55,7 +55,7 @@ class Foo Diagnostic().WithLocation(5, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -81,7 +81,7 @@ class Foo }"; DiagnosticResult expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -103,7 +103,7 @@ class Foo }"; var expected = Diagnostic().WithLocation(4, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -123,7 +123,7 @@ class Foo DiagnosticResult.CompilerError(id).WithMessage(message).WithLocation(4, column), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -159,7 +159,7 @@ class TestAttribute : System.Attribute }"; var expected = Diagnostic().WithLocation(5, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -228,7 +228,7 @@ class Program Diagnostic().WithLocation(19, 9), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1133UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1133UnitTests.cs index 14f49d3fc..714799b12 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1133UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1133UnitTests.cs @@ -33,7 +33,7 @@ public class TestClass { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -50,7 +50,7 @@ public class TestClass { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -99,7 +99,7 @@ public void TestMethod() Diagnostic().WithLocation(9, 51), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -160,7 +160,7 @@ public void TestMethod() Diagnostic().WithLocation(14, 51), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -206,7 +206,7 @@ public class Ear : Attribute Diagnostic().WithLocation(line, column), }; - await VerifyCSharpFixAsync(codeBefore, expected, codeAfter, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(codeBefore, expected, codeAfter, CancellationToken.None).ConfigureAwait(true); } /// @@ -267,7 +267,7 @@ internal class BarAttribute : Attribute Diagnostic().WithLocation(7, 15), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -297,7 +297,7 @@ internal class BarAttribute : Attribute } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -410,7 +410,7 @@ public enum ImplicitUseKindFlags { Assign } Diagnostic().WithLocation(27, 21), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -454,7 +454,7 @@ internal class Foo Diagnostic().WithLocation(8, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1134UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1134UnitTests.cs index 98e10249e..6df0304c1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1134UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1134UnitTests.cs @@ -32,7 +32,7 @@ public class TestClass { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -91,7 +91,7 @@ namespace TestNamespace Diagnostic().WithLocation(13, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -127,7 +127,7 @@ public async Task VerifyMultipleAttributesOnSameLineForAssemblyAsync() Diagnostic().WithLocation(7, 31), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -161,7 +161,7 @@ namespace TestNamespace Diagnostic().WithLocation(4, 31), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -196,7 +196,7 @@ public class TestClass Diagnostic().WithLocation(3, 93), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -237,7 +237,7 @@ namespace TestNamespace Diagnostic().WithLocation(8, 50), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -319,7 +319,7 @@ public void TestMethod() { } Diagnostic().WithLocation(23, 54), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -381,7 +381,7 @@ public bool TestMethod2([In][MarshalAs(UnmanagedType.I4)] int value) Diagnostic().WithLocation(14, 9), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -408,7 +408,7 @@ public class TestClass<[Test(""Test1"")][Test(""Test2"")]T> } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -438,7 +438,7 @@ static void Main(string[] args) DiagnosticResult.CompilerError("CS1022").WithLocation(8, 1), }; - await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, testCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1135UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1135UnitTests.cs index df688261c..8a38fdf05 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1135UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1135UnitTests.cs @@ -37,7 +37,7 @@ namespace System.Threading Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorNamespace).WithLocation(5, 5).WithArguments("System.Threading.Tasks"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -62,7 +62,7 @@ namespace System.Threading Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorNamespace).WithLocation(5, 5).WithArguments("System.Threading.Tasks"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -87,7 +87,7 @@ namespace System.Threading Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorType).WithLocation(5, 5).WithArguments("System.Threading.Tasks.Task"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -100,7 +100,7 @@ namespace System.Threading using global::System.Threading.Tasks; }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -125,7 +125,7 @@ namespace System.Threading Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorNamespace).WithLocation(5, 5).WithArguments("System.Threading.Tasks"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -140,7 +140,7 @@ namespace Namespace } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -165,7 +165,7 @@ namespace System.Collections Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorType).WithLocation(4, 5).WithArguments("System.Collections.Generic.Dictionary"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -180,7 +180,7 @@ class Class { } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -191,7 +191,7 @@ public async Task TestFullyQualifiedAliasAsync() using Example = System.ValueTuple; "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -203,7 +203,7 @@ public async Task TestFullyQualifiedAliasWithUnresolvedTypeParameterAsync() "; var expected = DiagnosticResult.CompilerError("CS0234").WithLocation(2, 54).WithMessage("The type or namespace name 'List' does not exist in the namespace 'System.Collections' (are you missing an assembly reference?)"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -216,7 +216,7 @@ namespace Test { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -228,7 +228,7 @@ public async Task TestFullyQualifiedAliasWithWrappedTypeArgumentsAsync() System.Int32>; "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -294,7 +294,7 @@ namespace Test Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorType).WithLocation(21, 5).WithArguments("System.ValueTuple"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -306,7 +306,7 @@ namespace MyNamespace { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -321,7 +321,7 @@ namespace TestNamespace "; var expected = new DiagnosticResult("CS7003", DiagnosticSeverity.Error).WithLocation(4, 48).WithMessage("Unexpected use of an unbound generic name"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -335,7 +335,7 @@ namespace TestNamespace } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -349,7 +349,7 @@ namespace TestNamespace } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -367,7 +367,7 @@ class MyClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -380,7 +380,7 @@ namespace TestNamespace using Example = System.Collections.Immutable.ImmutableDictionary.Builder; } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -401,7 +401,7 @@ namespace System "; var expected = Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorType).WithLocation(4, 5).WithArguments("System.Collections.Generic.List>"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -414,7 +414,7 @@ namespace TestNamespace using Example = System.Collections.Generic.List; } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -427,7 +427,7 @@ namespace TestNamespace using Example = System.Nullable; } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -441,7 +441,7 @@ namespace System } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -467,7 +467,7 @@ namespace System.Threading Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorType).WithLocation(4, 5).WithArguments("System.Console"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -493,7 +493,7 @@ namespace System.Collections Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorType).WithLocation(4, 5).WithArguments("System.Collections.Generic.Dictionary"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -518,7 +518,7 @@ namespace System.Collections Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorType).WithLocation(4, 5).WithArguments("System.Collections.Generic.Dictionary"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -543,7 +543,7 @@ namespace System.Collections Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorType).WithLocation(4, 5).WithArguments("System.Collections.Generic.Dictionary>"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -570,7 +570,7 @@ namespace System.Collections .WithArguments("System.Collections.Generic.Dictionary"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -583,7 +583,7 @@ namespace System.Collections } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -611,7 +611,7 @@ namespace System.Collections Diagnostic(SA1135UsingDirectivesMustBeQualified.DescriptorType).WithLocation(5, 5).WithArguments("System.Collections.Generic.Dictionary"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -623,7 +623,7 @@ namespace System.Collections using Dictionary = System.Collections.Generic.Dictionary; } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1136UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1136UnitTests.cs index 1d30e5034..1ab286994 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1136UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1136UnitTests.cs @@ -49,7 +49,7 @@ public enum TestEnum Diagnostic().WithLocation(4, 30), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -67,7 +67,7 @@ public enum TestEnum } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -97,7 +97,7 @@ public enum TestEnum Diagnostic().WithLocation(4, 31), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -135,7 +135,7 @@ public enum TestEnum Diagnostic().WithLocation(6, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -155,7 +155,7 @@ public enum TestEnum DiagnosticResult.CompilerError("CS1514").WithMessage("{ expected").WithLocation(2, 21), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1137UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1137UnitTests.cs index f102533a4..30aabc881 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1137UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1137UnitTests.cs @@ -142,7 +142,7 @@ class MyAttribute : Attribute {{ }} Diagnostic().WithLocation(48, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -211,7 +211,7 @@ public async Task TestTypeDeclarationConstraintClausesAsync(string typeKind) Diagnostic().WithLocation(24, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -268,7 +268,7 @@ void Z2(){methodBody} Diagnostic().WithLocation(13, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -382,7 +382,7 @@ class MyAttribute : Attribute { } Diagnostic().WithLocation(36, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -454,7 +454,7 @@ class MyAttribute : Attribute { } Diagnostic().WithLocation(21, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -528,7 +528,7 @@ void TypeWithMultipleConstraints2() Diagnostic().WithLocation(26, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -608,7 +608,7 @@ class MyAttribute : Attribute { } Diagnostic().WithLocation(24, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -700,7 +700,7 @@ class MyAttribute : Attribute { } Diagnostic().WithLocation(30, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -780,7 +780,7 @@ class MyAttribute : Attribute { } Diagnostic().WithLocation(24, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -813,7 +813,7 @@ void MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -912,7 +912,7 @@ void MethodName() Diagnostic().WithLocation(35, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -933,7 +933,7 @@ class Container }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -978,7 +978,7 @@ class Container Diagnostic().WithLocation(12, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1021,7 +1021,7 @@ void ZeroAlignment( Diagnostic().WithLocation(12, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1070,7 +1070,7 @@ int this[ Diagnostic().WithLocation(15, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1113,7 +1113,7 @@ int ZeroAlignment(int x, int y, int z) => ZeroAlignment( Diagnostic().WithLocation(12, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1162,7 +1162,7 @@ class Container2 Diagnostic().WithLocation(15, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1231,7 +1231,7 @@ class MyAttribute : Attribute { } Diagnostic().WithLocation(20, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1314,7 +1314,7 @@ public MyAttribute(int value) { } Diagnostic().WithLocation(20, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1390,7 +1390,7 @@ void MethodName() Diagnostic().WithLocation(25, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1408,7 +1408,7 @@ void MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1536,7 +1536,7 @@ void MethodName() Diagnostic().WithLocation(47, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1643,7 +1643,7 @@ struct StructName } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1842,7 +1842,7 @@ struct StructName Diagnostic().WithLocation(77, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1876,7 +1876,7 @@ void SharedLineInitializersMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -1943,7 +1943,7 @@ void ZeroAlignmentMethod() Diagnostic().WithLocation(22, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -2017,7 +2017,7 @@ private class TestClass2 Diagnostic().WithLocation(21, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -2046,7 +2046,7 @@ public class TestClass2 } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1139UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1139UnitTests.cs index 52249a68c..8ff0703bb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1139UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1139UnitTests.cs @@ -60,7 +60,7 @@ public void Method() }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -134,7 +134,7 @@ public object Method() Diagnostic().WithLocation(4, 10 + literalType.Length), Diagnostic().WithLocation(8, 17), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnosticResult, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnosticResult, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -174,7 +174,7 @@ public void Method() }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -207,7 +207,7 @@ public void Method() }} }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -236,7 +236,7 @@ public void Method() .WithMessage($"Constant value '{castedLiteral}' cannot be converted to a '{type}' (use 'unchecked' syntax to override)") .WithLocation(6, 17), }; - await VerifyCSharpDiagnosticAsync(testCode, expectedDiagnosticResult, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expectedDiagnosticResult, CancellationToken.None).ConfigureAwait(true); } /// @@ -265,7 +265,7 @@ public void Method() }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -313,7 +313,7 @@ public void TestMethod() Diagnostic().WithLocation(10, 15), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnosticResult, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnosticResult, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1141UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1141UnitTests.cs index 6861b091d..2df5c9335 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1141UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1141UnitTests.cs @@ -42,7 +42,7 @@ public ValueTuple TestMethod(ValueTuple value) } "; - await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp6, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp6, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } //// TODO: Make sure that all paths are covered! diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SX1101UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SX1101UnitTests.cs index 9e025f0f3..2a31f4caa 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SX1101UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SX1101UnitTests.cs @@ -139,7 +139,7 @@ public void TestMethod2() Diagnostic().WithLocation(41, 25), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -166,7 +166,7 @@ public TestClass() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -184,7 +184,7 @@ public static void TestExtensionMethod(this System.AppDomain appDomain) } } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -204,7 +204,7 @@ public int this[int index] } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -231,7 +231,7 @@ public void TestMethod(int test) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -258,7 +258,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -281,7 +281,7 @@ static class ClassNameExtensions } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -302,7 +302,7 @@ void Method() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -321,7 +321,7 @@ int Value } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -339,7 +339,7 @@ class ClassName } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -362,7 +362,7 @@ object Property } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SequentialTestCollection.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SequentialTestCollection.cs index 6b7aa325b..5e2cbefa4 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SequentialTestCollection.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SequentialTestCollection.cs @@ -9,7 +9,7 @@ namespace StyleCop.Analyzers.Test /// Defines a collection for tests which cannot run in parallel with other tests. /// [CollectionDefinition(nameof(SequentialTestCollection), DisableParallelization = true)] - internal sealed class SequentialTestCollection + public sealed class SequentialTestCollection { } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/Settings/SettingsFileCodeFixProviderUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/Settings/SettingsFileCodeFixProviderUnitTests.cs index cc776b8f2..5978f6cc7 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/Settings/SettingsFileCodeFixProviderUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/Settings/SettingsFileCodeFixProviderUnitTests.cs @@ -47,7 +47,7 @@ public async Task TestMissingFileHeaderWithLeadingTriviaAsync() }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -71,7 +71,7 @@ public async Task TestSettingsFileDoesNotExistAsync() }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -91,7 +91,7 @@ public async Task TestSettingsFileAlreadyExistsAsync() }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -111,7 +111,7 @@ public async Task TestDotPrefixedSettingsFileAlreadyExistsAsync() }; test.TestBehaviors |= TestBehaviors.SkipSuppressionCheck; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/Settings/SettingsUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/Settings/SettingsUnitTests.cs index b8bf4e625..4200e049d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/Settings/SettingsUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/Settings/SettingsUnitTests.cs @@ -63,7 +63,7 @@ public async Task VerifyDefaultCultureIsReadCorrectlyAsync() } } "; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -114,7 +114,7 @@ public async Task VerifySettingsAreReadCorrectlyAsync() } } "; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -157,7 +157,7 @@ public async Task VerifyBooleanDocumentationSettingsAsync(bool value) }} }} "; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -187,7 +187,7 @@ public async Task VerifyDocumentationVariablesAsync() } } "; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -215,7 +215,7 @@ public async Task VerifySettingsWillUseCompanyNameInDefaultCopyrightTextAsync(st }} }} "; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -235,7 +235,7 @@ public async Task VerifyCircularReferenceBehaviorAsync() } } "; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -254,7 +254,7 @@ public async Task VerifyInvalidReferenceBehaviorAsync() } } "; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -278,7 +278,7 @@ public async Task VerifySettingsSupportsLineCommentsAsync() } } "; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -305,7 +305,7 @@ public async Task VerifySettingsSupportsBlockCommentsAsync() } } "; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -332,7 +332,7 @@ public async Task VerifySettingsSupportsTrailingCommasAsync() } } "; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -355,7 +355,7 @@ public async Task VerifySettingsFileNameSupportsDotPrefixAsync() } } "; - var context = await CreateAnalysisContextAsync(settings, ".stylecop.json").ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings, ".stylecop.json").ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -366,7 +366,7 @@ public async Task VerifySettingsFileNameSupportsDotPrefixAsync() public async Task VerifyInvalidJsonBehaviorAsync() { var settings = @"This is not a JSON file."; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); @@ -379,7 +379,7 @@ public async Task VerifyInvalidJsonBehaviorAsync() public async Task VerifyEmptyOrMissingFileAsync() { var settings = string.Empty; - var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(false); + var context = await CreateAnalysisContextAsync(settings).ConfigureAwait(true); var styleCopSettings = context.GetStyleCopSettingsInTests(CancellationToken.None); diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/NumberSignSpacingTestBase.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/NumberSignSpacingTestBase.cs index ae908808e..edad4fa89 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/NumberSignSpacingTestBase.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/NumberSignSpacingTestBase.cs @@ -62,7 +62,7 @@ void Foo() DiagnosticResult expected = this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 21); - await this.VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(testCode, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -96,12 +96,12 @@ void Foo() "; string test = string.Format(testFormat, this.Sign + "3"); - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, this.Sign + " 3"); DiagnosticResult expected = this.Diagnostic().WithArguments(" not", "followed").WithLocation(8, 17); - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -135,12 +135,12 @@ void Foo() "; string test = string.Format(testFormat, this.Sign + "3"); - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, this.Sign + " 3"); DiagnosticResult expected = this.Diagnostic().WithArguments(" not", "followed").WithLocation(8, 1); - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -172,7 +172,7 @@ void Foo() "; string test = string.Format(testFormat, " " + this.Sign + "3"); - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, this.Sign + "3"); DiagnosticResult[] expected = @@ -180,7 +180,7 @@ void Foo() this.Diagnostic().WithArguments(string.Empty, "preceded").WithLocation(7, 20), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, " " + this.Sign + " 3"); expected = @@ -189,7 +189,7 @@ void Foo() this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 21), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, this.Sign + " 3"); expected = @@ -199,7 +199,7 @@ void Foo() this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 20), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -231,12 +231,12 @@ void Foo() "; string test = string.Format(testFormat, this.Sign + "3"); - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, this.Sign + " 3"); DiagnosticResult expected = this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 25); - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -268,14 +268,14 @@ void Foo() "; string test = string.Format(testFormat, this.Sign + "3"); - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, " " + this.Sign + "3"); DiagnosticResult[] expected = { this.Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 27), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, this.Sign + " 3"); expected = @@ -283,7 +283,7 @@ void Foo() { this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 26), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, " " + this.Sign + " 3"); expected = @@ -292,7 +292,7 @@ void Foo() this.Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 27), this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 27), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -324,14 +324,14 @@ void Foo() "; string test = string.Format(testFormat, this.Sign + "3"); - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, " " + this.Sign + "3"); DiagnosticResult[] expected = { this.Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 23), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, this.Sign + " 3"); expected = @@ -339,7 +339,7 @@ void Foo() { this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 22), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, " " + this.Sign + " 3"); expected = @@ -348,7 +348,7 @@ void Foo() this.Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 23), this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 23), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -380,14 +380,14 @@ void Foo() "; string test = string.Format(testFormat, this.Sign + "0"); - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, " " + this.Sign + "0"); DiagnosticResult[] expected = { this.Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 32), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, this.Sign + " 0"); expected = @@ -395,7 +395,7 @@ void Foo() { this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 31), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, " " + this.Sign + " 0"); expected = @@ -404,7 +404,7 @@ void Foo() this.Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 32), this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 32), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -425,7 +425,7 @@ void Foo() }} "; - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -458,7 +458,7 @@ void Foo() "; string test = string.Format(testFormat, this.Sign + "3"); - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, this.Sign + " 3"); DiagnosticResult[] expected = @@ -466,7 +466,7 @@ void Foo() this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 31), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -499,7 +499,7 @@ void Foo() "; string test = string.Format(testFormat, " " + this.Sign + "3"); - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, " " + this.Sign + " 3"); DiagnosticResult[] expected = @@ -507,7 +507,7 @@ void Foo() this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 32), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -540,14 +540,14 @@ void Foo() "; string test = string.Format(testFormat, this.Sign + "0"); - await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpDiagnosticAsync(test, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, " " + this.Sign + "0"); DiagnosticResult[] expected = { this.Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 28), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, this.Sign + " 0"); expected = @@ -555,7 +555,7 @@ void Foo() { this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 27), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); test = string.Format(testFormat, " " + this.Sign + " 0"); expected = @@ -564,7 +564,7 @@ void Foo() this.Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 28), this.Diagnostic().WithArguments(" not", "followed").WithLocation(7, 28), }; - await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(false); + await this.VerifyCSharpFixAsync(test, expected, fixedTest, CancellationToken.None).ConfigureAwait(true); } private DiagnosticResult Diagnostic() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1000UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1000UnitTests.cs index a541d6647..76e89426d 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1000UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1000UnitTests.cs @@ -30,7 +30,7 @@ public async Task TestCatchallStatementAsync() } "; - await this.TestKeywordStatementAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(true); } [Fact] @@ -52,11 +52,11 @@ public async Task TestCatchStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("catch", string.Empty, "followed").WithLocation(15, 1); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -74,11 +74,11 @@ public async Task TestFixedStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("fixed", string.Empty, "followed").WithLocation(13, 1); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -94,11 +94,11 @@ public async Task TestForStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("for", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -114,11 +114,11 @@ public async Task TestForeachStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("foreach", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -128,11 +128,11 @@ public async Task TestFromStatementAsync() string statementWithSpace = @"var result = from @x in new int[3] select x;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("from", string.Empty, "followed").WithLocation(12, 26); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -146,11 +146,11 @@ group@x by x.A into z group @x by x.A into z select z;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("group", string.Empty, "followed").WithLocation(13, 1); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -166,11 +166,11 @@ public async Task TestIfStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("if", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -180,11 +180,11 @@ public async Task TestInStatementAsync() string statementWithSpace = @"var y = new int[3]; var result = from x in @y select x;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("in", string.Empty, "followed").WithLocation(12, 53); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -198,11 +198,11 @@ group x by x.A into@z group x by x.A into @z select z;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("into", string.Empty, "followed").WithLocation(13, 16); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -216,11 +216,11 @@ public async Task TestJoinStatementAsync() join @a in new[] { new { B = 3 } } on x.A equals a.B select x;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("join", string.Empty, "followed").WithLocation(13, 1); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -234,11 +234,11 @@ public async Task TestLetStatementAsync() let @z = 3 select x;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("let", string.Empty, "followed").WithLocation(13, 1); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -254,11 +254,11 @@ public async Task TestLockStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("lock", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -272,11 +272,11 @@ public async Task TestOrderbyStatementAsync() orderby (x.A) select x;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("orderby", string.Empty, "followed").WithLocation(13, 1); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -286,11 +286,11 @@ public async Task TestReturnVoidStatementAsync() string statementWithSpace = @"return ;"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("return", " not", "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -300,11 +300,11 @@ public async Task TestReturnIntStatementAsync() string statementWithSpace = @"return (3);"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, returnType: "int").ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, returnType: "int").ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("return", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace, returnType: "int").ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace, returnType: "int").ConfigureAwait(true); } [Fact] @@ -314,11 +314,11 @@ public async Task TestSelectStatementAsync() string statementWithSpace = @"var result = from x in new int[3] select @x;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("select", string.Empty, "followed").WithLocation(12, 47); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -328,11 +328,11 @@ public async Task TestStackallocStatementAsync() string statementWithSpace = @"int* x = stackalloc @Int32[3];"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("stackalloc", string.Empty, "followed").WithLocation(12, 22); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -352,11 +352,11 @@ public async Task TestSwitchStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("switch", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -366,11 +366,11 @@ public async Task TestThrowStatementAsync() string statementWithSpace = @"throw (new Exception());"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("throw", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -394,11 +394,11 @@ public async Task TestRethrowStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("throw", " not", "followed").WithLocation(17, 5); - await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -414,11 +414,11 @@ public async Task TestUsingStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("using", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -432,11 +432,11 @@ public async Task TestWhereStatementAsync() where (x.A) select x;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("where", string.Empty, "followed").WithLocation(13, 1); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -452,11 +452,11 @@ public async Task TestWhileStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("while", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -465,7 +465,7 @@ public async Task TestYieldReturnStatementAsync() // There is no way to have a 'yield' keyword which is not followed by a space. All we need to do is verify // that no diagnostic is reported for its use with a space. string statementWithSpace = @"yield return 3;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, returnType: "IEnumerable").ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, returnType: "IEnumerable").ConfigureAwait(true); } [Fact] @@ -474,7 +474,7 @@ public async Task TestYieldBreakStatementAsync() // There is no way to have a 'yield' keyword which is not followed by a space. All we need to do is verify // that no diagnostic is reported for its use with a space. string statementWithSpace = @"yield break;"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, returnType: "IEnumerable").ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, returnType: "IEnumerable").ConfigureAwait(true); } [Fact] @@ -484,21 +484,21 @@ public async Task TestCheckedStatementAsync() string statementWithSpace = @"int x = checked (3);"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("checked", " not", "followed").WithLocation(12, 21); - await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); statementWithoutSpace = @"checked{ };"; statementWithSpace = @"checked { };"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); expected = Diagnostic().WithArguments("checked", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -518,11 +518,11 @@ public async Task TestDefaultCaseStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("default", " not", "followed").WithLocation(14, 1); - await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -532,11 +532,11 @@ public async Task TestDefaultValueStatementAsync() string statementWithSpace = @"int x = default (int);"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("default", " not", "followed").WithLocation(12, 21); - await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -546,11 +546,11 @@ public async Task TestNameofStatementAsync() string statementWithSpace = @"string x = nameof (x);"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("nameof", " not", "followed").WithLocation(12, 24); - await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -560,11 +560,11 @@ public async Task TestSizeofStatementAsync() string statementWithSpace = @"int x = sizeof (int);"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("sizeof", " not", "followed").WithLocation(12, 21); - await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -574,11 +574,11 @@ public async Task TestTypeofStatementAsync() string statementWithSpace = @"Type x = typeof (int);"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("typeof", " not", "followed").WithLocation(12, 22); - await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -588,21 +588,21 @@ public async Task TestUncheckedStatementAsync() string statementWithSpace = @"int x = unchecked (3);"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("unchecked", " not", "followed").WithLocation(12, 21); - await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); statementWithoutSpace = @"unchecked{ };"; statementWithSpace = @"unchecked { };"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); expected = Diagnostic().WithArguments("unchecked", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -612,11 +612,11 @@ public async Task TestNewObjectStatementAsync() string statementWithSpace = @"int x = new @Int32();"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("new", string.Empty, "followed").WithLocation(12, 21); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -626,11 +626,11 @@ public async Task TestNewArrayStatementAsync() string statementWithSpace = @"int[] x = new @Int32[3];"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("new", string.Empty, "followed").WithLocation(12, 23); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -640,10 +640,10 @@ public async Task TestNewImplicitArrayStatementAsync() string statementWithSpace = @"int[] x = new [] { 3 };"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); // this case is handled by SA1026, so it shouldn't be reported here - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -654,10 +654,10 @@ public async Task TestVarIdentifierAsync() string statementWithSpace = @"int[] x = null; x.Select(var => var .ToString());"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); // this case is handled by SA1019, so it shouldn't be reported here - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); } /// @@ -673,10 +673,10 @@ public async Task TestVarIdentifierInvocationAsync() string statementWithSpace = @"Func[] x = null; x.Select(var => var ());"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); // this case is handled by SA1008, so it shouldn't be reported here - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -690,11 +690,11 @@ public async Task TestNewConstructorContraintStatement_TypeAsync() { }"; - await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("new", " not", "followed").WithLocation(9, 39); - await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -708,11 +708,11 @@ public async Task TestNewConstructorContraintStatement_TypeWithMultipleConstrain { }"; - await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("new", " not", "followed").WithLocation(9, 52); - await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -726,11 +726,11 @@ public async Task TestNewConstructorContraintStatement_TypeWithClassConstraintsA { }"; - await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("new", " not", "followed").WithLocation(9, 46); - await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -744,11 +744,11 @@ public async Task TestNewConstructorContraintStatement_MethodAsync() { }"; - await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("new", " not", "followed").WithLocation(9, 40); - await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -762,11 +762,11 @@ public async Task TestNewConstructorContraintStatement_MethodWithMultipleConstra { }"; - await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("new", " not", "followed").WithLocation(9, 53); - await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -780,11 +780,11 @@ public async Task TestNewConstructorContraintStatement_MethodWithClassConstraint { }"; - await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("new", " not", "followed").WithLocation(9, 47); - await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(false); + await this.TestKeywordDeclarationAsync(statementWithSpace, expected, statementWithoutSpace).ConfigureAwait(true); } [Fact] @@ -794,8 +794,8 @@ public async Task TestAwaitIdentifierAsync() string statementWithSpace = @"var result = await (default(Task));"; - await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace, asyncMethod: false).ConfigureAwait(false); - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, asyncMethod: false).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace, asyncMethod: false).ConfigureAwait(true); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, asyncMethod: false).ConfigureAwait(true); } [Fact] @@ -805,11 +805,11 @@ public async Task TestAwaitStatementAsync() string statementWithSpace = @"var result = await (default(Task));"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, asyncMethod: true).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace, asyncMethod: true).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("await", string.Empty, "followed").WithLocation(12, 26); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace, asyncMethod: true).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace, asyncMethod: true).ConfigureAwait(true); } [Fact] @@ -831,11 +831,11 @@ public async Task TestCaseStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("case", string.Empty, "followed").WithLocation(14, 1); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -863,11 +863,11 @@ public async Task TestGotoCaseStatementAsync() } "; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("case", string.Empty, "followed").WithLocation(15, 10); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -877,11 +877,11 @@ public async Task TestVarKeywordAsync() string statementWithSpace = @"var @x = ""test"";"; - await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments("var", string.Empty, "followed").WithLocation(12, 13); - await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestKeywordStatementAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -898,7 +898,7 @@ void MethodName() "; var expected = DiagnosticResult.CompilerError("CS0742").WithMessage("A query body must end with a select clause or a group clause").WithLocation(6, 42); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -928,7 +928,7 @@ void MethodName() "; var expected = Diagnostic().WithArguments("if", string.Empty, "followed").WithLocation(6, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } protected Task TestKeywordStatementAsync(string statement, DiagnosticResult expected, string fixedStatement, string returnType = "void", bool asyncMethod = false, LanguageVersion? languageVersion = default) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1001UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1001UnitTests.cs index 5969e9a03..d1ff7f66b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1001UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1001UnitTests.cs @@ -25,7 +25,7 @@ public class SA1001UnitTests public async Task TestSpaceAfterCommaAsync() { string statement = "f(a, b);"; - await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(true); } [Fact] @@ -34,11 +34,11 @@ public async Task TestNoSpaceAfterCommaAsync() string statementWithoutSpace = @"f(a,b);"; string statementWithSpace = @"f(a, b);"; - await this.TestCommaInStatementOrDeclAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statementWithSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithSpace).ConfigureAwait(true); DiagnosticResult expected = Diagnostic().WithArguments(string.Empty, "followed").WithLocation(7, 16); - await this.TestCommaInStatementOrDeclAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statementWithoutSpace, expected, statementWithSpace).ConfigureAwait(true); } [Fact] @@ -49,7 +49,7 @@ public async Task TestSpaceBeforeCommaAsync() DiagnosticResult expected = Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 17); - await this.TestCommaInStatementOrDeclAsync(spaceBeforeComma, expected, spaceOnlyAfterComma).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(spaceBeforeComma, expected, spaceOnlyAfterComma).ConfigureAwait(true); } [Fact] @@ -60,14 +60,14 @@ public async Task TestSpaceBeforeCommaAtEndOfLineAsync() DiagnosticResult expected = Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 17); - await this.TestCommaInStatementOrDeclAsync(spaceBeforeComma, expected, spaceOnlyAfterComma).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(spaceBeforeComma, expected, spaceOnlyAfterComma).ConfigureAwait(true); } [Fact] public async Task TestLastCommaInLineAsync() { string statement = $"f(a,{Environment.NewLine}b);"; - await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(true); } [Fact] @@ -78,7 +78,7 @@ public async Task TestFirstCommaInLineAsync() DiagnosticResult expected = Diagnostic().WithArguments(" not", "preceded").WithLocation(8, 1); - await this.TestCommaInStatementOrDeclAsync(testStatement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(testStatement, expected, fixedStatement).ConfigureAwait(true); } [Fact] @@ -89,7 +89,7 @@ public async Task TestCommentBeforeFirstCommaInLineAsync() DiagnosticResult expected = Diagnostic().WithArguments(" not", "preceded").WithLocation(8, 1); - await this.TestCommaInStatementOrDeclAsync(testStatement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(testStatement, expected, fixedStatement).ConfigureAwait(true); } [Fact] @@ -100,14 +100,14 @@ public async Task TestSpaceBeforeCommaFollowedByAngleBracketInFuncTypeAsync() DiagnosticResult expected = Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 41); - await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(true); } [Fact] public async Task TestCommaFollowedByAngleBracketInFuncTypeAsync() { string statement = @"var a = typeof(System.Func<,>);"; - await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(true); } [Fact] @@ -115,7 +115,7 @@ public async Task TestCommaFollowedBySpaceFollowedByAngleBracketInFuncTypeAsync( { // This is correct by SA1001, and reported as an error by SA1015 string statement = @"var a = typeof(System.Func<, >);"; - await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(true); } [Fact] @@ -126,14 +126,14 @@ public async Task TestSpaceBeforeCommaFollowedByCommaInFuncTypeAsync() DiagnosticResult expected = Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 41); - await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(true); } [Fact] public async Task TestCommaFollowedByCommaInFuncTypeAsync() { string statement = @"var a = typeof(System.Func<,,>);"; - await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(true); } [Fact] @@ -143,14 +143,14 @@ public async Task TestCommaFollowedBySpaceFollowedByCommaInFuncTypeAsync() string fixedStatement = @"var a = typeof(System.Func<,,>);"; DiagnosticResult expected = Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 42); - await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(true); } [Fact] public async Task TestCommaFollowedByBracketInArrayDeclAsync() { string statement = @"int[,] myArray;"; - await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, DiagnosticResult.EmptyDiagnosticResults, statement).ConfigureAwait(true); } [Fact] @@ -161,7 +161,7 @@ public async Task TestSpaceBeforeCommaFollowedByBracketInArrayDeclAsync() DiagnosticResult expected = Diagnostic().WithArguments(" not", "preceded").WithLocation(7, 19); - await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(true); } [Fact] @@ -175,7 +175,7 @@ public async Task TestSpaceBeforeCommaWhenPartOfInterpolationAlignmentClauseAsyn DiagnosticResult expected = Diagnostic().WithArguments(" not", "preceded").WithLocation(8, 29); - await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(true); } [Fact] @@ -189,7 +189,7 @@ public async Task TestSpaceAfterCommaWhenPartOfInterpolationAlignmentClauseAsync DiagnosticResult expected = Diagnostic().WithArguments(" not", "followed").WithLocation(8, 28); - await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(true); } [Fact] @@ -207,7 +207,7 @@ public async Task TestSpaceBeforeAndAfterCommaWhenPartOfInterpolationAlignmentCl Diagnostic().WithArguments(" not", "followed").WithLocation(8, 29), }; - await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(true); } [Fact] @@ -224,7 +224,7 @@ public async Task TestSpaceAfterCommaWithMinusWhenPartOfInterpolationAlignmentCl Diagnostic().WithArguments(" not", "followed").WithLocation(8, 28), }; - await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(true); } [Fact] @@ -241,7 +241,7 @@ public async Task TestSpaceAfterCommaWithPlusWhenPartOfInterpolationAlignmentCla Diagnostic().WithArguments(" not", "followed").WithLocation(8, 28), }; - await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(statement, expected, fixedStatement).ConfigureAwait(true); } [Fact] @@ -256,7 +256,7 @@ public async Task TestSpaceOnlyBeforeCommaAsync() Diagnostic().WithArguments(string.Empty, "followed").WithLocation(7, 17), }; - await this.TestCommaInStatementOrDeclAsync(spaceOnlyBeforeComma, expected, spaceOnlyAfterComma).ConfigureAwait(false); + await this.TestCommaInStatementOrDeclAsync(spaceOnlyBeforeComma, expected, spaceOnlyAfterComma).ConfigureAwait(true); } [Fact] @@ -273,7 +273,7 @@ void MethodName() "; DiagnosticResult expected = DiagnosticResult.CompilerError("CS1003").WithMessage("Syntax error, ',' expected").WithLocation(6, 25); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -299,7 +299,7 @@ void MethodName() "; DiagnosticResult expected = Diagnostic().WithArguments(string.Empty, "followed").WithLocation(6, 24); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -346,7 +346,7 @@ public void TestMethod() Diagnostic().WithArguments(string.Empty, "followed").WithLocation(11, 12), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -366,7 +366,7 @@ partial struct Money : IFormattable var expected = DiagnosticResult.EmptyDiagnosticResults; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -386,7 +386,7 @@ partial struct Money : IFormattable var expected = DiagnosticResult.EmptyDiagnosticResults; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -406,7 +406,7 @@ partial struct Money : IFormattable var expected = DiagnosticResult.EmptyDiagnosticResults; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -425,7 +425,7 @@ partial struct Money : IFormattable var expected = DiagnosticResult.EmptyDiagnosticResults; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -454,7 +454,7 @@ partial struct Money : IFormattable, Diagnostic().WithLocation(0).WithArguments(" not", "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } private Task TestCommaInStatementOrDeclAsync(string originalStatement, DiagnosticResult expected, string fixedStatement) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1002UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1002UnitTests.cs index 9dbbc1e94..021ccc8e0 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1002UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1002UnitTests.cs @@ -52,7 +52,7 @@ void MethodName() Diagnostic().WithArguments(string.Empty, "followed").WithLocation(6, 27), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -86,7 +86,7 @@ void MethodName() Diagnostic().WithArguments(string.Empty, "followed").WithLocation(6, 14), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -116,7 +116,7 @@ int MethodName() Diagnostic().WithArguments(" not", "preceded").WithLocation(6, 18), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -146,7 +146,7 @@ void MethodName() Diagnostic().WithArguments(" not", "preceded").WithLocation(6, 16), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -193,7 +193,7 @@ int MethodName() Diagnostic().WithArguments(" not", "preceded").WithLocation(13, 19), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -209,7 +209,7 @@ void MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -229,7 +229,7 @@ void MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -264,7 +264,7 @@ int PropertyName Diagnostic().WithArguments(string.Empty, "followed").WithLocation(8, 32), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -285,7 +285,7 @@ class ClassName DiagnosticResult expected = Diagnostic().WithArguments(string.Empty, "followed").WithLocation(4, 17); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -308,7 +308,7 @@ Comment Line 2 */ DiagnosticResult expected = Diagnostic().WithArguments(string.Empty, "followed").WithLocation(4, 17); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -336,7 +336,7 @@ void MethodName() DiagnosticResult expected = Diagnostic().WithArguments(" not", "preceded").WithLocation(6, 68); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -363,7 +363,7 @@ void MethodName() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -384,7 +384,7 @@ int x DiagnosticResult.CompilerError("CS1002").WithMessage("; expected").WithLocation(6, 14), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -393,7 +393,7 @@ public async Task TestSemiColonAtEndOfFileAsync() { string testCode = @"using System;"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1003UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1003UnitTests.cs index 7e1b50970..e115cb129 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1003UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1003UnitTests.cs @@ -76,7 +76,7 @@ public void Bar() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -194,7 +194,7 @@ public void Bar() Diagnostic(DescriptorNotFollowedByComment).WithLocation(12, 18).WithArguments("~"), Diagnostic(DescriptorNotFollowedByComment).WithLocation(14, 18).WithArguments("~"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -300,7 +300,7 @@ public unsafe void MethodName() Diagnostic(DescriptorNotFollowedByWhitespace).WithLocation(30, 10).WithArguments("++"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -326,7 +326,7 @@ public void Bar() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -404,7 +404,7 @@ public void Bar() Diagnostic(DescriptorFollowedByWhitespace).WithLocation(20, 23).WithArguments("=>"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -426,7 +426,7 @@ public void Bar() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -508,7 +508,7 @@ public void Bar(bool p1) Diagnostic(DescriptorPrecededByWhitespace).WithLocation(20, 27).WithArguments(":"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -527,7 +527,7 @@ public T Bar() where T : class } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -583,7 +583,7 @@ public T Bar3() where T : class Diagnostic(DescriptorFollowedByWhitespace).WithLocation(13, 31).WithArguments(":"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -608,7 +608,7 @@ public Foo(int value) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -703,7 +703,7 @@ public Foo(float value) : { Diagnostic(DescriptorNotAtEndOfLine).WithLocation(26, 29).WithArguments(":"), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } /// @@ -719,7 +719,7 @@ public async Task TestValidAutoPropertyInitializersAsync() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -757,7 +757,7 @@ public async Task TestInvalidAutoPropertyInitializersAsync() Diagnostic(DescriptorFollowedByWhitespace).WithLocation(7, 28).WithArguments("="), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -784,7 +784,7 @@ public int Bar(int p1) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -814,7 +814,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -835,7 +835,7 @@ public string TestMethod(int i) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -860,7 +860,7 @@ public void TestMethod2(int i) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -879,7 +879,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -898,7 +898,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -950,7 +950,7 @@ public class C1 Diagnostic(DescriptorFollowedByWhitespace).WithLocation(9, 35).WithArguments("=>"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -974,7 +974,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1021,7 +1021,7 @@ public void TestMethod() Diagnostic(DescriptorFollowedByWhitespace).WithSpan(8, 27, 8, 29).WithArguments(postfixOperator), Diagnostic(DescriptorPrecededByWhitespace).WithSpan(8, 29, 8, 30).WithArguments(":"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1066,7 +1066,7 @@ public void TestMethod() Diagnostic(DescriptorFollowedByWhitespace).WithSpan(7, 30, 7, 31).WithArguments(":"), Diagnostic(DescriptorPrecededByWhitespace).WithSpan(8, 29, 8, 30).WithArguments(":"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1110,7 +1110,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowedByWhitespace).WithSpan(7, 22, 7, 24).WithArguments(postfixOperator), Diagnostic(DescriptorNotFollowedByWhitespace).WithSpan(9, 22, 9, 24).WithArguments(postfixOperator), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1165,7 +1165,7 @@ static int Main(string[] args) Diagnostic(DescriptorNotFollowedByWhitespace).WithLocation(9, 11).WithArguments("!"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1004UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1004UnitTests.cs index 9546fed8e..eb278c7d6 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1004UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1004UnitTests.cs @@ -51,7 +51,7 @@ private void Method1(int x, int y) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -93,7 +93,7 @@ private void Method1(int x, int y) Diagnostic().WithLocation(8, 8), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -144,7 +144,7 @@ private void Method1() Diagnostic().WithLocation(12, 8), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -176,7 +176,7 @@ private void Method3() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -226,7 +226,7 @@ private void Method1(int x, int y) Diagnostic().WithLocation(9, 7), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -254,7 +254,7 @@ public void SomeMethod(int x, int y, {keyword} string z) _ => (LanguageVersion?)null, }; - await VerifyCSharpDiagnosticAsync(languageVersion, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(languageVersion, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1005UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1005UnitTests.cs index 28b492857..727cba90f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1005UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1005UnitTests.cs @@ -38,7 +38,7 @@ public class Bar } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -68,7 +68,7 @@ public class Bar var expected = Diagnostic().WithLocation(3, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -97,7 +97,7 @@ public class Bar "; var expected = Diagnostic().WithLocation(3, 5); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -119,7 +119,7 @@ public class SomeClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -136,7 +136,7 @@ public class SomeClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -152,7 +152,7 @@ public class SomeClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -168,7 +168,7 @@ public class SomeClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -184,7 +184,7 @@ public class SomeClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -203,7 +203,7 @@ public class SomeClass } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -231,7 +231,7 @@ public class SomeClass "; var expected = Diagnostic().WithLocation(3, 9); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -251,7 +251,7 @@ public class Bar } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -268,7 +268,7 @@ public class Bar { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); // Verify that this works if the project was configured to treat documentation comments as regular comments await new CSharpTest @@ -278,7 +278,7 @@ public class Bar DocumentationMode = DocumentationMode.None, Sources = { testCode }, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1006UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1006UnitTests.cs index a70a99ce5..3875c04e8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1006UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1006UnitTests.cs @@ -51,7 +51,7 @@ void MethodName() Diagnostic().WithArguments("endregion").WithLocation(8, 8), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -101,7 +101,7 @@ more invalid text Diagnostic().WithArguments("endif").WithLocation(14, 5), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -114,7 +114,7 @@ class ClassName # "; DiagnosticResult expected = DiagnosticResult.CompilerError("CS1024").WithMessage("Preprocessor directive expected").WithLocation(5, 1); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1007UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1007UnitTests.cs index 2e66bb581..fd93d619f 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1007UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1007UnitTests.cs @@ -57,7 +57,7 @@ public static explicit operator Diagnostic().WithLocation(10, 28), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -78,7 +78,7 @@ public static explicit bool(ClassName x) DiagnosticResult.CompilerError("CS1003").WithMessage("Syntax error, 'operator' expected").WithLocation(4, 28), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1008UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1008UnitTests.cs index 10c3445b0..c905b2112 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1008UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1008UnitTests.cs @@ -116,7 +116,7 @@ public void TestMethod2(int x) Diagnostic(DescriptorNotFollowed).WithLocation(20, 17), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostic, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -190,7 +190,7 @@ public void TestMethod3( Diagnostic(DescriptorNotFollowed).WithLocation(20, 32), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -274,7 +274,7 @@ public void TestMethod5(int x) Diagnostic(DescriptorNotFollowed).WithLocation(21, 33), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -344,7 +344,7 @@ public void TestMethod() Diagnostic(DescriptorNotPreceded).WithLocation(14, 29), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -401,7 +401,7 @@ public async Task TestMethod2() Diagnostic(DescriptorNotFollowed).WithLocation(14, 19), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -458,7 +458,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(11, 31), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -503,7 +503,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(8, 29), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -574,7 +574,7 @@ from x in (testList) Diagnostic(DescriptorNotFollowed).WithLocation(19, 24), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -631,7 +631,7 @@ public void TestMethod2() Diagnostic(DescriptorNotFollowed).WithLocation(14, 19), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -676,7 +676,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(8, 28), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -721,7 +721,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(8, 28), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -766,7 +766,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(8, 28), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -827,7 +827,7 @@ public TestClass() Diagnostic(DescriptorNotFollowed).WithLocation(15, 19), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -893,7 +893,7 @@ public TestClass(int x, int y) Diagnostic(DescriptorNotFollowed).WithLocation(18, 32), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -970,7 +970,7 @@ public void TestMethod() Diagnostic(DescriptorPreceded).WithLocation(19, 33), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1053,7 +1053,7 @@ public void TestMethod() Diagnostic(DescriptorPreceded).WithLocation(25, 33), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1119,7 +1119,7 @@ public void TestMethod() Diagnostic(DescriptorPreceded).WithLocation(15, 28), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1193,7 +1193,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(19, 30), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1246,7 +1246,7 @@ public int TestMethod2() Diagnostic(DescriptorNotFollowed).WithLocation(12, 20), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1309,7 +1309,7 @@ public void TestMethod(Stream s1, Stream s2) Diagnostic(DescriptorNotFollowed).WithLocation(14, 19), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1389,7 +1389,7 @@ public void TestMethod(HelperClass x) Diagnostic(DescriptorNotPreceded).WithLocation(23, 31), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1452,7 +1452,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(14, 18), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1527,7 +1527,7 @@ public void TestMethod(int x, int y) Diagnostic(DescriptorNotFollowed).WithLocation(17, 29), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1596,7 +1596,7 @@ public void TestMethod(int x) Diagnostic(DescriptorNotFollowed).WithLocation(16, 18), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1677,7 +1677,7 @@ public void TestMethod(int x) Diagnostic(DescriptorNotFollowed).WithLocation(21, 51), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1740,7 +1740,7 @@ public class TestClass Diagnostic(DescriptorNotFollowed).WithLocation(15, 49), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1811,7 +1811,7 @@ public void TestMethod3() Diagnostic(DescriptorNotFollowed).WithLocation(17, 19), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1841,7 +1841,7 @@ public void TestMethod2() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1890,7 +1890,7 @@ public void TestMethod1() Diagnostic(DescriptorNotFollowed).WithLocation(10, 35), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -1928,7 +1928,7 @@ public void TestMethod(int a, Action b) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1964,7 +1964,7 @@ public void TestMethod3() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -1989,7 +1989,7 @@ public void TestMethod() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -2034,7 +2034,7 @@ public void TestMethod() Diagnostic(DescriptorNotPreceded).WithLocation(11, 43), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -2063,7 +2063,7 @@ public void Method() var expected = Diagnostic().WithLocation(4, 27).WithArguments(" not", "preceded"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -2117,7 +2117,7 @@ public void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(13, 32), }; - await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expectedDiagnostics, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -2138,7 +2138,7 @@ class ClassName DiagnosticResult.CompilerError("CS1003").WithMessage("Syntax error, '(' expected").WithLocation(5, 15), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -2154,7 +2154,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -2171,7 +2171,7 @@ public async Task TestNoPreviousTokenAsync() CompilerDiagnostics = CompilerDiagnostics.None, }; - await test.RunAsync(CancellationToken.None).ConfigureAwait(false); + await test.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1009UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1009UnitTests.cs index 7c2c8365e..81eba33f5 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1009UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1009UnitTests.cs @@ -30,7 +30,7 @@ public void Method() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -55,7 +55,7 @@ public void Method() DiagnosticResult expected = Diagnostic(DescriptorNotPreceded).WithLocation(5, 25); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -80,7 +80,7 @@ public void Method() DiagnosticResult expected = Diagnostic(DescriptorNotPreceded).WithLocation(4, 28); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -107,7 +107,7 @@ public void Method() DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -122,7 +122,7 @@ public void Method(int param1, int param2) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -148,7 +148,7 @@ public void Method(int param1, int param2) DiagnosticResult expected = Diagnostic(DescriptorNotPreceded).WithLocation(5, 47); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -178,7 +178,7 @@ public void Method(int param1, int param2) DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(0); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -193,7 +193,7 @@ public Foo(int i) : base() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -219,7 +219,7 @@ public Foo(int i) : base() DiagnosticResult expected = Diagnostic(DescriptorFollowed).WithLocation(5, 21); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -230,7 +230,7 @@ public async Task TestLambdaExpressionWithNoSpaceAfterClosingParenthesisAsync() DiagnosticResult expected = Diagnostic(DescriptorFollowed).WithLocation(7, 48); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } /// @@ -248,8 +248,8 @@ public async Task TestNotReportedWhenFollowedByUnaryPlusOrMinusAsync(string oper var ignoredStatement = $"var i = (int) {operatorToken}2;"; var correctStatement = $"var i = (int){operatorToken}2;"; - await this.TestWhitespaceInStatementOrDeclAsync(ignoredStatement, null, DiagnosticResult.EmptyDiagnosticResults).ConfigureAwait(false); - await this.TestWhitespaceInStatementOrDeclAsync(correctStatement, null, DiagnosticResult.EmptyDiagnosticResults).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(ignoredStatement, null, DiagnosticResult.EmptyDiagnosticResults).ConfigureAwait(true); + await this.TestWhitespaceInStatementOrDeclAsync(correctStatement, null, DiagnosticResult.EmptyDiagnosticResults).ConfigureAwait(true); } [Fact] @@ -264,7 +264,7 @@ public async Task TestSpaceBeforeParenthisInIncrementingForLoopAsync() DiagnosticResult expected = Diagnostic(DescriptorNotPreceded).WithLocation(7, 41); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -279,7 +279,7 @@ public async Task TestSpaceBeforeParenthisInDecrementingForLoopAsync() DiagnosticResult expected = Diagnostic(DescriptorNotPreceded).WithLocation(7, 41); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -290,7 +290,7 @@ public async Task TestSpaceInCastAsync() DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(7, 25); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -301,7 +301,7 @@ public async Task TestSpaceInConstructorCallAsync() DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(7, 32); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -312,7 +312,7 @@ public async Task TestSpaceMethodCallFollowedByPropertyGetAsync() DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(7, 29); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -323,7 +323,7 @@ public async Task TestSpaceMethodCallFollowedByConditionalAccessPropertyGetAsync DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(7, 29); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -334,7 +334,7 @@ public async Task TestSpaceMethodCallFollowedByPointerDereferenceAsync() DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(7, 32); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -349,7 +349,7 @@ public async Task TestSpaceOperationInDoubleSetOfParenthesisAsync() Diagnostic(DescriptorNotPreceded).WithLocation(7, 30), }; - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Theory] @@ -368,7 +368,7 @@ public async Task TestSpaceIncrementOrDecrementOperatorFollowingParenthesisAsync DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(8, 15); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -379,7 +379,7 @@ public async Task TestSpaceBetweenClosingBraceAndParenthesisAsync() DiagnosticResult expected = Diagnostic(DescriptorNotPreceded).WithLocation(7, 49); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -390,7 +390,7 @@ public async Task TestSpaceClosingParenthesisFollowedByParenthesisPairAsync() DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(7, 40); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -401,7 +401,7 @@ public async Task TestSpaceParenthesisFollowedByBracketAsync() DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(7, 26); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -412,7 +412,7 @@ public async Task TestNoSpaceParenthesisFollowedByColonAsync() DiagnosticResult expected = Diagnostic(DescriptorFollowed).WithLocation(7, 33); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -423,7 +423,7 @@ public async Task TestNoSpaceParenthesisFollowedByQuestionAsync() DiagnosticResult expected = Diagnostic(DescriptorFollowed).WithLocation(7, 34); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } [Fact] @@ -434,7 +434,7 @@ public async Task TestWithSpaceFollowingInInterpolatedStringAsync() DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(7, 48); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatement, validStatement, expected).ConfigureAwait(true); } /// @@ -457,7 +457,7 @@ Written content... } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -574,7 +574,7 @@ public void TestMethod3(bool a, bool b) { } Diagnostic(DescriptorNotPreceded).WithLocation(42, 12), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -626,7 +626,7 @@ public void TestMethod3(bool a, bool b) { } Diagnostic(DescriptorFollowed).WithLocation(11, 25), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -730,7 +730,7 @@ public int TestMethod4(string[] args) Diagnostic(DescriptorNotPreceded).WithLocation(25, 17), }, NumberOfFixAllIterations = 2, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -758,7 +758,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic(DescriptorNotPreceded).WithLocation(6, 52); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -795,7 +795,7 @@ void Method() DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(8, 15); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -827,7 +827,7 @@ public async Task TestFollowedByBinaryOperatorAsync(string operatorToken) DiagnosticResult expected = Diagnostic(DescriptorFollowed).WithLocation(7, 27); - await this.TestWhitespaceInStatementOrDeclAsync(testCode, fixedCode, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(testCode, fixedCode, expected).ConfigureAwait(true); } /// @@ -845,7 +845,7 @@ public async Task TestFollowedByConditionalOperatorAsync(string operatorToken) DiagnosticResult expected = Diagnostic(DescriptorFollowed).WithLocation(7, 26); - await this.TestWhitespaceInStatementOrDeclAsync(testCode, fixedCode, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(testCode, fixedCode, expected).ConfigureAwait(true); } /// @@ -872,7 +872,7 @@ public async Task TestFollowedByAssignmentOperatorAsync(string operatorToken) DiagnosticResult expected = Diagnostic(DescriptorFollowed).WithLocation(7, 26); - await this.TestWhitespaceInStatementOrDeclAsync(testCode, fixedCode, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(testCode, fixedCode, expected).ConfigureAwait(true); } [Fact] @@ -893,7 +893,7 @@ class ClassName DiagnosticResult.CompilerError("CS1026").WithMessage(") expected").WithLocation(5, 16), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -909,7 +909,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -944,7 +944,7 @@ public async void TestMethod() Diagnostic(DescriptorNotPreceded).WithLocation(8, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -980,7 +980,7 @@ await Task.Delay(1000) Diagnostic(DescriptorNotPreceded).WithLocation(8, 13), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -1023,7 +1023,7 @@ public async void TestMethod(int x, int[] a) Diagnostic(DescriptorFollowed).WithLocation(9, 8 + stmt.Length), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } private async Task TestWhitespaceInStatementOrDeclAsync(string originalStatement, string? fixedStatement, params DiagnosticResult[] expected) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1010UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1010UnitTests.cs index 2eb472571..23320ed6e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1010UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1010UnitTests.cs @@ -42,7 +42,7 @@ public int this[[CLSCompliant(true)]int index] [Fact] public async Task TestValidSpacingOfOpenSquareBracketAsync() { - await VerifyCSharpDiagnosticAsync(ExpectedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(ExpectedCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -79,7 +79,7 @@ public int this [[CLSCompliant(true)]int index] Diagnostic(DescriptorNotPreceded).WithLocation(15, 29), }; - await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -115,7 +115,7 @@ public int this[ [CLSCompliant(true)]int index] Diagnostic(DescriptorNotFollowed).WithLocation(15, 28), }; - await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -158,7 +158,7 @@ public int this [ [CLSCompliant(true)]int index] Diagnostic(DescriptorNotFollowed).WithLocation(15, 30), }; - await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -180,7 +180,7 @@ public void TestMethod(IDictionary items) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -214,7 +214,7 @@ public void TestMethod(IDictionary items) } "; var expected = Diagnostic(DescriptorNotPreceded).WithLocation(8, 62); - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } // NOTE: This case is handled by SA1026, so it's intentionally allowed here @@ -232,7 +232,7 @@ public void TestMethod() } } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1011UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1011UnitTests.cs index 0ee38cc32..9df03a4e9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1011UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1011UnitTests.cs @@ -45,7 +45,7 @@ public int this[[CLSCompliant(true)]int index] } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -105,7 +105,7 @@ public int this[[CLSCompliant(true) ]int index] Diagnostic().WithLocation(15, 31).WithArguments(" not", "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -134,7 +134,7 @@ public Action[] TestMethod() }"; // spacing violations should be covered SA1010, SA1001, SA1009, SA1008, and then SA1002 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -158,7 +158,7 @@ public void TestMethod() "; // spacing violation should be reported by SA1019 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -179,7 +179,7 @@ public void TestMethod(object[] a) "; // spacing violation should be reported by SA1013 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -218,7 +218,7 @@ public int[] TestMethod(int[] a) Diagnostic().WithLocation(7, 30).WithArguments(string.Empty, "followed"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -251,7 +251,7 @@ public void TestMethod() DiagnosticResult expected = Diagnostic().WithLocation(8, 38).WithArguments(" not", "preceded"); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -264,7 +264,7 @@ public async Task TestClosingBracketFollowedByNoSpaceAndIncrementOrDecrementOper i[0]{0};", operatorText); - await this.TestWhitespaceInStatementOrDeclAsync(validStatament, null, DiagnosticResult.EmptyDiagnosticResults).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(validStatament, null, DiagnosticResult.EmptyDiagnosticResults).ConfigureAwait(true); } [Theory] @@ -284,7 +284,7 @@ public async Task TestClosingBracketFollowedBySpaceAndIncrementOrDecrementOperat DiagnosticResult expected = Diagnostic().WithLocation(8, 16).WithArguments(" not", "followed"); - await this.TestWhitespaceInStatementOrDeclAsync(invalidStatament, fixedStatament, expected).ConfigureAwait(false); + await this.TestWhitespaceInStatementOrDeclAsync(invalidStatament, fixedStatament, expected).ConfigureAwait(true); } [Fact] @@ -307,7 +307,7 @@ void Method() DiagnosticResult.CompilerError("CS1003").WithMessage("Syntax error, ']' expected").WithLocation(6, 28), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -327,7 +327,7 @@ public unsafe string TestMethod(int[] a) } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -345,7 +345,7 @@ void Method() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -363,7 +363,7 @@ void Method() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } private async Task TestWhitespaceInStatementOrDeclAsync(string originalStatement, string fixedStatement, params DiagnosticResult[] expected) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1012UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1012UnitTests.cs index 4efc2d01d..adc376e14 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1012UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1012UnitTests.cs @@ -39,7 +39,7 @@ public void TestMethod() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -53,7 +53,7 @@ public async Task TestHandlesEndOfFileAsync() {"; DiagnosticResult expected = DiagnosticResult.CompilerError("CS1513").WithLocation(2, 2).WithMessage("} expected"); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -105,7 +105,7 @@ public void TestMethod() Diagnostic().WithLocation(13, 20).WithArguments(" not", "followed"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -147,7 +147,7 @@ public class TestClass Diagnostic().WithLocation(8, 33).WithArguments(string.Empty, "followed"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -205,7 +205,7 @@ public void TestMethod() Diagnostic().WithLocation(13, 38).WithArguments(string.Empty, "followed"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -226,7 +226,7 @@ void Method() DiagnosticResult.CompilerError("CS1514").WithMessage("{ expected").WithLocation(6, 25), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1013UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1013UnitTests.cs index fda42aabb..87e943bc2 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1013UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1013UnitTests.cs @@ -38,7 +38,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -96,7 +96,7 @@ public void TestMethod(int a, int b) Diagnostic().WithLocation(3).WithArguments(" not", "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -131,7 +131,7 @@ public class TestClass Diagnostic().WithLocation(0).WithArguments(string.Empty, "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -185,7 +185,7 @@ public void TestMethod() Diagnostic().WithLocation(4).WithArguments(string.Empty, "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -208,7 +208,7 @@ public void TestMethod() "; // space between closing brace and closing parenthesis should be reported by SA1001 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -232,7 +232,7 @@ public void TestMethod() "; // space between closing brace and semicolon should be reported by SA1002 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -256,7 +256,7 @@ public void TestMethod() "; // space between closing brace and dot should be reported by SA1019 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -280,7 +280,7 @@ public void TestMethod() "; // space between closing brace and question dot should be reported by SA1019 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -335,7 +335,7 @@ public void TestMethod2() Diagnostic().WithLocation(1).WithArguments(string.Empty, "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -360,7 +360,7 @@ public void TestMethod() "; // no space between closing brace and closing bracket should not be reported by SA1013 - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -379,7 +379,7 @@ public async Task TestEndOfFileWithoutNewLineAsync(string declarationType) { var testCode = $"{declarationType} TestItem {{ }}"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -395,7 +395,7 @@ class ClassName DiagnosticResult.CompilerError("CS1513").WithMessage("} expected").WithLocation(0), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1014UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1014UnitTests.cs index c4f538f2c..1dc537a9a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1014UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1014UnitTests.cs @@ -38,7 +38,7 @@ public void TestMethod() { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -90,7 +90,7 @@ public class TestClass3 where T : IEnumerable Diagnostic().WithLocation(11, 52).WithArguments("followed"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -134,7 +134,7 @@ public class TestClass Diagnostic().WithLocation(8, 28).WithArguments("followed"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -212,7 +212,7 @@ public Action> TestMethod4() Diagnostic().WithLocation(20, 51).WithArguments("followed"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -280,7 +280,7 @@ public void TestMethod2() Diagnostic().WithLocation(19, 21).WithArguments("followed"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -308,7 +308,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1015UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1015UnitTests.cs index 9c7a3066c..90d3da8e8 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1015UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1015UnitTests.cs @@ -41,7 +41,7 @@ public void TestMethod() { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -88,7 +88,7 @@ public class TestClass3 where T : IEnumerable Diagnostic(DescriptorFollowed).WithLocation(11, 26), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -132,7 +132,7 @@ public class TestClass Diagnostic(DescriptorFollowed).WithLocation(9, 35), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -219,7 +219,7 @@ public Action> TestMethod5() Diagnostic(DescriptorNotFollowed).WithLocation(25, 50), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -297,7 +297,7 @@ public void TestMethod2() Diagnostic(DescriptorNotFollowed).WithLocation(20, 28), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -325,7 +325,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -337,7 +337,7 @@ public async Task TestUsingAliasAsync() { var testCode = @"using TestAction = System.Action;"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -357,7 +357,7 @@ public void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -376,7 +376,7 @@ void Method() var expected = this.GetExpectedResultMissingToken(); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -425,7 +425,7 @@ public void TestMethod2(object input) Diagnostic(DescriptorNotFollowed).WithLocation(2), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -448,7 +448,7 @@ private static void M() }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -474,7 +474,7 @@ private static void M() }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } protected virtual DiagnosticResult[] GetExpectedResultMissingToken() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1016UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1016UnitTests.cs index c51e66ba8..935e81305 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1016UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1016UnitTests.cs @@ -64,7 +64,7 @@ MyAttribute] T> sealed class MyAttribute : System.Attribute { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -114,7 +114,7 @@ class ClassName3 Diagnostic().WithLocation(12, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1017UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1017UnitTests.cs index cb3ce213d..9f519ec2b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1017UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1017UnitTests.cs @@ -64,7 +64,7 @@ ] T> sealed class MyAttribute : System.Attribute { } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -114,7 +114,7 @@ class ClassNam3 Diagnostic().WithLocation(12, 30), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -137,7 +137,7 @@ void MethodName() DiagnosticResult.CompilerError("CS1003").WithLocation(6, 28).WithMessage("Syntax error, ']' expected"), }; - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1018UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1018UnitTests.cs index 46686131f..547b46a37 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1018UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1018UnitTests.cs @@ -109,7 +109,7 @@ public void TestMethod() Diagnostic().WithLocation(13, 1), Diagnostic().WithLocation(19, 1), }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -131,7 +131,7 @@ private void Test() var expected = this.GetExpectedResultSyntaxErrorAtEndOfFile(); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } protected virtual DiagnosticResult[] GetExpectedResultSyntaxErrorAtEndOfFile() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1019UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1019UnitTests.cs index aa8148c2a..05e019f05 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1019UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1019UnitTests.cs @@ -50,7 +50,7 @@ public async Task TestSpaceBeforeOperatorAsync(string op) DiagnosticResult expected = Diagnostic(DescriptorNotPreceded).WithLocation(16, 27).WithArguments(op[0]); - await VerifyCSharpFixAsync(template, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(template, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -66,7 +66,7 @@ public async Task TestSpaceAfterOperatorAsync(string op) string fixedCode = this.GetTemplate($"{op}"); DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(16, 25 + op.Length).WithArguments(op.Last()); - await VerifyCSharpFixAsync(template, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(template, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -79,7 +79,7 @@ public async Task TestSpaceAfterOperatorAsync(string op) public async Task TestOperatorAtEndOfLineDoesNotReportAsync(string op) { string template = this.GetTemplate($"{op}{Environment.NewLine}"); - await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -92,7 +92,7 @@ public async Task TestOperatorAtEndOfLineDoesNotReportAsync(string op) public async Task TestOperatorAtStartOfLineDoesNotReportAsync(string op) { string template = this.GetTemplate($"{Environment.NewLine}{op}"); - await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -105,7 +105,7 @@ public async Task TestOperatorAtStartOfLineDoesNotReportAsync(string op) public async Task TestBlockCommentsEitherSideOfOperatorDoesNotReportAsync(string op) { string template = this.GetTemplate($"/**/{op}/**/"); - await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -118,7 +118,7 @@ public async Task TestBlockCommentsEitherSideOfOperatorDoesNotReportAsync(string public async Task TestCommentOnLinePrecedingOperatorDoesNotReportAsync(string op) { string template = this.GetTemplate($"// This is a comment{Environment.NewLine}{op}"); - await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -131,7 +131,7 @@ public async Task TestCommentOnLinePrecedingOperatorDoesNotReportAsync(string op public async Task TestCommentOnLineFollowingOperatorDoesNotReportAsync(string op) { string template = this.GetTemplate($"{op}{Environment.NewLine}// This is a comment{Environment.NewLine}"); - await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -145,7 +145,7 @@ public async Task TestCommentOnSameLineSeparatedByWhitespaceReportsAsync(string { string template = this.GetTemplate($"{op} // This is a comment{Environment.NewLine}"); DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(16, 25 + op.Length).WithArguments("."); - await VerifyCSharpDiagnosticAsync(template, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(template, expected, CancellationToken.None).ConfigureAwait(true); } /// @@ -158,7 +158,7 @@ public async Task TestCommentOnSameLineSeparatedByWhitespaceReportsAsync(string public async Task TestCommentOnSameLineImmediatelyAfterOperatorDoesNotReportsAsync(string op) { string template = this.GetTemplate($"{op}// This is a comment{Environment.NewLine}"); - await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -180,7 +180,7 @@ public void TestMethod() } }"; - await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(template, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -286,7 +286,7 @@ public unsafe void MethodName() Diagnostic(DescriptorNotFollowed).WithLocation(30, 12).WithArguments("->"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } /// diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1020UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1020UnitTests.cs index 329e11e7a..ecfe0a320 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1020UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1020UnitTests.cs @@ -44,7 +44,7 @@ void MethodName() }} "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -118,7 +118,7 @@ void MethodName() Diagnostic().WithLocation(20, 13).WithArguments(symbolName, symbol, "preceded"), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1023UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1023UnitTests.cs index 992252bfe..76b9d1fa3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1023UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1023UnitTests.cs @@ -49,7 +49,7 @@ unsafe void TestMethod() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -76,7 +76,7 @@ internal struct Obj } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -160,7 +160,7 @@ unsafe void TestMethod() Diagnostic(DescriptorNotFollowed).WithLocation(22, 17), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -185,7 +185,7 @@ public void TestMethod2() } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1024UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1024UnitTests.cs index 1281bc74c..6e907c09a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1024UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1024UnitTests.cs @@ -85,7 +85,7 @@ private int Bar(int value) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -129,7 +129,7 @@ private int Bar(int value) } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -177,7 +177,7 @@ private int Bar(int value) Diagnostic(DescriptorFollowed).WithLocation(10, 30), }; - await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -225,7 +225,7 @@ private int Bar(int value) Diagnostic(DescriptorPreceded).WithLocation(10, 29), }; - await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -274,7 +274,7 @@ private int Bar(int value) Diagnostic(DescriptorNotPreceded).WithLocation(24, 21), }; - await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -327,7 +327,7 @@ private int Bar(int value) Diagnostic(DescriptorFollowed).WithLocation(10, 29), }; - await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, ExpectedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1025UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1025UnitTests.cs index ad528a094..47a147b18 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1025UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1025UnitTests.cs @@ -55,7 +55,7 @@ public void TestMethod2( } "; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -77,7 +77,7 @@ public async Task TestMultipleWhitespaceInNamespaceDeclarationAsync() DiagnosticResult[] expected = { Diagnostic().WithLocation(1, 10) }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -113,7 +113,7 @@ public async Task TestMultipleWhitespaceInUsingStatementsAsync() Diagnostic().WithLocation(5, 21), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -151,7 +151,7 @@ public class TestClass : object where T : struct Diagnostic().WithLocation(3, 56), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -191,7 +191,7 @@ public void TestMethod(int a, int b) Diagnostic().WithLocation(5, 46), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -237,7 +237,7 @@ public int TestMethod(int a, int b) Diagnostic().WithLocation(8, 19), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -280,7 +280,7 @@ public class TestClass Diagnostic().WithLocation(7, 37), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -327,7 +327,7 @@ public void TestMethod() Diagnostic().WithLocation(7, 36), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -378,7 +378,7 @@ public int TestMethod(int a, int b) Diagnostic().WithLocation(8, 19), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -394,7 +394,7 @@ public async Task TrailingWhitespaceAfterStatementAsync() .AppendLine("}") .ToString(); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -406,7 +406,7 @@ public async Task TrailingWhitespaceAfterDeclarationAsync() .AppendLine("}") .ToString(); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -416,7 +416,7 @@ public async Task TrailingWhitespaceAfterSingleLineCommentAsync() .AppendLine("// hi there ") .ToString(); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -429,7 +429,7 @@ public async Task TrailingWhitespaceInsideMultiLineCommentAsync() .AppendLine("*/ ") .ToString(); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -442,7 +442,7 @@ public async Task TrailingWhitespaceInsideXmlDocCommentAsync() .AppendLine("class Foo { }") .ToString(); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -457,7 +457,7 @@ public async Task TrailingWhitespaceWithinAndAfterHereStringAsync() .AppendLine("}") .ToString(); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -476,7 +476,7 @@ public async Task TrailingWhitespaceAfterDirectivesAsync() .AppendLine("#endregion ") .ToString(); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -488,7 +488,7 @@ public async Task TrailingWhitespaceFoundWithinFalseConditionalDirectiveBlocksAs .AppendLine("#endif") .ToString(); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -502,7 +502,7 @@ public async Task NoTrailingWhitespaceAfterBlockCommentAsync() var expected = Diagnostic().WithLocation(1, 14); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1026UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1026UnitTests.cs index 175d7c611..d443d9064 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1026UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1026UnitTests.cs @@ -30,7 +30,7 @@ public Foo() } }"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -48,7 +48,7 @@ public async Task TestInvalidSpacingOfImplicitlyTypedArrayAsync(string space) const string expectedCode = "public class Foo { public Foo() { var ints = new[] { 1, 2, 3 }; } }"; DiagnosticResult expected = Diagnostic().WithArguments("new").WithLocation(1, 46); - await VerifyCSharpFixAsync(testCode, expected, expectedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, expectedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027AlternateIndentationUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027AlternateIndentationUnitTests.cs index 1de461736..fecd9d51e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027AlternateIndentationUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027AlternateIndentationUnitTests.cs @@ -33,7 +33,7 @@ public async Task TestValidTabsAsync() "\tpublic const char ValidTestChar = '\t';\r\n" + "}\r\n"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -52,7 +52,7 @@ public async Task TestDisabledCodeAsync() "#endif\r\n" + "}\r\n"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -94,7 +94,7 @@ public async Task TestInvalidSpacesAsync() Diagnostic().WithLocation(9, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -138,7 +138,7 @@ public async Task TestInvalidTabsInDocumentationCommentsAsync() Diagnostic().WithLocation(8, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -180,7 +180,7 @@ public async Task TestInvalidTabsInCommentsAsync() Diagnostic().WithLocation(9, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -225,7 +225,7 @@ public async Task TestInvalidTabsInMultiLineCommentsAsync() Diagnostic().WithLocation(10, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } private static DiagnosticResult Diagnostic() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027UnitTests.cs index f90f001f9..7f0a6cdf6 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027UnitTests.cs @@ -33,7 +33,7 @@ public async Task TestValidTabsAsync() " public const char ValidTestChar = '\t';\r\n" + "}\r\n"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -52,7 +52,7 @@ public async Task TestDisabledCodeAsync() "#endif\r\n" + "}\r\n"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -94,7 +94,7 @@ public void Bar() Diagnostic().WithLocation(9, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -138,7 +138,7 @@ public class Foo Diagnostic().WithLocation(8, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -180,7 +180,7 @@ public async Task TestInvalidTabsInCommentsAsync() Diagnostic().WithLocation(9, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -225,7 +225,7 @@ Comment 2 Diagnostic().WithLocation(10, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027UseTabsUnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027UseTabsUnitTests.cs index 63eefc990..7c41bfb64 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027UseTabsUnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1027UseTabsUnitTests.cs @@ -33,7 +33,7 @@ public async Task TestValidTabsAsync() "\tpublic const char ValidTestChar = '\t';\r\n" + "}\r\n"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } /// @@ -52,7 +52,7 @@ public async Task TestDisabledCodeAsync() "#endif\r\n" + "}\r\n"; - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -94,7 +94,7 @@ public async Task TestInvalidSpacesAsync() Diagnostic().WithLocation(9, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -138,7 +138,7 @@ public async Task TestInvalidTabsInDocumentationCommentsAsync() Diagnostic().WithLocation(8, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -180,7 +180,7 @@ public async Task TestInvalidTabsInCommentsAsync() Diagnostic().WithLocation(9, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -225,7 +225,7 @@ public async Task TestInvalidTabsInMultiLineCommentsAsync() Diagnostic().WithLocation(10, 1), }; - await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedTestCode, CancellationToken.None).ConfigureAwait(true); } private static DiagnosticResult Diagnostic() diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1028UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1028UnitTests.cs index 3a6e5f35f..9039580c0 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1028UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1028UnitTests.cs @@ -49,7 +49,7 @@ public async Task TrailingWhitespaceAfterStatementAsync() Diagnostic().WithLocation(5, 36), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -72,7 +72,7 @@ public async Task TrailingWhitespaceAfterDeclarationAsync() Diagnostic().WithLocation(1, 16), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -91,7 +91,7 @@ public async Task TrailingWhitespaceAfterSingleLineCommentAsync() Diagnostic().WithLocation(1, 12), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -119,7 +119,7 @@ public async Task TrailingWhitespaceInsideMultiLineCommentAsync() Diagnostic().WithLocation(4, 3), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -146,7 +146,7 @@ public async Task TrailingWhitespaceInsideXmlDocCommentAsync() Diagnostic().WithLocation(3, 15), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -175,7 +175,7 @@ public async Task TrailingWhitespaceWithinAndAfterHereStringAsync() Diagnostic().WithLocation(5, 3), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -200,7 +200,7 @@ public async Task TestTrailingWhitespaceAfterClosingBraceAsync() DiagnosticResult expected = Diagnostic().WithLocation(3, 2); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -218,7 +218,7 @@ public async Task TestWhitespaceBeforeClosingBraceAsync() .Append(" }") .ToString(); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -264,7 +264,7 @@ public async Task TrailingWhitespaceAfterDirectivesAsync() Diagnostic().WithLocation(10, 11), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -277,7 +277,7 @@ public async Task TrailingWhitespaceFoundWithinFalseConditionalDirectiveBlocksAs .ToString(); // Note: we verify that no diagnostics are produced inside non-compiled blocks - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -289,7 +289,7 @@ public async Task NoTrailingWhitespaceAfterBlockCommentAsync() .AppendLine("}") .ToString(); - await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -309,7 +309,7 @@ public async Task TrailingWhitespaceAfterTextTokenAsync() DiagnosticResult expected = Diagnostic().WithLocation(2, 10); - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } /// @@ -345,7 +345,7 @@ public async Task VerifyTrailingWhitespaceInsideMultiLineXmlDocumentationComment Diagnostic().WithLocation(4, 14), }; - await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpecialRules/SA0001UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpecialRules/SA0001UnitTests.cs index 0c8f51181..4df26faeb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpecialRules/SA0001UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpecialRules/SA0001UnitTests.cs @@ -35,7 +35,7 @@ public async Task TestEnabledDocumentationModesAsync(DocumentationMode documenta DocumentationMode = documentationMode, Sources = { testCode }, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Theory] @@ -58,7 +58,7 @@ public async Task TestDisabledDocumentationModesAsync(DocumentationMode document Sources = { testCode }, ExpectedDiagnostics = { expected }, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpecialRules/SA0002UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpecialRules/SA0002UnitTests.cs index e95c87785..2de94d926 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpecialRules/SA0002UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpecialRules/SA0002UnitTests.cs @@ -31,7 +31,7 @@ namespace NamespaceName { } [Fact] public async Task TestMissingSettingsAsync() { - await VerifyCSharpDiagnosticAsync(TestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(TestCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -55,7 +55,7 @@ public async Task TestNoSourceFilesAsync() }, }, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -65,7 +65,7 @@ public async Task TestValidSettingsAsync() { TestCode = TestCode, Settings = SettingsFileCodeFixProvider.DefaultSettingsFileContent, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -92,7 +92,7 @@ public async Task TestInvalidSettingsAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -116,7 +116,7 @@ public async Task TestInvalidSettingStringValueAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -140,7 +140,7 @@ public async Task TestInvalidSettingStringArrayElementValueAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -164,7 +164,7 @@ public async Task TestInvalidSettingBooleanValueAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -188,7 +188,7 @@ public async Task TestInvalidSettingIntegerValueAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -212,7 +212,7 @@ public async Task TestInvalidSettingEnumValueNotStringAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -236,7 +236,7 @@ public async Task TestInvalidSettingArrayElementEnumValueNotStringAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -260,7 +260,7 @@ public async Task TestInvalidSettingArrayElementEnumValueNotRecognizedAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -284,7 +284,7 @@ public async Task TestInvalidSettingArrayAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -306,7 +306,7 @@ public async Task TestInvalidSettingObjectAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -331,7 +331,7 @@ public async Task TestInvalidSettingSyntaxAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -349,7 +349,7 @@ public async Task TestEmptySettingsAsync() TestCode = TestCode, ExpectedDiagnostics = { expected }, Settings = settings, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -379,7 +379,7 @@ public async Task TestUnexpectedExceptionNotCaughtAsync() return solution; }, }, - }.RunAsync(CancellationToken.None).ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(true); } private class InvalidAdditionalText : AdditionalText diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj index 65a58ffc2..48a4292bb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj @@ -16,7 +16,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/DiagnosticVerifierTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/DiagnosticVerifierTests.cs index f754b17b9..da50e31aa 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/DiagnosticVerifierTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/Verifiers/DiagnosticVerifierTests.cs @@ -40,7 +40,7 @@ void MethodName() async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Mismatch between number of diagnostics returned, expected \"1\" actual \"0\"", ex.Message); } @@ -60,7 +60,7 @@ int PropertyName DiagnosticResult expected = Diagnostic().WithArguments(string.Empty, "followed").WithLocation(7, 33); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -79,7 +79,7 @@ int PropertyName DiagnosticResult expected = Diagnostic().WithArguments(string.Empty, "followed").WithSpan(7, 33, 7, 34); - await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); + await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(true); } [Fact] @@ -103,7 +103,7 @@ int PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); var expectedMessage = $"Context: Diagnostics of test state{Environment.NewLine}" + $"Expected a project diagnostic with no location:{Environment.NewLine}" @@ -138,7 +138,7 @@ int PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Mismatch between number of diagnostics returned, expected \"0\" actual \"1\"", ex.Message); Assert.Contains("warning SA1002", ex.Message); } @@ -160,7 +160,7 @@ void MethodName() async () => { await CSharpCodeFixVerifier.VerifyAnalyzerAsync(testCode, DiagnosticResult.EmptyDiagnosticResults).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Mismatch between number of diagnostics returned, expected \"0\" actual \"1\"", ex.Message); Assert.Contains("error AD0001", ex.Message); } @@ -185,7 +185,7 @@ Int32 PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Mismatch between number of diagnostics returned, expected \"1\" actual \"2\"", ex.Message); Assert.Contains("error CS0246", ex.Message); } @@ -211,7 +211,7 @@ Int32 PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Mismatch between number of diagnostics returned, expected \"1\" actual \"2\"", ex.Message); Assert.Contains("error CS0246", ex.Message); } @@ -237,7 +237,7 @@ int PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Expected diagnostic id to be \"SA9999\" was \"SA1002\"", ex.Message); } @@ -261,7 +261,7 @@ int PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Expected diagnostic severity to be \"Error\" was \"Warning\"", ex.Message); } @@ -285,7 +285,7 @@ int PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Expected diagnostic to start on line \"8\" was actually on line \"7\"", ex.Message); } @@ -314,7 +314,7 @@ int PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Expected diagnostic to start on line \"7\" was actually on line \"8\"", ex.Message); } @@ -338,7 +338,7 @@ int PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Expected diagnostic to start at column \"34\" was actually at column \"33\"", ex.Message); } @@ -362,7 +362,7 @@ int PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Expected diagnostic to end at column \"35\" was actually at column \"34\"", ex.Message); } @@ -386,7 +386,7 @@ int PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Expected diagnostic message to be ", ex.Message); } @@ -410,7 +410,7 @@ int PropertyName async () => { await VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false); - }).ConfigureAwait(false); + }).ConfigureAwait(true); Assert.StartsWith($"Context: Diagnostics of test state{Environment.NewLine}Expected 1 additional locations but got 0 for Diagnostic", ex.Message); } From 5095e232eb7da4e2794d9c284b5e3fa6c32d1d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Hellander?= Date: Sun, 19 Apr 2026 13:01:51 +0200 Subject: [PATCH 2/2] Upgrade Xunit.Combinatorial to version 1.7.31 --- .../StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj index 48a4292bb..adc1996eb 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj @@ -17,7 +17,7 @@ - +