DocLinkChecker 1.9.0
See the version list below for details.
dotnet tool install --global DocLinkChecker --version 1.9.0
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local DocLinkChecker --version 1.9.0
#tool dotnet:?package=DocLinkChecker&version=1.9.0
nuke :add-package DocLinkChecker --version 1.9.0
Documentation link checker
This tool can be used to check references in markdown files.
Usage
DocLinkChecker -d <docs folder> [-vac]
-d, --docfolder Required. Folder containing the documents.
-v, --verbose Show verbose messages.
-a, --attachments Check the .attachments folder in the root of the docfolder for unreferenced files.
-c, --cleanup Remove all unreferenced files from the .attachments folder in the root of the docfolder. Must be used in combination with -a flag.
-t, --table Check that tables are well formed.
--help Display this help screen.
--version Display version information.
If normal return code of the tool is 0, but on error it returns 1.
Warnings, errors and verbose
If the tool encounters situations that might need some action, a warning is written to the output. The table of contents is still created.
If the tool encounters an error, an error message is written to the output. The table of contents will not be created.
Exit Code | Description |
---|---|
0 | Execution has finished successfully |
1 | Arguments Parsing Exception |
2 | Incorrect Table Format |
999 | Unknown Exception |
If you want to trace what the tool is doing, use the -v or verbose
flag to output all details of processing the files and folders and creating the table of contents.
What it checks for links
The tool will track all use of []()
. If the link is a web URL, an internal reference (starting with a '#') an e-mail address or a reference to a folder, it's not checked. Other links are checked if they exist in the existing docs hierarchy or on local disc (for code references). Errors are written to the ouput mentioning the filename, the linenumber and position in the line. In the check we also decode the references to make sure we properly check HTML enccoded strings as well (using %20 for instance).
All references are stored in a table to use in the check of the .attachments folder (with the -a flag). All files in this folder that are not referenced are marked as 'unreferenced'. If the -c flag is provided as well, the files are removed from the .attachments folder.
What it checks for tables
The tool will check that tables are well formed. Here are the rules to respect:
- There should be an empty line before the table (it is required to get proper output from DocFX).
- Tables should start with the character
|
and ends with the same character. - Tables are at least 2 columns
- The second line of the table should be with at least 3 characters
-
as separators
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
1.28.0 | 302 | 11/26/2024 |
1.27.0 | 316 | 11/21/2024 |
1.24.0 | 581 | 11/14/2024 |
1.23.0 | 960 | 10/30/2024 |
1.22.0 | 226 | 10/29/2024 |
1.21.0 | 5,305 | 9/2/2024 |
1.20.0 | 836 | 8/21/2024 |
1.19.0 | 7,067 | 5/16/2024 |
1.18.0 | 5,448 | 1/18/2024 |
1.17.0 | 2,378 | 12/8/2023 |
1.16.0 | 1,183 | 11/15/2023 |
1.15.0 | 489 | 11/6/2023 |
1.14.0 | 166 | 11/2/2023 |
1.13.0 | 395 | 10/24/2023 |
1.12.0 | 461 | 10/12/2023 |
1.10.0 | 4,610 | 4/5/2023 |
1.9.0 | 228 | 4/4/2023 |