Skip to content

Needs to explain problems with broken tags #26333

@bartelink

Description

@bartelink

Further to:

If a /// comment does not start with a <, then the entire comment text is taken as the summary documentation for the code construct that immediately follows. Use this method when you want to write only a brief summary for each construct.

I'd suggest adding a sentence such as:

Note that markup in summary comments not surrounded by tags will not be parsed or checked by the compiler or tools (although some tools like GitHub will attempt to parse it, but will fail if there are such syntax errors).

Arguably there should be a warning emitted by the compiler if there are xml tags within a comment that are not bracketed as such - right now I'm finding places where my assumption that it would Just Work broke by looking for /// [^<].*<

Even more arguably, there should be a feature request to the compiler to treat triple (or 4?!) slash sections as if they have an implicit <remarks> wrapping unless they have a different tag wrapping them?

As a side note, I only figured this out after N years of the tooling and/or my laziness and bad assumptions misleading me into thinking it would Just Work - see jet/FsCodec#67. The same codebase was also reviewed by a very knowledgeable C# developer (@CumpsD) who I assume also assumed my pidgin syntax was kosher.

While I'm putting even more context into the wrong place.... Should the doc here mention that there are implicit <br/>s added when using non-tagged comments that one'll need to manually insert when you convert it? (could/should tooling offer a conversion step?)

(Another different way of addressing the needs of terse markup for xmldoc might be be to map markdown-style usage of backtick wrapping to <c>code</c> - I assume there are issues in the roslyn and/or F# repos requesting similar)


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.


Associated WorkItem - 496354

Metadata

Metadata

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.dotnet-fsharp/svcin-prThis issue will be closed (fixed) by an active pull request.okr-qualityContent-quality KR: Concerns article defects (bugs), freshness, or build warnings.

Type

No type

Projects

Status

👀 In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions