Skip to content

chore: Replace StyleCop.Analyzer library to unstable version #2796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy