| Crates.io | mdcheck |
| lib.rs | mdcheck |
| version | 0.1.0 |
| created_at | 2025-10-19 16:05:19.842112+00 |
| updated_at | 2025-10-19 16:05:19.842112+00 |
| description | A linter/validator for Markdown files that enforces CommonMark specification |
| homepage | |
| repository | https://github.com/fibnas/mdcheck |
| max_upload_size | |
| id | 1890573 |
| size | 40,404 |
A linter and validator for Markdown files that enforces the CommonMark specification.
Think cargo check, but for Markdown.
cargo install mdcheck
git clone https://github.com/fibnas/mdcheck
cd mdcheck
cargo run --release
Run mdcheck on Markdown files or directories.
mdcheck file1.md file2.md
mdcheck docs/
mdcheck -r project/
mdcheck -o json file.md
mdcheck -s file.md
mdcheck -w file.md
| Code | Meaning |
|---|---|
| 0 | Success — no errors (and no warnings in strict mode) |
| 1 | Failure — errors found, or warnings in strict mode |
document.md:
error 3: Undefined link reference '[missing]'
warning 7: Bare URL detected (consider using link syntax)
warning 12: Inconsistent indentation (prefer 2 or 4 spaces)
Summary: 1 error, 2 warnings in 1 file
$ mdcheck --help
mdcheck 0.1.1
Linter and validator for Markdown files that enforces CommonMark compliance.
USAGE:
mdcheck [OPTIONS] <PATHS>...
ARGS:
<PATHS>... One or more Markdown files or directories to check
OPTIONS:
-r, --recursive Recursively check all Markdown files in subdirectories
-o, --output <FORMAT> Output format: "human" (default) or "json"
-s, --strict Treat warnings as errors (non-zero exit)
-w, --ignore-warnings Ignore warnings, only show errors
-q, --quiet Suppress non-error output
-h, --help Print this help information
-V, --version Show version information
EXAMPLES:
mdcheck README.md
mdcheck -r docs/
mdcheck -o json -s src/docs/
mdcheck -w file1.md file2.md
EXIT CODES:
0 No issues found
1 Errors or warnings (in strict mode)
More info: https://github.com/fibnas/mdcheck
License: MIT
Currently configured via command-line flags.
Future versions may support config files for custom rule sets.
Pull requests are welcome!
Fork, tinker, and open an issue or PR if you’ve got ideas or improvements.
MIT