Detects clone groups that should be refactored into macros rather than functions.
A macro is suggested when a clone group has 3+ fragments that are all
module-level constructs (not inside a def) and contain struct literals
or DSL calls like field :name, :string or pipe_through [:browser].
Summary
Functions
Returns true if the clone group qualifies for a macro extraction suggestion.
Generate a macro name from a clone's fragments.
Functions
@spec macro_candidate?(ExDNA.Detection.Clone.t()) :: boolean()
Returns true if the clone group qualifies for a macro extraction suggestion.
@spec macro_name(ExDNA.Detection.Clone.t()) :: String.t()
Generate a macro name from a clone's fragments.