pub struct InstallHint {
pub program: &'static str,
pub guidance: Guidance,
}Expand description
How to obtain one program from Adapter::host_programs, for the refusal
that discovers it is absent.
The counterpart of the refusal rule in docs/REVIEW_CHECKLIST.md: a refusal
names the way forward, and this is the way forward for the one obstacle
Roteiro will never clear on the reader’s behalf. It is keyed by program and
not by analyzer because a single analyzer’s programs are obtained
differently — cargo-audit needs cargo from rustup and cargo-audit
from crates.io, and one hint covering both would be right about at most one
of them. That is the “right kind of way forward” check, which is the one
that has shipped wrong here before.
§What may go in one, and what may not
- The command is upstream’s, verbatim, or there is none. Every command
below was read off the tool’s own install page at the time it was written,
not recalled. Where upstream documents no single command —
osv-scanneroffers eight platform-specific ones and ranks none — the hint says so and gives the page. A plausible command that fails is worse than a URL. - Never the reader’s package manager. No
brew, noapt, unless upstream itself names one as the way. A canonical ecosystem command is portable and checkable; a package-manager guess is wrong for most readers. - Always the upstream page. A URL ages better than a command line, so even a hint with a good command carries the page that would correct it.
- Saying how is not doing it. Nothing reads a hint and runs it. Roteiro installs no analyzer (ADR-0014), and a refusal that quietly installed one is the silent downgrade ADR-0019 §6 and ADR-0020 §6 forbid.
Fields§
§program: &'static strThe program this obtains — an entry in the same adapter’s
Adapter::host_programs, which is what
tests::every_host_program_has_an_install_hint pairs them by.
guidance: GuidanceWhat to tell the reader, rendered by Guidance so a message built from
it cannot lose its own indentation. See crate::guidance.
Trait Implementations§
Source§impl Clone for InstallHint
impl Clone for InstallHint
Source§fn clone(&self) -> InstallHint
fn clone(&self) -> InstallHint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for InstallHint
Source§impl Debug for InstallHint
impl Debug for InstallHint
impl Eq for InstallHint
Source§impl PartialEq for InstallHint
impl PartialEq for InstallHint
impl StructuralPartialEq for InstallHint
Auto Trait Implementations§
impl Freeze for InstallHint
impl RefUnwindSafe for InstallHint
impl Send for InstallHint
impl Sync for InstallHint
impl Unpin for InstallHint
impl UnsafeUnpin for InstallHint
impl UnwindSafe for InstallHint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.