Orchestrates the clone detection pipeline.
- Collect files matching the configured paths/globs.
- Parse each file into an AST.
- Extract fingerprinted fragments from every AST.
- Group fragments by hash — groups of 2+ are clones.
- Filter out nested/overlapping clones.
Summary
Functions
Run detection for the given config. Returns a list of Clone structs.
Run detection on pre-parsed ASTs.
Functions
@spec run(ExDNA.Config.t()) :: {[ExDNA.Detection.Clone.t()], non_neg_integer()}
Run detection for the given config. Returns a list of Clone structs.
@spec run(ExDNA.Config.t(), [ {String.t(), Macro.t()} | {String.t(), Macro.t(), String.t()} ]) :: {[ExDNA.Detection.Clone.t()], non_neg_integer()}
Run detection on pre-parsed ASTs.
Accepts a list of {filename, ast} or {filename, ast, source} tuples
(e.g. from Credo's ETS cache) and skips parsing entirely.