CommentSense is a Roslyn analyzer for C# that helps keep XML documentation complete, consistent, and useful.
The project is provided as a NuGet package that is published on nuget.org, and it can be installed by running:
dotnet add package CommentSenseCommentSense requires compiler XML documentation parsing:
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>If this is disabled, CommentSense reports CSENSE000.
Add a baseline .editorconfig:
[*.cs]
comment_sense.visibility_level = protected
comment_sense.require_capitalization = true
comment_sense.require_ending_punctuation = trueView docs/getting-started.md for more information.
CommentSense includes over 25 diagnostics, commonly used rules include:
| Rule | Purpose |
|---|---|
CSENSE001 |
Missing symbol documentation |
CSENSE002 / CSENSE004 |
Missing parameter / type parameter docs |
CSENSE006 |
Missing return documentation |
CSENSE012 |
Missing exception documentation |
CSENSE016 |
Low-quality documentation |
CSENSE018 |
Missing explicit inheritdoc (when required) |
Detailed documentation:
- Getting started: docs/getting-started.md
- Rules reference: docs/rules-reference.md
- Configuration reference: docs/configuration.md
- Practical examples: docs/examples.md
Contributions are welcome! Read the contributing guide to get started.
This project is licensed under the MIT License.
