Skip to content
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

Fix SA1010 FP: Use new collection initializer should not issue a warning SA1010 #9310

Closed
Willimaendu opened this issue May 22, 2024 · 2 comments

Comments

@Willimaendu
Copy link

Description

When using the new collection initializer [] no SA1010 should be raised.

Repro steps

List<string> list = [];

Expected behavior

No warning.

Actual behavior

Warning SA1010 Opening square brackets should not be preceded by a space

Known workarounds

None

Related information

  • C# 12
  • Visual Studio 17.9.7
  • MSBuild 17.9.8.16306 / dotnet 8.0.5
  • Windows 10
@pavel-mikula-sonarsource
Copy link
Contributor

Hi @Willimaendu,

We do not maintain StyleCop SA* rules. You need to follow this repository:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers

@Willimaendu
Copy link
Author

Issue created: DotNetAnalyzers/StyleCopAnalyzers#3850

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

No branches or pull requests

2 participants