-
Notifications
You must be signed in to change notification settings - Fork 22
SA1603
TypeName |
DocumentationMustContainValidXml |
CheckId |
SA1603 |
Category |
Documentation Rules |
The Xml within a C# element’s document header is badly formed.
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: http://msdn.microsoft.com/en-us/magazine/cc302121.aspx.
A violation of this rule occurs when the documentation Xml is badly formed and cannot be parsed. This can occur if the Xml contains invalid characters, or if an Xml node is missing a closing tag, for example.
To fix a violation of this rule, replace the badly formed Xml with valid Xml that can be parsed by a standard Xml parser.
The following example shows a class containing invalid Xml within its documentation header. The closing tag for the <summary> node is invalid.
/// <summary>
/// An example of badly formed Xml.
/// </summa3ry>
public class Example
{
}
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1603:DocumentationMustContainValidXml", Justification = "Reviewed.")]
</div>
</body>
- - SA0102 - Clean Install
- - Download
- - Documentation Rules - Layout Rules - Maintainability Rules - Naming Rules - Ordering Rules - Readability Rules - Spacing Rules - Suppressions
- - Adding a custom StyleCop settings page - Adding custom rule settings - Authoring a custom styleCop rule - Authoring rules metadata - Custom CSharp Language Service - Custom MSBuild Integration - Hosting StyleCop in a Custom Environment - Installing a Custom Rule - Integrating StyleCop Into Build Environments - Integrating StyleCop into MSBuild - Writing Custom Rules for StyleCop