cargo-readme icon indicating copy to clipboard operation
cargo-readme copied to clipboard

Feature Request: --locked flag for use in CI

Open msrd0 opened this issue 4 years ago • 1 comments
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.

msrd0 avatar Nov 24 '20 21:11 msrd0

For anyone who comes across this and is wondering how to get the functionality today; cargo readme -o README.md && git diff --exit-code

clbarnes avatar Nov 28 '20 12:11 clbarnes