Contexted.ModuleAnalyzer (contexted v0.3.2)
The Contexted.ModuleAnalyzer
defines utils functions that analyze and extract information from other modules.
Link to this section Summary
Functions
Generates a list of unique argument names based on the given arity.
Finds and returns the @doc
definition in string format for the specified function name and arity.
Returns nil
if the function is not found in the function docs.
Finds and returns the @spec
definition in string format for the specified function name and arity.
Returns nil
if the function is not found in the specs.
Fetches the @doc
definitions for all functions within the given module.
Fetches the @spec
definitions for all functions within the given module.
Link to this section Functions
generate_random_function_arguments(arity)
@spec generate_random_function_arguments(non_neg_integer()) :: [atom()]
Generates a list of unique argument names based on the given arity.
get_function_doc(functions_docs, name, arity)
@spec get_function_doc([tuple()], atom(), non_neg_integer()) :: String.t() | nil
Finds and returns the @doc
definition in string format for the specified function name and arity.
Returns nil
if the function is not found in the function docs.
get_function_spec(specs, function_name, arity)
@spec get_function_spec([tuple()], atom(), non_neg_integer()) :: String.t() | nil
Finds and returns the @spec
definition in string format for the specified function name and arity.
Returns nil
if the function is not found in the specs.
get_functions_docs(module)
Fetches the @doc
definitions for all functions within the given module.
get_functions_specs(module)
Fetches the @spec
definitions for all functions within the given module.