Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Jul 24, 2025

Found when updating roslyn-analyzers to latest version of roslyn.

Introduced with: #76054

@CyrusNajmabadi CyrusNajmabadi marked this pull request as ready for review July 24, 2025 10:33
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner July 24, 2025 10:33
@CyrusNajmabadi CyrusNajmabadi requested a review from jjonescz July 24, 2025 10:49
@CyrusNajmabadi
Copy link
Member Author

@jjonescz ptal. i can vouch for this, and this should fixup nearly all of the undesirable changes seen in your PR.

Note: a small handful of changes will remain. But they represent appropriate differences. Specifically, when changing the modifiers of an existing construct, no line changes will happen now.

Copy link
Member Author

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c

Accessibility accessibility,
DeclarationModifiers modifiers,
bool withLeadingElasticMarker = false)
bool withLeadingElasticMarker = true)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have audited all usages of these private functions (so they're only called within this type). In almost all cases we ues this when making a new member. So we want the elastic marker so the new member is placed properly. In the few cases we are just updating a modifieer list, we now explicitly pass in 'false' there.

@CyrusNajmabadi CyrusNajmabadi enabled auto-merge July 24, 2025 11:01
@CyrusNajmabadi CyrusNajmabadi merged commit 80f17c4 into dotnet:main Jul 24, 2025
24 of 25 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the elasticModifier branch July 24, 2025 11:49
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 24, 2025
jjonescz added a commit to jjonescz/roslyn-analyzers that referenced this pull request Jul 24, 2025
jjonescz added a commit to dotnet/roslyn-analyzers that referenced this pull request Jul 25, 2025
* Handle extension members by 'make member static'

* Suppress warning introduced by Roslyn bump

* Suppress warning in test

* Update tests

* Update Roslyn

To bring in dotnet/roslyn#79571.

* Update Roslyn

To bring in dotnet/roslyn#79576.
ViktorHofer pushed a commit to dotnet/sdk that referenced this pull request Aug 15, 2025
* Handle extension members by 'make member static'

* Suppress warning introduced by Roslyn bump

* Suppress warning in test

* Update tests

* Update Roslyn

To bring in dotnet/roslyn#79571.

* Update Roslyn

To bring in dotnet/roslyn#79576.
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants