Skip to main content

FindingIdQuery

Struct FindingIdQuery 

Source
pub struct FindingIdQuery {
    pub requested: Vec<String>,
    pub found: Vec<String>,
    pub missing: Vec<String>,
    pub filtered: Vec<String>,
    pub conclusive: bool,
    pub inconclusive_reasons: Vec<FindingIdQueryReason>,
    pub analysis_fingerprint: String,
}
Expand description

The result of a --finding-id query, present only when the run received one or more --finding-id values.

A requested id that is missing from a conclusive run means “fixed, suppressed, or ignored by config”, never “unknown”: an inline suppression comment or an ignoreFindings entry is a choice a person made to hide the finding, so it counts as absent. A missing id in a run that is not conclusive is unknown, never resolved.

Every list keeps the order of requested. found and missing partition requested. filtered is a subset of missing.

Fields§

§requested: Vec<String>

The requested ids, without duplicates, in the order of the arguments.

§found: Vec<String>

The requested ids that this report contains.

§missing: Vec<String>

The requested ids that this report does not contain. When conclusive is true, a missing id is fixed, suppressed, or ignored by config. Otherwise its state is unknown.

§filtered: Vec<String>

The missing ids that the analysis still found before a filter of this run (scope, baseline, issue-type filter) removed them. Such a finding still exists.

§conclusive: bool

True when no option of this run can hide a finding without a fix, and no requested id was filtered. Only then does a missing id mean that the analysis no longer reports the finding.

§inconclusive_reasons: Vec<FindingIdQueryReason>

Why the query is not conclusive, sorted. Empty exactly when conclusive is true.

§analysis_fingerprint: String

A stable hash (af1:<16 hex digits>) of every input other than the source code that decides which findings the run reports:

  • the fallow version;
  • the merged config after extends (without keys that only shape other commands), the loaded external plugins and rule packs;
  • production mode, includeEntryExports, the effective rules, the type-aware mode, requirement and project list, the file size limit;
  • the root-relative path and content of each repository .gitignore, .ignore and .git/info/exclude, each package.json, each tsconfig*.json and jsconfig*.json with the files its extends names, and each file that matches a built-in or external plugin config pattern (for example vite.config.ts).

File content is normalized (CRLF to LF, trailing newlines removed). Known exclusions: the global git excludes file and other machine environment outside the FALLOW_* variables. Store the fingerprint with a verdict. A later query with another fingerprint is unknown, even when conclusive is true. An edit to a source file keeps it; an edit to a manifest or project config changes it, also when the edit fixes a dependency finding.

Implementations§

Source§

impl FindingIdQuery

Source

pub fn new( requested: Vec<String>, is_found: impl Fn(&str) -> bool, is_filtered: impl Fn(&str) -> bool, run_reasons: impl IntoIterator<Item = FindingIdQueryReason>, analysis_fingerprint: String, ) -> Self

Build the query result.

requested must be free of duplicates. found and filtered are membership tests over requested. run_reasons are the options of the run that can hide a finding; Filtered is added when an id was filtered.

Trait Implementations§

Source§

impl Clone for FindingIdQuery

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FindingIdQuery

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for FindingIdQuery

Source§

impl PartialEq for FindingIdQuery

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for FindingIdQuery

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for FindingIdQuery

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more