//! Demonstrate `clippy_producer`: build a `Producer` that runs
//! `cargo clippy --message-format=json` and emits one `CheckResult` per
//! diagnostic (warning → warn, error → fail).
//!
//! The example only constructs the producer by default. Set the env var
//! `DEV_TOOLS_EXAMPLE_RUN=1` to actually spawn `cargo clippy` and print
//! the resulting JSON report. Opt-in so CI doesn't pay for it on every
//! run.
//!
//! ```text
//! cargo run --example clippy_producer
//! DEV_TOOLS_EXAMPLE_RUN=1 cargo run --example clippy_producer
//! ```
use clippy_producer;
use Producer;