Repository navigation
C# 14: add audit tests (lambda parameter modifiers, compound assignment operators, null-conditional assignment, nameof unbound generics) - #4151
Merged
Conversation
From bjornhellander/NewStyleCopAnalyzers#31. Adapted while cherry-picking: tests were merged into the existing upstream test classes and use ConfigureAwait(false) and WorkItem(4027). (cherry picked from commit 3e0f3f6a3807c56af35d3ec24d86c2b3023b0b3b)
From bjornhellander/NewStyleCopAnalyzers#33. Adapted while cherry-picking: tests were merged into the existing upstream test classes and use ConfigureAwait(false) and WorkItem(4030). The SA1201 test uses the upstream message arguments ("An operator", "a method"). (cherry picked from commit 992dcc851ad67434f8c15fb27c79003003692f4f)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4151 +/- ##
========================================
Coverage 97.41% 97.42%
========================================
Files 1118 1127 +9
Lines 124962 125408 +446
Branches 4203 4203
========================================
+ Hits 121734 122180 +446
Misses 2116 2116
Partials 1112 1112 🚀 New features to boost your workflow:
|
AArnott
marked this pull request as ready for review
October 8, 2026 05:22
# Conflicts: # StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/SpacingRules/SA1000CSharp14UnitTests.cs
# Conflicts: # StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp14/ReadabilityRules/SA1110CSharp14UnitTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4046 (C# 14 audit).
Tests-only.
(text, out result) => …)public void operator +=(…))c?.Value = 1,c?.Next?.Value += 2)?.on the left of an assignment, with fix)nameof(nameof(List<>),nameof(Dictionary<,>))Björn's commits are cherry-picked with
-xand his authorship kept. The tests were merged into the existing upstream test classes and useConfigureAwait(false)and[WorkItem]. The SA1201 test uses upstream's message arguments ("An operator", "a method").No behavior change.
Audit notes, things I checked that need no change:
ReadOnlySpan<int> s = new int[] { … }and passing arrays to span parameters showed no unexpected diagnostics.Locally (Linux): all new tests pass on C# 14 and 15. The only failures in these test classes are the known CRLF code-fix failures (SA1201 extension-block tests that already fail on master).