Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 2.32 KB

File metadata and controls

54 lines (36 loc) · 2.32 KB

MiKo_2000: Write valid XML documentation

Cause

The XML documentation contains invalid XML syntax or structure.

Rule description

Documentation should be valid XML to generate API documentation and support IntelliSense. This helps developers understand and use the code better, ensuring the documentation is accurate and accessible.

Rationale behind

Invalid XML documentation prevents proper API documentation generation and breaks IntelliSense functionality in development environments. When documentation contains malformed XML, it cannot be processed correctly by documentation tools, leading to incomplete or missing information for developers who need to use the code.

Writing valid XML documentation provides several important benefits:

  • Proper IntelliSense Support: Valid XML ensures that developers see helpful information when using the code. IntelliSense can display accurate parameter descriptions, return values, and usage examples directly in the editor.

  • Successful Documentation Generation: Documentation tools can process valid XML to create comprehensive API reference documentation. This makes it easier to maintain and share knowledge about the codebase.

  • Immediate Error Detection: Valid XML catches documentation mistakes early during development. This prevents issues from accumulating and becoming harder to fix later.

  • Better Code Understanding: Properly formatted documentation is easier to read and understand. Developers can quickly grasp what the code does without diving into the implementation details.

  • Improved Maintainability: When documentation follows XML standards, it is easier to update and maintain over time. Changes to the code can be reflected accurately in the documentation.

  • Tool Integration: Many development tools rely on valid XML documentation to provide features like code analysis and refactoring suggestions. Invalid XML prevents these tools from working correctly.

How to fix violations

To fix a violation of this rule, correct the XML syntax errors in the documentation.

Ensure that all XML tags are properly opened and closed, attributes are correctly quoted, and special characters are properly escaped using XML entities.

How to suppress violations

#pragma warning disable MiKo_2000
#pragma warning restore MiKo_2000