XmlCommentChecker 1.1.2
dotnet tool install --global XmlCommentChecker --version 1.1.2
dotnet new tool-manifest
dotnet tool install --local XmlCommentChecker --version 1.1.2
#tool dotnet:?package=XmlCommentChecker&version=1.1.2
nuke :add-package XmlCommentChecker --version 1.1.2
XML Comment Checker
A simple tool to check for missing or incomplete XML comments in C# files. This tool supports both scanning a folder containing multiple C# files and checking an individual file. It reports the methods that are missing or incomplete XML comments.
Features
- Scan entire folders or individual files.
- Detect missing XML documentation comments in methods.
- Supports both folders and individual file inputs.
- Clean and easy-to-read results printed to the console.
Installation
You can install the XmlCommentChecker as a NuGet package in your project.
Usage
1️⃣ Run for a Folder
Scan all .cs files in a folder for missing XML comments:
XmlCommentChecker --folder "FolderPath"
2️⃣ Run for a Single File
Check an individual .cs file for missing XML comments:
XmlCommentChecker --file "FolderPath\FilePath.cs"
3️⃣ Run for Both Folder and File
Scan a folder and check a specific file at the same time:
XmlCommentChecker --folder "FolderPath" --file "FolderPath\FilePath.cs"
Feature Description
The XML Comment Checker Tool checks for missing or incomplete XML comments in C# method declarations. It can be run from the command line and supports the validation of multiple files or a single file. Below are the main features and behavior of the tool.
1. Command-Line Interface (CLI) Support
- The program can be invoked through a command-line interface with the following options:
--folder: Specifies a folder to scan for C# files. The tool will analyze all.csfiles within the specified folder and its subdirectories.--file: Specifies a single C# file to check for XML comments.
2. XML Comment Validation
- The tool analyzes method declarations in C# files and checks for the following XML comment issues:
- Missing XML Comments: Identifies methods that do not have an XML comment.
- Incomplete XML Comments: Detects methods with XML comments that have issues, such as:
- Missing
<summary>tags or empty<summary>tags. - Missing
<param>tags for method parameters. - Empty
<param>descriptions.
- Missing
3. Error and Warning Reporting
The tool provides detailed reports of XML comment issues, including:
- File Path: The path to the C# file where the issue was found.
- Method Name: The name of the method that has the XML comment issue.
- Line Number: The line number where the method is defined.
- Issue: The type of XML comment issue (missing or incomplete).
Warnings are displayed for missing or empty
<summary>and<param>tags.
4. File and Folder Analysis
- The tool can process a specified folder (and its subfolders) or a single file.
- A limit of 500 files is set for folder scanning. If more files are found, the program issues a warning but still processes the first 500 files.
- Symbolic links are skipped during analysis.
Summary
This tool provides developers with an easy way to ensure that their C# code is well-documented with structured XML comments, helping maintain high-quality, consistent documentation across large codebases.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.