pub struct DuplicationOptions {
pub analysis: AnalysisOptions,
pub mode: Option<DuplicationMode>,
pub near: Option<bool>,
pub min_tokens: Option<usize>,
pub min_lines: Option<usize>,
pub min_occurrences: Option<usize>,
pub threshold: Option<f64>,
pub skip_local: Option<bool>,
pub cross_language: Option<bool>,
pub ignore_imports: Option<bool>,
pub top: Option<usize>,
pub include_fragments: Option<bool>,
}Expand description
Options for duplication analysis.
Fields§
§analysis: AnalysisOptionsShared analysis options.
mode: Option<DuplicationMode>Detection mode; None defers to the project config.
near: Option<bool>Detect function-scoped near-miss clones in addition to exact clones.
None defers to the project config.
min_tokens: Option<usize>Minimum number of tokens for a clone.
min_lines: Option<usize>Minimum number of lines for a clone.
min_occurrences: Option<usize>Minimum number of occurrences before a clone group is reported. Values below 2 are silently treated as 2 by the engine-facing adapter.
threshold: Option<f64>Maximum allowed duplication percentage before the gate fails; 0 means
no limit. None defers to the project config.
skip_local: Option<bool>Only report cross-directory duplicates. None defers to the project
config.
cross_language: Option<bool>Match clones across languages. None defers to the project config.
ignore_imports: Option<bool>Exclude module wiring from clone detection. None defers to the project
config.
top: Option<usize>Cap on the number of reported clone groups.
include_fragments: Option<bool>Emit the verbatim source text on each clone instance. None keeps the
text, matching fallow dupes without --no-fragments; Some(false)
yields a location-only payload.
Trait Implementations§
Source§impl Clone for DuplicationOptions
impl Clone for DuplicationOptions
Source§impl Debug for DuplicationOptions
impl Debug for DuplicationOptions
Auto Trait Implementations§
impl Freeze for DuplicationOptions
impl RefUnwindSafe for DuplicationOptions
impl Send for DuplicationOptions
impl Sync for DuplicationOptions
impl Unpin for DuplicationOptions
impl UnsafeUnpin for DuplicationOptions
impl UnwindSafe for DuplicationOptions
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<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