Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 2.01 KB

SA1647.md

File metadata and controls

53 lines (39 loc) · 2.01 KB

SA1647

TypeName SA1647IncludeNodeDoesNotContainValidFileAndPath
CheckId SA1647
Category Documentation Rules

⚠️ This rule has been intentionally omitted from StyleCop Analyzers. See KnownChanges.md for additional information.

Cause

An include tag within an Xml documentation header does not contain valid file and path attribute.

Rule description

C# syntax provides a mechanism for inserting documentation for classes and elements directly into the code, through the use of Xml documentation headers. For an introduction to these headers and a description of the header syntax, see the following article: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/xml-documentation-comments.

As an alternative to authoring documentation directly within the code file, it is possible to place documentation for multiple elements within a separate Xml file, and then reference a section of that file within an element's documentation header. This causes the compiler to import the documentation for that element from the included document. For example:

/// <include file="IncludedDocumentation.xml" path="root/EnabledMethodDocs" />
public bool Enabled(bool true)
{
}

A violation of this rule occurs when the include tag is missing a file or path attribute, or contains an improperly formatted file or path attribute.

How to fix violations

To fix a violation of this rule, add or correct the file and path attributes.

How to suppress violations

[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1647:IncludeNodeDoesNotContainValidFileAndPath", Justification = "Reviewed.")]
#pragma warning disable SA1647 // IncludeNodeDoesNotContainValidFileAndPath
#pragma warning restore SA1647 // IncludeNodeDoesNotContainValidFileAndPath