//! Generate the linter-rules reference page from rule metadata.
//!
//! Run with `cargo run --example docgen`. It renders the same markdown the
//! snapshot test pins ([`badness::linter::docs::render_reference_page`]) and
//! writes it to the mdBook source tree. Living as an `examples/` target (not a
//! `[[bin]]`) keeps badness a single, publishable crate.
use fs;
use io;
use Path;
use render_reference_page;
/// Write `content` to `path` only when it differs from what's already there, so
/// re-running the generator leaves an unchanged file (and its mtime) alone.