Practical CI testing for markdown files
Go to file
Michael Billington f57af24d0c Merge pull request #6 from mike42/feature/packaging
Add Debian packaging
2017-06-06 06:21:58 +10:00
debian depend on 'which' 2017-06-06 06:14:51 +10:00
tests tests for non-terminated code blocks 2017-06-04 15:39:11 +10:00
.travis.yml add debhelper to reuired packages 2017-06-05 17:01:47 +10:00
CONTRIBUTING.md update packaging code 2017-06-04 20:44:25 +10:00
LICENSE.md add license file 2017-06-04 14:12:13 +10:00
Makefile add to copyright file, include manpage and binary in package 2017-06-05 17:24:39 +10:00
README.md Update README.md 2017-06-04 21:22:56 +10:00
mdcheckr rm TODO comment 2017-06-04 16:03:03 +10:00
mdcheckr.1 add manpage 2017-06-04 15:55:51 +10:00

README.md

mdcheckr Build Status

mdcheckr is a testing tool to detect quality problems with your Markdown documentation. It is designed to act as a quality gate in your continuous integration pipeline.

  • Syntax errors in code blocks - Syntax-check code blocks that identify their language. Currently works for:
  • Code blocks- Detection of un-closed code blocks (example)
  • Broken links- Flag files that link to relative paths or URLs on the internet which can't be accessed (example, example).
  • Broken images- Detect broken embeds, local and remote (example, example).

This tool is not intended to enforce a code style, and will not critique aspects of your Markdown code which do not affect the output.

Dependencies

Requirements:

  • curl
  • xmllint
  • pandoc

Installation

curl https://raw.githubusercontent.com/mike42/mdcheckr/master/mdcheckr -o mdcheckr
chmod +x mdcheckr
sudo cp mdcheckr /usr/local/bin

Usage

Check a single markdown file:

mdcheckr README.md

Check all the markdown files in the current directory:

find . -name '*.md' -print0 | xargs -0 mdcheckr

Check all the markdown files in your Git repository:

git ls-files | grep '\.md$' | tr '\n' '\0' | xargs -0 mdcheckr