pub struct QualityRustdocArgs {
pub repo: RepoArgs,
pub format: OutputFormat,
pub kind: Option<String>,
pub summary: bool,
pub tree: Option<PathBuf>,
}Expand description
majordomus quality rustdoc: the tree rustdoc rendered from the crate, judged against the
crate’s own inventory of exported items.
Without --tree the subject is the rustdoc web surface’s artifact as the topology
resolves it, through the capability quality.rustdoc, exactly as HTTP and MCP ask. With
it, a person judges another copy of the same tree — the one scripts/site-build composed
into the site, say — by the same judgement; a path is an input of this terminal only and
never of the capability.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, QualityCommand, QualityRustdocArgs};
let cli = Cli::try_parse_from([
"majordomus", "quality", "rustdoc", "--tree", "site/public/rustdoc", "--kind", "link",
])
.unwrap();
let args: QualityRustdocArgs = match cli.command {
Command::Quality(q) => match q.command {
QualityCommand::Rustdoc(args) => args,
other => panic!("expected `quality rustdoc`, parsed {other:?}"),
},
other => panic!("expected `quality`, parsed {other:?}"),
};
assert_eq!(args.tree.as_deref(), Some(std::path::Path::new("site/public/rustdoc")));
assert_eq!(args.kind.as_deref(), Some("link"));
assert!(!args.summary);Fields§
§repo: RepoArgsWhere and how the repository is read.
format: OutputFormatOutput shape
kind: Option<String>Only findings of this kind, e.g. missing-page, orphan-page, stale, link, machine-path
summary: boolPrint the verdict and the counts and leave the findings out
tree: Option<PathBuf>Judge this directory instead of the rustdoc surface’s artifact, e.g. site/public/rustdoc
Trait Implementations§
Source§impl Args for QualityRustdocArgs
impl Args for QualityRustdocArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl Debug for QualityRustdocArgs
impl Debug for QualityRustdocArgs
Source§impl FromArgMatches for QualityRustdocArgs
impl FromArgMatches for QualityRustdocArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.