opentelemetry-rust
opentelemetry-rust copied to clipboard
Add script to run all cargo tasks
Currently it is tedious to manually run fmt, test, clippy, etc when developing locally. Consider adding another script to ./scripts that runs all and update contributing docs.
Should be cargo bench
included? Or only cargo fmt
, cargo clippy --all
and cargo test --all
?
probably not bench, but fmt clippy and test, could have a script that calls the other two current scripts and runs cargo fmt
I'm looking at test.sh
. There commands for testing opentelemetry, opentelemetry-contrib, opentelemetry-jaeger and opentelemetry-zipkin crates. Should other crates be added?
Ideally this would run cargo test
to run with the default features, and cargo test --all-features
to run tests with all the features set (the full feature matrix is probably not something we want folks to run locally). It looks like those manifest tests are to work around the issue that currently cargo will not actually pick up the individual crate feature flags when --all-features
is set at the workspace level.
That being said it doesn't look like the remaining crates need to be run in that way because they do not have any features so they are fully covered by the initial cargo test
What do you think about cargo-make? Is it worth trying?
I think this could likely be accomplished with something as simple as $ cargo fmt && ./scripts/lint.sh && ./scripts/test.sh
At work, we use just with a command called pre-commit
. It encompasses fmt
, clippy
and test
.
In general, tools like just
should be preferred over pure bash scripts for more cross-platform interoperability.
Scripts have been added.