Skip to content

Thomas-Shephard/comment-sense

Repository files navigation

CommentSense

CommentSense is a Roslyn analyzer for C# that helps keep XML documentation complete, consistent, and useful.

CommentSense in Action

The project is provided as a NuGet package that is published on nuget.org, and it can be installed by running:

dotnet add package CommentSense

Requirements

CommentSense requires compiler XML documentation parsing:

<PropertyGroup>
  <GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

If this is disabled, CommentSense reports CSENSE000.

Quick start

Add a baseline .editorconfig:

[*.cs]
comment_sense.visibility_level = protected
comment_sense.require_capitalization = true
comment_sense.require_ending_punctuation = true

View docs/getting-started.md for more information.

Common Rules

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)

Documentation

Detailed documentation:

Contributions

Contributions are welcome! Read the contributing guide to get started.

License

This project is licensed under the MIT License.

About

A Roslyn analyzer for C# that enforces XML documentation on public APIs

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages