@@ -347,6 +347,12 @@ dotnet_diagnostic.SA1600.severity = warning
347347dotnet_diagnostic.SA1601.severity = warning
348348dotnet_diagnostic.SA1602.severity = warning
349349
350+ # Library code should preserve synchronization context by default
351+ # Consumers decide whether to use ConfigureAwait(false) when calling library methods
352+ dotnet_diagnostic.MA0004.severity = none # Meziantou: Use ConfigureAwait
353+ dotnet_diagnostic.S3216.severity = none # SonarAnalyzer: ConfigureAwait
354+ dotnet_diagnostic.CA2007.severity = none # .NET Analyzer: Use ConfigureAwait
355+
350356# Test projects - relaxed naming, no doc requirements
351357[tests/** /* .cs ]
352358# Allow Test_Method_Names_With_Underscores
@@ -386,6 +392,9 @@ dotnet_diagnostic.S3216.severity = none # ConfigureAwait not needed in
386392dotnet_diagnostic.S3776.severity = none # Complexity OK in tests
387393dotnet_diagnostic.S4049.severity = none # Properties vs methods flexibility in tests
388394
395+ # .NET Analyzer - Relax in tests
396+ dotnet_diagnostic.CA2007.severity = none # ConfigureAwait not needed in tests
397+
389398# SecurityCodeScan - Relax in tests (but keep serious ones)
390399dotnet_diagnostic.SCS0005.severity = suggestion # Weak random OK for test data
391400
@@ -404,6 +413,11 @@ dotnet_diagnostic.CA1707.severity = none
404413# Relax async/await analyzer rules for benchmarks
405414dotnet_diagnostic.AsyncFixer01.severity = none # Allow unnecessary async/await in benchmarks
406415
416+ # ConfigureAwait not needed in benchmarks
417+ dotnet_diagnostic.MA0004.severity = none # Meziantou: Use ConfigureAwait
418+ dotnet_diagnostic.S3216.severity = none # SonarAnalyzer: ConfigureAwait
419+ dotnet_diagnostic.CA2007.severity = none # .NET Analyzer: Use ConfigureAwait
420+
407421# Banned API Analyzer - Just warn in benchmarks (allow for benchmarking purposes)
408422dotnet_diagnostic.RS0030.severity = warning # Using banned API - warn instead of error in benchmarks
409423
0 commit comments