Skip to content

Commit b2f644e

Browse files
CopilotAArnott
andcommitted
Address PR feedback: revert global.json, use diagnostic markers, remove problematic test
Co-authored-by: AArnott <[email protected]>
1 parent dfec027 commit b2f644e

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

test/Microsoft.VisualStudio.Threading.Analyzers.Tests/VSTHRD103UseAsyncOptionAnalyzerTests.cs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ public async Task SyncMethodCallInAsyncMethod_NotExcludedViaAdditionalFiles_Gene
13711371
13721372
class Test {
13731373
async Task T() {
1374-
TestNamespace.TestClass.NotExcludedMethod();
1374+
[|TestNamespace.TestClass.NotExcludedMethod()|];
13751375
}
13761376
}
13771377
@@ -1383,26 +1383,6 @@ public static void NotExcludedMethod() { }
13831383
}
13841384
";
13851385

1386-
DiagnosticResult expected = CSVerify.Diagnostic(Descriptor).WithSpan(6, 9, 6, 26).WithArguments("NotExcludedMethod", "NotExcludedMethodAsync");
1387-
await CSVerify.VerifyAnalyzerAsync(test, expected);
1388-
}
1389-
1390-
[Fact]
1391-
public async Task SqlDataReaderRead_ExcludedViaAdditionalFiles_GeneratesNoWarning()
1392-
{
1393-
var test = @"
1394-
using System.Threading.Tasks;
1395-
1396-
class Test {
1397-
async Task T() {
1398-
System.Data.SqlClient.SqlDataReader reader = null;
1399-
reader.Read();
1400-
}
1401-
}
1402-
";
1403-
1404-
// No diagnostic expected because SqlDataReader.Read is excluded via AdditionalFiles
1405-
// Note: This test might need additional setup for SqlClient references
14061386
await CSVerify.VerifyAnalyzerAsync(test);
14071387
}
14081388

0 commit comments

Comments
 (0)