Credo v1.3.0-rc1 Credo.Check.Design.DuplicatedCode View Source

Link to this section Summary

Functions

explanation() deprecated

Returns the mass (count of instructions) for an AST

params_defaults() deprecated
params_names() deprecated

Takes a map of hashes to nodes and prunes those nodes that are just subnodes of others in the same set

Returns a hash-value for a given +ast+

Link to this section Functions

Link to this function add_masses(found_hashes) View Source
Link to this function calculate_hashes(ast, existing_hashes \\ %{}, filename \\ "foo.ex", mass_threshold \\ param_defaults()[:mass_threshold]) View Source

Calculates hash values for all sub nodes in a given +ast+.

Returns a map with the hashes as keys and the nodes as values.

Link to this function create_issue?(arg1, excluded_macros) View Source
This function is deprecated. Use explanations()[:check] instead.
Link to this function explanation_for_params() View Source
This function is deprecated. Use explanations()[:params] instead.

Returns the mass (count of instructions) for an AST.

This function is deprecated. Use param_defaults/1 instead.
This function is deprecated. Use param_names/1 instead.
Link to this function prune_hashes(given_hashes, mass_threshold \\ param_defaults()[:mass_threshold]) View Source

Takes a map of hashes to nodes and prunes those nodes that are just subnodes of others in the same set.

Returns the resulting map.

Returns a hash-value for a given +ast+.