ExDNA.Detection.Detector (ExDNA v1.5.0)

Copy Markdown View Source

Orchestrates the clone detection pipeline.

  1. Collect files matching the configured paths/globs.
  2. Parse each file into an AST.
  3. Extract fingerprinted fragments from every AST.
  4. Group fragments by hash — groups of 2+ are clones.
  5. 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

run(config)

Run detection for the given config. Returns a list of Clone structs.

run(config, file_ast_pairs)

Run detection on pre-parsed ASTs.

Accepts a list of {filename, ast} tuples (e.g. from Credo's ETS cache) and skips file I/O and parsing entirely.