pub struct DuplicatesConfig {
pub enabled: bool,
pub mode: DetectionMode,
pub min_tokens: usize,
pub min_lines: usize,
pub threshold: f64,
pub ignore: Vec<String>,
pub skip_local: bool,
pub cross_language: bool,
pub normalization: NormalizationConfig,
}Expand description
Configuration for code duplication detection.
Fields§
§enabled: boolWhether duplication detection is enabled.
mode: DetectionModeDetection mode: strict, mild, weak, or semantic.
min_tokens: usizeMinimum number of tokens for a clone.
min_lines: usizeMinimum number of lines for a clone.
threshold: f64Maximum allowed duplication percentage (0 = no limit).
ignore: Vec<String>Additional ignore patterns for duplication analysis.
skip_local: boolOnly report cross-directory duplicates.
cross_language: boolEnable cross-language clone detection by stripping type annotations.
When enabled, TypeScript type annotations (parameter types, return types,
generics, interfaces, type aliases) are stripped from the token stream,
allowing detection of clones between .ts and .js files.
normalization: NormalizationConfigFine-grained normalization overrides on top of the detection mode.
Trait Implementations§
Source§impl Clone for DuplicatesConfig
impl Clone for DuplicatesConfig
Source§fn clone(&self) -> DuplicatesConfig
fn clone(&self) -> DuplicatesConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DuplicatesConfig
impl Debug for DuplicatesConfig
Source§impl Default for DuplicatesConfig
impl Default for DuplicatesConfig
Source§impl<'de> Deserialize<'de> for DuplicatesConfig
impl<'de> Deserialize<'de> for DuplicatesConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for DuplicatesConfig
impl JsonSchema for DuplicatesConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for DuplicatesConfig
impl RefUnwindSafe for DuplicatesConfig
impl Send for DuplicatesConfig
impl Sync for DuplicatesConfig
impl Unpin for DuplicatesConfig
impl UnsafeUnpin for DuplicatesConfig
impl UnwindSafe for DuplicatesConfig
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
Mutably borrows from an owned value. Read more