Repository navigation
Walk the tokens of a syntax tree once for the spacing and layout rules - #4106
Merged
AArnott merged 3 commits intoOct 7, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4106 +/- ##
==========================================
- Coverage 97.48% 97.48% -0.01%
==========================================
Files 1026 1034 +8
Lines 119387 119496 +109
Branches 3476 3482 +6
==========================================
+ Hits 116388 116493 +105
- Misses 1986 1988 +2
- Partials 1013 1015 +2 🚀 New features to boost your workflow:
|
alexander-efremov
force-pushed
the
perf/single-token-walk
branch
from
October 7, 2026 05:13
c439c31 to
e8fd64c
Compare
alexander-efremov
marked this pull request as ready for review
October 7, 2026 05:14
Contributor
|
Thanks, this is a great win! CI is green with master merged in, and I'm merging it now. As a follow-up, could you share:
|
This was referenced Nov 11, 2026
Bump StyleCop.Analyzers from 1.2.0-beta.556 to 1.3.180
microsoftgraph/aspnetcore-webhooks-sample#436
Open
Closed
Open
This was referenced Nov 23, 2026
[DPDBT] Bump Microsoft.CodeAnalysis.Analyzers and 6 others
sergey-rybalkin/CommandLine.Generators#63
Open
Open
Open
Closed
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.
Ported from the StyleCopNext.Analyzers fork (see the discussion in alexander-efremov#564).
DescendantTokens. The tokens are now collected once per tree and compilation through aSyntaxTreeValueProvider(like the settings cache), and the rules iterate the shared arrays.SyntaxTreeTokensTestscompare both arrays withDescendantTokens. Diagnostics are unchanged.Measured on a large test project (csc on 4 cores, 8 interleaved runs): StyleCop
/reportanalyzertime median 4.69 s -> 2.80 s, lower in 8 of 8 pairs.Tests (net6.0, on top of current master): StyleCop.Analyzers.Test, CSharp7 and CSharp13 pass.
Draft until CI on this repository is running again.