Credo v1.3.0-rc1 Credo.Check.Design.DuplicatedCode View Source
Link to this section Summary
Functions
Calculates hash values for all sub nodes in a given +ast+
explanation()
deprecated
explanation_for_params()
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
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.
This function is deprecated. Use explanations()[:check] instead.
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+.