pub struct CloneRegionFinding {
pub grade: CloneRegionGrade,
pub introduced: bool,
pub groups: Vec<usize>,
pub instances: Vec<CloneRegionSpan>,
pub accepted_by: Vec<String>,
pub ignore_hint: Vec<String>,
pub demotion_reason: Option<CloneDemotionReason>,
}Expand description
A clone region of fallow audit: the clone groups whose instances
overlap, graded as one finding. One paste can give a long group with
fewer copies and a short group with more copies; both are members of one
region (issue #4967).
Fields§
§grade: CloneRegionGradeThe grade of the region against the base.
introduced: boolWhether the region fails the new-only gate. Each member group in
clone_groups[] carries the same introduced value.
groups: Vec<usize>Indices of the member groups in clone_groups[].
instances: Vec<CloneRegionSpan>The union of the member instance lines in each file.
accepted_by: Vec<String>The duplicates.ignoredClones entries that accept the region. An
entry accepts an inherited-edited region when it matched the base
clone, and an introduced region when it hid the head group of each
new copy.
ignore_hint: Vec<String>The keys to put in duplicates.ignoredClones in place of
accepted_by, so that fallow dupes also hides the edited clone.
Present only for an accepted inherited-edited region.
demotion_reason: Option<CloneDemotionReason>Set when the region does not fail the gate because the change wrote no line of a member group whose key is new (issue #2164).
Trait Implementations§
Source§impl Clone for CloneRegionFinding
impl Clone for CloneRegionFinding
Source§impl Debug for CloneRegionFinding
impl Debug for CloneRegionFinding
impl Eq for CloneRegionFinding
Source§impl PartialEq for CloneRegionFinding
impl PartialEq for CloneRegionFinding
Source§impl Serialize for CloneRegionFinding
impl Serialize for CloneRegionFinding
impl StructuralPartialEq for CloneRegionFinding
Auto Trait Implementations§
impl Forget for CloneRegionFinding
impl Freeze for CloneRegionFinding
impl Move for CloneRegionFinding
impl RefUnwindSafe for CloneRegionFinding
impl Send for CloneRegionFinding
impl Sync for CloneRegionFinding
impl Unpin for CloneRegionFinding
impl UnsafeUnpin for CloneRegionFinding
impl UnwindSafe for CloneRegionFinding
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more