0.0.0-alpha • Published 3 years ago

danger-plugin-watchdoc v0.0.0-alpha

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
3 years ago

danger-plugin-watchdoc

Build Status npm version semantic-release

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.

Usage

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.

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.