A danger-js plugin to watch that your documentation is up to date. Making a change without also modifying the related document will result in MR comment that needs to be resolved.
Install:
yarn add danger-plugin-watchdoc --dev
At a glance:
// dangerfile.js
import { schedule } from 'danger'
import watchdoc from 'danger-plugin-watchdoc'
schedule(watchdoc(
ignore: ["CHANGELOG.md", "test/**"], // Any documents that should be ignored
doc: ["**/*.md"] // Documents to watch
))
Watchdoc will look for any comments including @watchdoc <file>
in documents (only markdown is currently supported):
<!-- doc.md -->
# Documentation
<!-- @watchdoc hello.c -->
This code prints "hello world!" to STDOUT.
It will check whether the related document was changed and will raise comments in MR if the document was not changed together with the source.
See the GitHub release history.
See CONTRIBUTING.md.