Repository navigation
Turn on xml documentation validation globally. - #32934
Conversation
|
Trying again |
|
@safern I guess build is broken? |
No, the reason why the build is failing is because the properties that are being added need aren't within a statement. @AraHaan please wrap them up inside a statement. <PropertyGroup>
<DocumentationFile Condition="'$(IsTestProject)' != 'true' AND '$(IsReferenceAssembly)' !='true'">$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
<NoWarn Condition="'$(DocumentationFile)' != ''">1591</NoWarn>
</PropertyGroup> |
|
Yes, github webhooks are down: https://status.github.com/messages that is why CI is not working now |
Now NoWarn has no Condition on it.
|
I pulled your changes and did a full build and it failed. There is a bunch of docs issues. We might not be ready to turn this feature on for all projects: @weshaggard thoughts on doing this? |
|
@safern I think this is because if badly formed xml documentation. Maybe someone needs to fix the xml documentations or suppressing them might be a better option for now. |
|
I would fix any libraries where there are a handful of XML doc errors, and if there are any that will take a lot of time to fix, I would suppress the XML docs generation for those (in their own csproj) and open a new issue to fix and enalbe them. |
|
@AraHaan still working on it? |
|
It seems on one of the errors is due to a documentation file missing. So it throws a file not found compile error. So I think the issue I opened to fix those got to be fixed by someone who has that file. Perhaps someone forgot to check it into source control? |
|
@AraHaan the problem is that two projects wipe out the value you set of $(NoWarn): In both cases they should append to |
|
Any idea about the test failure on OSX? |
|
OSX is an infrastructure issue There are remaining XML errors on the other failing job though : |
|
Odd on that build I see a CS0419 but in the project to it I see it suppressed already hmm I have no idea why. |
|
Odd seems they still want to error depsite being suppressed on that job. Edit: I might have to disable for System.Diagnostics.Process too. |
|
Interesting, it seems just the disablement of the xml documentation for System.Diagnostics.Process fixed the OSX build. Edit: @danmosemsft I just noticed and I will make another commit to change the NoWarn condition in that project as I do not like it overwriting the previous NoWarn values. Also I might eventually open up a issue to ensure that all the suppressions get fixed so that way we can reenable the remaining xml documentations for Microsoft.VisualBasic, and for System.Diagnostics.Process, also because of that I might make a all in one solution file to Visual Studio for complete convienece for me to just go in and use the Visual Studio error list on all the projects at once compared to opening each and every solution at a time which would take too long. So if I push it it is only for people who want to go through a mass xml documentation fixtures (and maybe for a build from within Visual Studio itself). |
|
Sounds good, or goal should be to fix all the errors and re-enable all warnings (except for entirely missing XML - many projects may never get XML docs) |
|
Ok that should be ok too. |
There was a problem hiding this comment.
LGTM. Ideally we would be consistent about using CS prefixes on the error numbers.
Also probably it might have been better to define two flags that projects can set: <WarnForMissingXmlDoc>false</WarnForMissingXmlDoc> and <WarnForInvalidXmlDoc>false</WarnForInvalidXmlDoc>. Since the individual XML doc warning numbers aren't very interesting, and that would keep them all out of the project files. Then when each was cleaned up, the flags could be removed. It's fine, though.
|
For future reference, this is what I think are the complete set of XML doc warning codes: |
|
Thanks @AraHaan . Do you plan to continue and maybe clean some of these projects so they don't need to disable warnings? |
|
Ye, I also think the true/false values for the whole list to enable the suppressions is a good idea too. |
If we want csproj to be able to set this properties, just as an FYI, the work you did, would need to be moved to Directory.Build.targets or somewhere that is imported/evaluated after the csproj's properties. Directory.Build.props is the top of the stack. |
|
Good point. |
CS3016 was added by mistake as part of dotnet#32934 so I removed it.
* Turn on xml documentation validation globally. * Ignore warning 1591 globally. * Fixed build failures. * Move the Original DocumentationFile Condition to the Group. Now NoWarn has no Condition on it. * Fixed NoWarn overwrite. * Update Directory.Build.props * Update System.Runtime.CompilerServices.Unsafe.ilproj * Update file on github web. Sadly it seems I can only do this on my phone now. RIP * Update System.Security.Cryptography.Csp.csproj * Update Directory.Build.props * Suppress some warnings. * Fixed remaining compile errors. * Update System.Diagnostics.StackTrace.csproj * Update System.Security.Cryptography.Xml.csproj * Fixed xml documentation typo in Microsoft.VisualBasic. * Fixed missing suppressions. * Suppress more errors. * Suppress more errors. * Suppress more errors. * Suppress even more errors. * Suppress more errors. * Update Directory.Build.props * Suppress more errors. Also fix a documentation issue specific to OSX. * Suppress more errors. * Suppress more errors. * Disable xml documentation for System.Diagnostics.Process. * Do not overwrite NoWarn. * Enable docs for S.D.P
* Fixed XML documentation tags for CoreFx.Private.TestUtilities
* Fixed XML documentation tags for System.Diagnostics.Process
* Fixed XML documentation tags for System.ComponentModel.Composition
* Fixed XML documentation tags for System.ComponentModel.Primitives
* Fixed XML documentation tags for System.ComponentModel.TypeConverter
* Fixed XML documentation tags for System.Data.Common
* Fixed XML documentation tags for System.Data.SqlClient
* Fixed XML documentation tags for System.Diagnostics.PerformanceCounter
* Fixed XML documentation tags for System.Diagnostics.StackTrace
* Fixed XML documentation for System.Diagnostics.TraceSource
* Fixed XML documentation for System.IO.Compression.ZipFile
* Fixed XML documentation for System.IO.Compression
* Fixed XMl documentation reference according to review notes
* Fixed XML documentation tags for System.IO.MemoryMappedFiles
* Fixed XML documentation tags for System.IO.Pipes
* Fixed XML documentation tag for OSX interop in System.Diagnostics.Process
* Fixed XML documentation tags for CoreFx.Private.TestUtilities for Unix
* Fixed XML documentation tags for System.Linq.Expressions
* Fixed XML documentation for System.Linq.Parallel
* Fixed XML documentationt ags for System.Linq
* Fixed XML documentation tags for System.Management
* Fixed XMl documentation tags for System.Net.Http (left CS1573)
* Fixed XMl documentation tags for System.Net.Mail
* Fixed XML documentation tags for System.Net.NameResolution
* Fixed XML documentation tags for System.Net.Primitives - added T prefix for Socket as Primitives do not reference System.Net.Sockets
* Fixed XML documentation tags for System.Net.Sockets
* Fixed XML documentation tags for Unix interop files
* Fixed XML documentation tags for System.Net.Http (Unix)
* Fixed XML documentation tags for PlatformDetection.Unix.cs according to review notes
* Fixed XML documentation tags for OSX interop
* Ignore CS1574 for System.Linq as there is no ConcatIterator{TSource}.ToList for uap.
* Fixed XML documentation tags for FreeBSD interop
* Fixed XML documentation tags for System.Net.WebSockets
* Fixed XMLm documentation tags for System.Transactions.Local
* Fixed XML documentation for System.Security.Principal.Windows
* Fixed XML documentation for System.Drawing.Common
* Fixed XML documentation for System.Net.NetworkInformation
* Fixed XML documentation tags for System.Private.XML (left CS1589)
* Fixed XML documentation tags for System.Security.Cryptography
* Fixed XML documentation for System.Runtime.WindowsRuntime
* Fixed XML documentation tags for System.Security.Cryptography.Xml
* Fixed XML documentation tags for System.Security.Cryptography.Primitives
CS3016 was added by mistake as part of #32934 so I removed it.
* Fixed XML documentation tags for System.Linq: added M to ToList method as it is not accessible by uap builds.
* Fixed XML documentation tags for System.IO.FileSystem
* Fixed XML documentation tags for System.Security.Cryptography.*
* Fixed XML documentation for System.IO.Ports
* Fixed XML documentation tags for System.Private.Reflection.Metadata.Ecma335
* Fixed XML documentation tags for System.Windows.Extensions
* Fixed XMl documentation tags for System.Console
* Fixed XML documentation for System.IO.FileSystem.DriveInfo
* Fixed XML documentation tags for System.Runtime.Extensions
* Fixed XML documentation tags for System.Drawing.Primitives.
Left CS1589 as there is no 'doc\KnownColor.uex' file.
* Fixed XMl documentation for System.Runtime.WindowsRuntime.
Had to add M prefix to 'Windows.Foundation.IAsyncAction' as Windows.Foundation is not accessible at compilation time.
* Fixed XML documentation tags for System.Private.Xml
* Fixed XML documentation tags for System.Private.Reflection.Metadata.Ecma335
Had to add a prefixes to: 'T:System.Collections.Immutable' and 'M:Enumerable.ToArray{TSource}' as they are not available for uap at compilation time.
* Fixed XML documentation tags for System.Net.WebSockets.WebSocketProtocol
* Fixed XML documentation tags for System.Net.WebSockets.WebSocketProtocol
* XML documentation tags fixes: changes after review.
* Turn on xml documentation validation globally. * Ignore warning 1591 globally. * Fixed build failures. * Move the Original DocumentationFile Condition to the Group. Now NoWarn has no Condition on it. * Fixed NoWarn overwrite. * Update Directory.Build.props * Update System.Runtime.CompilerServices.Unsafe.ilproj * Update file on github web. Sadly it seems I can only do this on my phone now. RIP * Update System.Security.Cryptography.Csp.csproj * Update Directory.Build.props * Suppress some warnings. * Fixed remaining compile errors. * Update System.Diagnostics.StackTrace.csproj * Update System.Security.Cryptography.Xml.csproj * Fixed xml documentation typo in Microsoft.VisualBasic. * Fixed missing suppressions. * Suppress more errors. * Suppress more errors. * Suppress more errors. * Suppress even more errors. * Suppress more errors. * Update Directory.Build.props * Suppress more errors. Also fix a documentation issue specific to OSX. * Suppress more errors. * Suppress more errors. * Disable xml documentation for System.Diagnostics.Process. * Do not overwrite NoWarn. * Enable docs for S.D.P Commit migrated from dotnet/corefx@6abb4cd
* Turn on xml documentation validation globally. * Ignore warning 1591 globally. * Fixed build failures. * Move the Original DocumentationFile Condition to the Group. Now NoWarn has no Condition on it. * Fixed NoWarn overwrite. * Update Directory.Build.props * Update System.Runtime.CompilerServices.Unsafe.ilproj * Update file on github web. Sadly it seems I can only do this on my phone now. RIP * Update System.Security.Cryptography.Csp.csproj * Update Directory.Build.props * Suppress some warnings. * Fixed remaining compile errors. * Update System.Diagnostics.StackTrace.csproj * Update System.Security.Cryptography.Xml.csproj * Fixed xml documentation typo in Microsoft.VisualBasic. * Fixed missing suppressions. * Suppress more errors. * Suppress more errors. * Suppress more errors. * Suppress even more errors. * Suppress more errors. * Update Directory.Build.props * Suppress more errors. Also fix a documentation issue specific to OSX. * Suppress more errors. * Suppress more errors. * Disable xml documentation for System.Diagnostics.Process. * Do not overwrite NoWarn. * Enable docs for S.D.P Commit migrated from dotnet/corefx@6abb4cd
* Fixed XML documentation tags for CoreFx.Private.TestUtilities
* Fixed XML documentation tags for System.Diagnostics.Process
* Fixed XML documentation tags for System.ComponentModel.Composition
* Fixed XML documentation tags for System.ComponentModel.Primitives
* Fixed XML documentation tags for System.ComponentModel.TypeConverter
* Fixed XML documentation tags for System.Data.Common
* Fixed XML documentation tags for System.Data.SqlClient
* Fixed XML documentation tags for System.Diagnostics.PerformanceCounter
* Fixed XML documentation tags for System.Diagnostics.StackTrace
* Fixed XML documentation for System.Diagnostics.TraceSource
* Fixed XML documentation for System.IO.Compression.ZipFile
* Fixed XML documentation for System.IO.Compression
* Fixed XMl documentation reference according to review notes
* Fixed XML documentation tags for System.IO.MemoryMappedFiles
* Fixed XML documentation tags for System.IO.Pipes
* Fixed XML documentation tag for OSX interop in System.Diagnostics.Process
* Fixed XML documentation tags for CoreFx.Private.TestUtilities for Unix
* Fixed XML documentation tags for System.Linq.Expressions
* Fixed XML documentation for System.Linq.Parallel
* Fixed XML documentationt ags for System.Linq
* Fixed XML documentation tags for System.Management
* Fixed XMl documentation tags for System.Net.Http (left CS1573)
* Fixed XMl documentation tags for System.Net.Mail
* Fixed XML documentation tags for System.Net.NameResolution
* Fixed XML documentation tags for System.Net.Primitives - added T prefix for Socket as Primitives do not reference System.Net.Sockets
* Fixed XML documentation tags for System.Net.Sockets
* Fixed XML documentation tags for Unix interop files
* Fixed XML documentation tags for System.Net.Http (Unix)
* Fixed XML documentation tags for PlatformDetection.Unix.cs according to review notes
* Fixed XML documentation tags for OSX interop
* Ignore CS1574 for System.Linq as there is no ConcatIterator{TSource}.ToList for uap.
* Fixed XML documentation tags for FreeBSD interop
* Fixed XML documentation tags for System.Net.WebSockets
* Fixed XMLm documentation tags for System.Transactions.Local
* Fixed XML documentation for System.Security.Principal.Windows
* Fixed XML documentation for System.Drawing.Common
* Fixed XML documentation for System.Net.NetworkInformation
* Fixed XML documentation tags for System.Private.XML (left CS1589)
* Fixed XML documentation tags for System.Security.Cryptography
* Fixed XML documentation for System.Runtime.WindowsRuntime
* Fixed XML documentation tags for System.Security.Cryptography.Xml
* Fixed XML documentation tags for System.Security.Cryptography.Primitives
CS3016 was added by mistake as part of dotnet/corefx#32934 so I removed it.
* Fixed XML documentation tags for System.Linq: added M to ToList method as it is not accessible by uap builds.
* Fixed XML documentation tags for System.IO.FileSystem
* Fixed XML documentation tags for System.Security.Cryptography.*
* Fixed XML documentation for System.IO.Ports
* Fixed XML documentation tags for System.Private.Reflection.Metadata.Ecma335
* Fixed XML documentation tags for System.Windows.Extensions
* Fixed XMl documentation tags for System.Console
* Fixed XML documentation for System.IO.FileSystem.DriveInfo
* Fixed XML documentation tags for System.Runtime.Extensions
* Fixed XML documentation tags for System.Drawing.Primitives.
Left CS1589 as there is no 'doc\KnownColor.uex' file.
* Fixed XMl documentation for System.Runtime.WindowsRuntime.
Had to add M prefix to 'Windows.Foundation.IAsyncAction' as Windows.Foundation is not accessible at compilation time.
* Fixed XML documentation tags for System.Private.Xml
* Fixed XML documentation tags for System.Private.Reflection.Metadata.Ecma335
Had to add a prefixes to: 'T:System.Collections.Immutable' and 'M:Enumerable.ToArray{TSource}' as they are not available for uap at compilation time.
* Fixed XML documentation tags for System.Net.WebSockets.WebSocketProtocol
* Fixed XML documentation tags for System.Net.WebSockets.WebSocketProtocol
* XML documentation tags fixes: changes after review.
Commit migrated from dotnet/corefx@f7539b7
This is my fixes for issue #30177.
Note the BOM (byte order mark seems to not be friendly on some editors I have).