pub struct Clippy;Expand description
The adapter.
Implementations§
Source§impl Clippy
impl Clippy
Sourcepub fn invocation(features: &FeatureSet) -> Invocation
pub fn invocation(features: &FeatureSet) -> Invocation
The argv that produces the stream Clippy::normalize parses, at a
stated feature set.
--workspace --all-targets mirrors the gate this repository already runs
(AGENTS.md), so the count a contributor sees here is the count CI will
see. -D warnings is deliberately not passed: this command reports,
and the levels the repository declares in [workspace.lints] are part of
what is being reported.
Sourcepub fn offline_invocation(features: &FeatureSet) -> Invocation
pub fn offline_invocation(features: &FeatureSet) -> Invocation
The argv for a run whose network is denied by a boundary rather than by good manners.
Clippy::invocation plus --offline, and the two are separate
functions rather than a flag on one because they describe different
situations rather than different preferences. On the host, cargo may
legitimately reach a registry for a dependency the user has not fetched
yet; that is their machine and their choice, and --locked already stops
the one write into the tree that would follow. In a guest there is no
interface to reach it with, so the question is only whether cargo finds
that out from --offline or from a DNS timeout inside a VM.
It is worth the flag for the error message alone. Without it a missing
crate surfaces as a network failure from inside a machine the user cannot
see; with it, cargo says “attempting to make an HTTP request, but
–offline was specified”, which [crate::lint_sandbox] turns into the
one thing that would actually help — fetch it on the host first.
Sourcepub fn parse(
native: &[u8],
ctx: &NativeContext<'_>,
) -> Result<(NormalizedReport, Summary), ExecError>
pub fn parse( native: &[u8], ctx: &NativeContext<'_>, ) -> Result<(NormalizedReport, Summary), ExecError>
Parse a cargo --message-format=json stream, returning the normalised
report and what the stream contained besides findings.
Adapter::normalize is this without the second half; the counts exist
because the ephemeral report prints them, and a trait shared with stored
analyzers has nowhere to carry them.
§Errors
Returns ExecError::MalformedReport when the stream carries no
build-finished message — the marker that distinguishes a completed
cargo run from empty output, and therefore a clean tree from a run that
never happened.
Trait Implementations§
Source§impl Adapter for Clippy
impl Adapter for Clippy
Source§fn analyzer(&self) -> &'static str
fn analyzer(&self) -> &'static str
Source§fn summary(&self) -> &'static str
fn summary(&self) -> &'static str
roteiro security status and --help.Source§fn languages(&self) -> &'static [&'static str]
fn languages(&self) -> &'static [&'static str]
Source§fn asset_ids(&self) -> &'static [&'static str]
fn asset_ids(&self) -> &'static [&'static str]
crate::assets). An empty slice means it needs none.Source§fn host_programs(&self) -> &'static [&'static str]
fn host_programs(&self) -> &'static [&'static str]
PATH for this analyzer to run on this host,
in the order a reader would install them. Read moreSource§fn command(&self, _assets: &AssetPaths<'_>) -> Invocation
fn command(&self, _assets: &AssetPaths<'_>) -> Invocation
Adapter::normalize parses, with egress configured off. Read more