Configuration Options Reference
CommentSense can be configured using EditorConfig (.editorconfig) files. All options are prefixed with comment_sense..
Visibility and Scope
visibility_level
Specifies the visibility threshold for members that should be analyzed.Valid values:
public- Only public membersprotected- Public and protected members (default)internal- Public, protected, and internal membersprivate- All members including private
exclude_constants
When enabled, constant fields are excluded from documentation requirements.
exclude_enums
When enabled, enum members are excluded from documentation requirements.
Inheritance Documentation
allow_implicit_inheritdoc
When enabled, members that override or implement base members without explicit documentation are treated as having implicit
<inheritdoc />.Documentation Quality
min_summary_length
The minimum required character length for summary documentation. Set to 0 to disable.
require_ending_punctuation
When enabled, summary documentation must end with punctuation (
., !, or ?).require_capitalization
When enabled, summary documentation must start with a capital letter.
similarity_threshold
The threshold (0.0-1.0) for detecting when documentation text is too similar to the member name. Higher values are stricter. Set to 0.0 to disable.
rename_similarity_threshold
The threshold (0.0-1.0) used for detecting renamed parameters in ghost reference detection. Values range from 0.0 (lenient) to 1.0 (strict).
low_quality_terms
A comma-separated list of terms that indicate low-quality documentation (e.g., “TODO”, “FIXME”). Documentation containing these terms will trigger CSENSE016.
Language Keywords
langwords
A comma-separated list of C# keywords that should be wrapped in
<see langword="..." /> tags.Exception Documentation
ignored_exceptions
A comma-separated list of exception type names that should be ignored by CSENSE012 (missing exception documentation).
ignore_system_exceptions
When enabled, all exceptions in the
System namespace are ignored by CSENSE012.ignored_exception_namespaces
A comma-separated list of namespaces whose exceptions should be ignored by CSENSE012.
scan_called_methods_for_exceptions
When enabled, CommentSense will scan methods called within the current method to detect exceptions they might throw. This is an experimental feature.
Ghost References
ghost_references.mode
Controls how aggressively CommentSense detects parameter and type parameter names mentioned in documentation without proper
<paramref> or <typeparamref> tags.Valid values:off- Ghost reference detection is disabledsafe- Only checks complex names (camelCase, PascalCase, underscores, or digits) and ignores all-lowercase words entirelystrict- Checks all parameters regardless of casing or length
Documentation Tag Order
tag_order
A comma-separated list defining the expected order of XML documentation tags. Used by CSENSE024.
inheritdocsummarytypeparamparamreturns/value(same priority)exceptionremarksexampleseealsopermission
returns but not value, they will share the same priority. Similarly, if you specify value but not returns, they will share the same priority.
Conditional Suppression
enable_conditional_suppression
When enabled, CommentSense will suppress certain compiler warnings (like CS1591, CS1573, CS1574) that it already handles with its own diagnostics.
Complete Example
Here’s a comprehensive.editorconfig example with commonly used options:
Configuration Scope
EditorConfig options can be scoped to specific directories or file patterns:Legacy Options
analyze_internal (Deprecated)
Deprecated: Use
visibility_level = internal instead.When enabled, internal members are analyzed in addition to public and protected members.