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

// <auto-generated/> tag ignored #3517

Closed
Anakael opened this issue Jun 1, 2022 · 4 comments
Closed

// <auto-generated/> tag ignored #3517

Anakael opened this issue Jun 1, 2022 · 4 comments
Labels

Comments

@Anakael
Copy link

Anakael commented Jun 1, 2022

Repro steps:

  1. Add StyleCop.Analyzers (version 1.1.118)
  2. Create database migration through ef Tool
  3. Put // <auto-generated/> tag at the top of generated file with migration

Expected behavior: Warnings in generated file are ignored

Actual behavior: Warnings in generated file aren't ignored and with TreatWarningsAsErrors options build fails

@sharwell
Copy link
Member

sharwell commented Jun 1, 2022

Can you include the version of the compiler as well? You can get this by adding #error version to a file, and then running a build to see the actual version of the compiler used in the build.

Also, can you include an example of the specific diagnostic ID which is reported in the file which was marked with <auto-generated/>?

@Anakael
Copy link
Author

Anakael commented Jun 2, 2022

Compiler version: "4.0.0-6.21526.21 (c7d6f9fa)". Language version: 10.0.
Diagnostic Id: CS1591 (Missing XML comment for publicly visible type or member)

@sharwell
Copy link
Member

sharwell commented Jun 2, 2022

CS1591 is reported by the compiler, not StyleCop Analyzers, so we don't have any control over where/how it is reported. I typically recommend disabling this warning as described here:
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA0001.md#how-to-fix-violations

@sharwell
Copy link
Member

sharwell commented Jun 2, 2022

Duplicate of dotnet/roslyn#41171

@sharwell sharwell marked this as a duplicate of dotnet/roslyn#41171 Jun 2, 2022
@sharwell sharwell closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2022
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

2 participants