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

SA0102 appears to be falsely reported for file scoped namespaces? (1.2.0-beta.556) #3868

Closed
CodingBeagle opened this issue Jul 1, 2024 · 1 comment
Labels

Comments

@CodingBeagle
Copy link

Using StyleCop.Analyzers version 1.2.0-beta.556 with the following PackageReference:

<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

It appears that I get false positives when using file scoped namespaces? Example, given the following declaration at the top of a class:

namespace My.Example.Namespace;

I get the following error:
"A syntax error has been discovered in file '...' [StyleCop Rule: SA0102]"

@bjornhellander
Copy link
Contributor

SA0102 is never reported by this analyzer package. It looks like you are also using StyleCop "Classic" somehow and that one is reporting the error you are seeing.

@sharwell sharwell closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants