build(analyzers): update StyleSharp to 3.13.4 and adopt new complexity rules#102
Merged
Merged
Conversation
…y rules - Bump StyleSharp.Analyzers 3.12.14 -> 3.13.4 and Microsoft.NET.Test.Sdk 18.6.0 -> 18.7.0 - Enable SST1442/SST1443/SST1444 (branching, nesting, single-iteration loop) and set complexity thresholds - Disable Sonar/CA duplicates now covered by the SST equivalents (S1541, S3776, S1751, CA1040, CA1051, S2357, SST2205) - Scope-suppress SST1442 on TryReadValues in the arity-10..16 SyncLatest coordinators where the per-source readiness check count is inherent to the operator arity
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #102 +/- ##
==========================================
- Coverage 90.94% 90.91% -0.03%
==========================================
Files 651 651
Lines 20464 20464
Branches 2454 2454
==========================================
- Hits 18610 18604 -6
- Misses 1485 1488 +3
- Partials 369 372 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.



What kind of change does this PR introduce?
Build / tooling update — analyzer package bump and adoption of the new StyleSharp complexity rules.
What is the new behavior?
StyleSharp.Analyzers3.12.14 → 3.13.4 andMicrosoft.NET.Test.Sdk18.6.0 → 18.7.0.SST1442(too many direct branch points),SST1443(too much nested control flow),SST1444(loop that cannot reach a second iteration) — and sets the cyclomatic/cognitive thresholds.S1541→SST1442,S3776→SST1443,S1751→SST1444,CA1040/CA1051/S2357, andSST2205in favour of the switch-expression-onlySST2206).[SuppressMessage]forSST1442onTryReadValuesin the arity-10..16SyncLatestcoordinators. The branch count there is one short-circuited per-source readiness check, so it is inherent to the operator arity and cannot drop below the threshold without non-short-circuit&(whichS2178forbids).What is the current behavior?
Older StyleSharp build with the complexity rules sourced from Sonar/CA analyzers and no
SST1442/1443/1444coverage.What might this PR break?
None. Pure build/analyzer configuration plus suppression attributes; no product or test code behavior changes. Full solution builds clean (0 warnings) and all 10,020 tests pass.
Checklist
mainbranchAdditional information
The branch-count suppression is the only viable path for these deliberate high-arity operators:
&&short-circuits (each a branch point),&would tripS2178, and an N-source combinator genuinely needs N readiness checks.