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

False positive of SA1601 on windows forms - if documentation build XML isn't eanbled. #1190

Closed
alaendle opened this issue Aug 12, 2015 · 3 comments
Assignees
Milestone

Comments

@alaendle
Copy link

Just create a new windows forms project under VS2015 and add the StyleCop.Analyzers analyzer.
Resolve all warnings in the IDE by adaption of the code - but do not activate the documentation build.
If you now build the project you will face a additional warning like the following in the build output:

1>C:\temp\TestStyleCopAnalyzers\TestStyleCopAnalyzers\Form1.cs(14,24,14,29): warning SA1601: Partial elements must be documented

Also it seems that the missing documentation build raises a lot of other false positives.
If this is a know behavior please close this issue immediately - and maybe add this fact to the documentation more prominent.

@alaendle alaendle changed the title False positive of SA1601 on windows forms. False positive of SA1601 on windows forms - if documentation build XML isn't eanbled. Aug 12, 2015
@pdelvo
Copy link
Member

pdelvo commented Aug 12, 2015

The code behind class is a partial class so I think the reported diagnostic is correct. Is the original stylecop behaving differently?

Edit: I did not read that correctly. I think youre right. if documentation is disabled we should probably not report any documentation diagnostic

@sharwell
Copy link
Member

In cases where XML documentation output is disabled, the only reported diagnostic for documentation comments should be SA1652 (EnableXmlDocumentationOutput). Many analyzers which examine documentation comments naturally do not run when documentation output is disabled (because they look at comments that already exist). We only need to update the others to handle this case specifically.

I believe the only one I updated already was SA1600.

@sharwell
Copy link
Member

Grabbed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants