Practical CI testing for markdown files
OTHER License
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.
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.
Requirements:
These may be installed from the mike42/mdcheckr PPA (Notes for Travis CI users: Installing Dependencies)
sudo add-apt-repository -y ppa:mike42/mdcheckr
sudo apt-get update
sudo apt-get -y install mdcheckr
Fetch the Debian package from releases.
sudo dpkg -i mdcheckr_x.y-z_all.deb
sudo apt-get -f install
Fetch the RPM package from releases.
yum -y install epel-release
yum -y install which pandoc libxml2 mdcheckr-x.y-z.noarch.rpm
ln -s /usr/bin/mktemp /usr/bin/tempfile
This package should be considered a preview only, and is currently being produced with Alien.
You will still need to follow "install from source" instructions. However you need to ensure the dependency of Pandadoc is installed on your mac. Pleasse ensure you have homebrew installed first.
brew update
brew install pandoc
curl https://raw.githubusercontent.com/mike42/mdcheckr/master/mdcheckr -o mdcheckr
chmod +x mdcheckr
sudo mv mdcheckr /usr/local/bin
If the dependencies are available on your system, just copy the shell script itself to /usr/local/bin
:
curl https://raw.githubusercontent.com/mike42/mdcheckr/master/mdcheckr -o mdcheckr
chmod +x mdcheckr
sudo cp mdcheckr /usr/local/bin
mdcheckr [ -h | --help ] [ -v | --version ] FILE ..
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