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

Gaps in XML Documentation validity checking around pattern-parameters and constructor args #10809

Closed
baronfel opened this issue Dec 24, 2020 · 1 comment · Fixed by #10810
Closed
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone

Comments

@baronfel
Copy link
Member

It is possible to write legal code that fails XML documentation validation

Repro steps

given the following script saved as script.fsx

type Thing = Inner of string

/// <summary>does the thing</summary>
/// <param name="s">the thing to do!</param>
let doer (Thing.Inner s) = ()

/// <summary>gives you a friendly greeting</summary>
/// <param name="pal">your good mate</param>
type Buddy(pal: string) = 
    do
        printfn $"hi, {pal}"

and the fsi in the .net 5.0.100 SDK, the command dotnet fsi --warnon:3390 script.fsx results in two spurious warnings:

/script.fsx(3,1): warning FS3390: This XML comment is invalid: unknown parameter 's'
/script.fsx(7,1): warning FS3390: This XML comment is invalid: unknown parameter 'pal'

One for the mismatched parameter in the pattern-matched function argument, and one for the constructor parameter.

Expected behavior

No errors are printed.

Actual behavior

The above warnings are printed.

Known workarounds

The first error can be worked around by performing the extraction inside the function body.
The second error cannot be worked around in code, to my knowledge.
Both can be mitigated by turning 3390 off for the file, though this is a scattershot approach in my view.

Related information

Provide any related information (optional):

  • Operating system: MacOS
  • .NET Runtime kind (.NET Core, .NET Framework, Mono): .Net 5.0.101
  • Editing Tools (e.g. Visual Studio Version, Visual Studio): only dotnet fsi
@cartermp
Copy link
Contributor

Closin'

@cartermp cartermp modified the milestones: Backlog, 16.9 Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants