
# Objective - Many of the items in the `ci` tool use `pub(crate)`, which is functionally equivalent to `pub` when the crate is not a library. - A few items are missing documentation. ## Solution - Make all `pub(crate)` items just `pub`. - `pub` is easier to type and less obscure, and there's not harm from this change. - Add / modify documentation on `CI`, `Prepare`, and `PreparedCommand`.
21 lines
604 B
Rust
21 lines
604 B
Rust
use crate::{Flag, Prepare, PreparedCommand};
|
|
use argh::FromArgs;
|
|
use xshell::cmd;
|
|
|
|
/// Check for clippy warnings and errors.
|
|
#[derive(FromArgs, Default)]
|
|
#[argh(subcommand, name = "clippy")]
|
|
pub struct ClippyCommand {}
|
|
|
|
impl Prepare for ClippyCommand {
|
|
fn prepare<'a>(&self, sh: &'a xshell::Shell, _flags: Flag) -> Vec<PreparedCommand<'a>> {
|
|
vec![PreparedCommand::new::<Self>(
|
|
cmd!(
|
|
sh,
|
|
"cargo clippy --workspace --all-targets --all-features -- -Dwarnings"
|
|
),
|
|
"Please fix clippy errors in output above.",
|
|
)]
|
|
}
|
|
}
|