6.2.6.4. RustCloneDetection¶
Find clones in Rust files
Detects cloned sections in Rust files using structural comparison.
Computes clones of type-1 (exact), type-2 (parameterized), and type-3
(near-miss) clones. All .rs files within the analyzed Rust project are
processed, filtering options can be applied.
Possible Messages
This rule has no predefined messages.
Options¶
This rule shares the following common options: excludes, includes, justification_checker, post_processing, provider, severity
The following places define options that affect this rule: CloneDetections, Analysis-GlobalOptions
advanced¶
Advanced options for gxl or statistics output.
advanced.gxl_file : bauhaus.analysis.config.LayerRelativePath | None =
Output found clones as GXL file.None
advanced.pre_min_lines : int =
Minimum length in lines during hashing phase.2
advanced.pre_min_weight : int =
Minimum weight in nodes during hashing phase.2
advanced.stats_file : bauhaus.analysis.config.LayerRelativePath | None =
Output statistics of found clones as CSV file.None
max_density¶
max_density : int = 2147483647
min_density¶
min_density : int = 0
min_lines¶
min_lines : int = 30
min_weight¶
min_weight : int = 50
no_sequences¶
no_sequences : bool = False
pre_excludes¶
pre_excludes : set[bauhaus.analysis.config.GlobPattern] = set()
*/MemMap.h).
report_trait_impl_clones¶
report_trait_impl_clones : bool = False
type3_similarity¶
type3_similarity : int = 80