dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.9k stars 783 forks source link

Inconsistent XmlDoc parameters analysis for properties with accessors #13684

Open DedSec256 opened 2 years ago

DedSec256 commented 2 years ago

Inconsistent XmlDoc parameters analysis for properties with accessors

Repro steps

Project with enabled $(OtherFlags) --warnon:3390 option

type A =
    /// <summary>
    /// 
    /// </summary>
    /// <param name="j"></param>
    /// <param name="k"></param>
    /// <param name="l"></param>
    member x.A with get j = 3
               and set k l = () 

The code above results in the following warnings image

Remove the documentation for the parameter 'l' image

Expected behavior

No warnings 'comment is invalid' for all accessor parameters on the first screenshot

or

no warnings 'comment is incomplete' for the 'l' parameter on the second screenshot

DedSec256 commented 2 years ago

no warnings 'comment is incomplete' for the 'l' parameter on the second screenshot

Perhaps this option is more preferable, since accessors cannot have separate documentation, and their parameter names can be repeated:

  /// <summary></summary>
  /// <param name="i"></param>
  // is the i parameter from getter or setter?
  member x.A with get i = 3
             and set i k = ()