cargo-readme
cargo-readme copied to clipboard
Feature Request: --locked flag for use in CI
trafficstars
Many cargo subcommands implement a --locked flag intended to be used in CI to verify that e.g. the content of the Cargo.lock file matches that of the Cargo.toml file. Since cargo readme updates the readme based on the contents of lib.rs, it would be nice if I could have my CI do something like
cargo readme -o README.md --locked
and have cargo readme verify that the output it would generate is identical to the present readme, without updating the file but rather fail with a non-zero exit code if the output differs.
For anyone who comes across this and is wondering how to get the functionality today; cargo readme -o README.md && git diff --exit-code