-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Enable CS1591 for projects that don't use intellisense package XML file #84917
Conversation
From our chat, you mentioned we can also ignore Microsoft.Extensions.Specifications.Tests because it isn't critical to offer API as it's just a test dependency tool. BTW, I couldn't find System.Numerics.Tensors in dotnet-api-docs. Turns out it is non-shipping (Tanner confirmed), and we remove it on purpose from the ref assemblies drop we send to them. I mention it because I was trying to backport the docs, but couldn't find anything. So I guess we need to ignore the CS warning in that assembly. |
The RateLimiter APIs live in the ASP.NET API docs repo, and they are undocumented there. If we want to fill the missing documentation items, it'll have to be done manually in triple slash directly. https://github.com/dotnet/AspNetApiDocs/blob/main/aspnet-core/xml/System.Threading.RateLimiting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of unnecessary full namespaces.
src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/WindowsServiceLifetime.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/WindowsServiceLifetime.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Hosting.Systemd/src/ISystemdNotifier.cs
Outdated
Show resolved
Hide resolved
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
Reopening as we want to continue this work when we have free cycles again (soon). |
src/libraries/System.Threading.RateLimiting/src/System.Threading.RateLimiting.csproj
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Left some comments.
/// </param> | ||
/// <returns> | ||
/// A task that represents the asynchronous stop operation. | ||
/// </returns> | ||
public Task StopAsync(CancellationToken cancellationToken) | ||
{ | ||
return Task.CompletedTask; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The added comments do not match what the method does. This is only returning the object that represents a completed task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You added those in one of the commits. I assume they are just a straight port from docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand. What commits are you referring to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You contributed to this PR. See the commits tab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. I just noticed the date of this PR.
Yes, I ported them using the tool. They exist this way in MS Docs: https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting.systemd.systemdlifetime.stopasync?view=dotnet-plat-ext-3.1
@gewarren I suppose the documentation of this API needs to say something along the lines of "This API does nothing except returning a completed task". Is this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ViktorHofer we can address it in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlossanlop Yes the summary could be something like "Returns a task that has already completed."
@@ -5,6 +5,9 @@ | |||
|
|||
namespace Microsoft.Extensions.Hosting | |||
{ | |||
/// <summary> | |||
/// Options to configure the lifetime of a windows service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Options to configure the lifetime of a windows service. | |
/// Options to configure the lifetime of a Windows service. |
@@ -9,6 +9,8 @@ | |||
<IsTrimmable>false</IsTrimmable> | |||
<EnableAOTAnalyzer>false</EnableAOTAnalyzer> | |||
<NoWarn>$(NoWarn);CA1852</NoWarn> | |||
<!-- Public API not fully documented. --> | |||
<NoWarn>$(NoWarn);1591</NoWarn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @dotnet/area-extensions-dependencyinjection area owners: This assembly is missing public documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -2,6 +2,8 @@ | |||
<PropertyGroup> | |||
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks> | |||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||
<!-- Public API not fully documented. --> | |||
<NoWarn>$(NoWarn);1591</NoWarn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @dotnet/area-system-numerics-tensors area owners, this assembly is missing public documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -7,6 +7,8 @@ | |||
<NoWarn>$(NoWarn);CS0649;SA1129;IDE0059;IDE0060;CA1822;CA1852</NoWarn> | |||
<Nullable>annotations</Nullable> | |||
<IsTrimmable>false</IsTrimmable> | |||
<!-- Public API not fully documented. --> | |||
<NoWarn>$(NoWarn);1591</NoWarn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @dotnet/area-system-speech area owners: This assembly is missing public documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- the assembly is a PNSE assembly. --> | ||
<NoWarn Condition="'$(IntellisensePackageXmlFilePath)' != '' or | ||
'$(IsPrivateAssembly)' == 'true' or | ||
'$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">$(NoWarn);1591</NoWarn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about IsPartialFacadeAssembly
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compiler doesn't warn for undocumented types referenced via type forwards.
@carlossanlop would you mind if we react to additional feedback in a follow-up change and meanwhile get this in? I would like to have this validation in place in main. I could imagine that with a new assembly or new API added to one of the source-of-truth assemblies, this PR would start failing again. |
Noticed that while looking at the intellisense.targets file that projects like Microsoft.Extensions which don't use the Microsoft.Private.Intellisense intellisense package XML file still set NoWarn+=CS1591.
WIP: This will probably result in some projects raising errors that we need to fix.