6.2.6.1. C#CloneDetection

Find clones in C# files

Possible Messages

This rule has no predefined messages.

Options

advanced

Options that are normally not required
 

advanced.exclude_nodes : set[typing.Any] = set()

C# syntax node types that are to be excluded from the hashing, even if e.g. a parent class has been included for subtree comparison.
 

advanced.gxl_file : bauhaus.analysis.config.LayerRelativePath | None = None

Output found clones as GXL file.
 

advanced.include_nodes : set[typing.Any] | None = {None}

C# syntax node types that are to be included in the hashing. Include all if empty.
 

advanced.pre_min_lines : int = 2

Minimum length in lines during hashing phase.
 

advanced.pre_min_weight : int = 2

Minimum weight in nodes during hashing phase.
 

advanced.stats_file : bauhaus.analysis.config.LayerRelativePath | None = None

Output statistics of found clones as CSV file.
 

max_density

max_density : int = 2147483647

Maximum density (weight/lines) of clone pairs to report in percent.
 

min_density

min_density : int = 0

Minimum density (weight/lines) of clone pairs to report in percent.
 

min_lines

min_lines : int = 30

Minimum length in lines of clone pairs to report.
 

min_weight

min_weight : int = 30

Minimum weight in nodes of clone pairs to report.
 

no_sequences

no_sequences : bool = False

Do not report cloned sequences.
 

pre_excludes

pre_excludes : set[bauhaus.analysis.config.GlobPattern] = set()

Set of globbing patterns of directories/filenames to exclude in early hashing phase. No clone pair with either left or right side matching those patterns is ever reported (e.g. */MemMap.h).
 

type3_similarity

type3_similarity : int = 80

Minimum similarity of type-3 clones to report in percent.