-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
We should enable CS1591 on projects that have migrated their docs #49120
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @safern, @ViktorHofer, @Anipik Issue DetailsOnce a project migrates its docs it should be a build error if docs are missing from a publicly visible member. I just tried this and it's not flagging CS1591.
|
Good catch. We will take care of this ASAP. |
@ericstj This could be addressed by manually adding:
to the first The tool does not add it yet because I didn't find a way to edit the csproj via the Roslyn/MSBuild APIs. But I think I can just do it using System.Text.Xml. |
I just saw your comment in your PR: https://github.com/dotnet/runtime/pull/49118/files#r587730539 So |
I believe you can use MSBuild ProjectCollection to load a project and modify it but not sure: https://docs.microsoft.com/en-us/dotnet/api/microsoft.build.evaluation.projectcollection.loadproject?view=msbuild-16-netcore#Microsoft_Build_Evaluation_ProjectCollection_LoadProject_System_String_ @ericstj should know, I believe he is done this before. |
Which may be irrelevant for our projects, since we define this ourselves:
I didn't need to define this property, I did it because the docs said I should. I found that CSC was already generating XML before I added it. I'm not sure what we need to do to enable that code analysis rule. It needs to be investigated. Presumably whatever you find could be triggered off this property (or something similar) so you could only apply it to projects which were migrated. To add a property to an MSBuild project you can use either the Evaluation or Construction APIs. Evaluation are easier to use but give you less control over where the property is written (since it's not a DOM, it's an OM) |
This compiler warning is disabled in Arcade :( |
we can just do |
Technically yes, but the regarding the bigger picture, Arcade is about providing the right defaults. IMO we should discuss if that setting still makes sense (it comes from roslyn's toolset repo). EDIT: I don't see this issue related to 7.0.0 in any way. |
Moving this out to 8.0.0 |
Update:
I added I'm submitting a PR to enable the rule in this one assembly. The issue would have to stay open until we address the same in all assemblies (eventually). |
I forgot that That means we can close this issue since this is not a problem anymore. Assemblies can use their triple slash as source of truth by disabling the |
@carlossanlop @safern
Once a project migrates its docs it should be a build error if docs are missing from a publicly visible member. I just tried this and it's not flagging CS1591.
The text was updated successfully, but these errors were encountered: