Skip to content

Conversation

@filzrev
Copy link
Contributor

@filzrev filzrev commented Jun 28, 2025

This PR intended to replace StyleCop.Analyzers libary to StyleCop.Analyzers.Unstable version.

Background
StyleCop.Analyzers package stable version (1.1.118) is released at 2019/04/29.
It don't support syntax that are added by C# 8.0 or later.

And it cause build error when applying code formatter with Visual Studio (e.g. when using target-typed new statement)

StyleCop.Analyzers.Unstable is officially released package to handle this issue, and it seems widely used compared to -beta prefixed version. (It's compared by download count)

What's changed in this PR

  1. Replace package to StyleCop.Analyzers.Unstable. And add IncludeAssets setting that shown on NuGet package page. (01b3f04)
  2. Remove extra space from target-typed new statements to avoid SA1000 error. (97de361)
  3. Modify ValueTuple declaration to avoid SA1141 error. (6825381)

Copy link
Collaborator

@timcassell timcassell left a comment

Choose a reason for hiding this comment

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

Thanks @filzrev!

@timcassell timcassell merged commit da43e0b into dotnet:master Jun 28, 2025
9 checks passed
@AndreyAkinshin AndreyAkinshin added this to the v0.15.3 milestone Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants