Skip to content

Commit

Permalink
Resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
arturz committed May 31, 2023
1 parent 5fa78d3 commit a044a3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/contexted/delegator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ defmodule Contexted.Delegator do
module
end

functions_docs = ModuleAnalyzer.get_function_docs(module)
functions_specs = ModuleAnalyzer.get_module_specs(module)
functions_docs = ModuleAnalyzer.get_functions_docs(module)
functions_specs = ModuleAnalyzer.get_functions_specs(module)

# Get the module's public functions
functions =
Expand Down
8 changes: 4 additions & 4 deletions lib/contexted/module_analyzer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ defmodule Contexted.ModuleAnalyzer do
@doc """
Fetches the `@doc` definitions for all functions within the given module.
"""
@spec get_function_docs(module()) :: [tuple()]
def get_function_docs(module) do
@spec get_functions_docs(module()) :: [tuple()]
def get_functions_docs(module) do
case Code.fetch_docs(module) do
{:docs_v1, _, _, _, _, _, functions_docs} ->
Enum.filter(functions_docs, fn
Expand All @@ -23,8 +23,8 @@ defmodule Contexted.ModuleAnalyzer do
@doc """
Fetches the `@spec` definitions for all functions within the given module.
"""
@spec get_module_specs(module()) :: [tuple()]
def get_module_specs(module) do
@spec get_functions_specs(module()) :: [tuple()]
def get_functions_specs(module) do
case Code.Typespec.fetch_specs(module) do
{:ok, specs} -> specs
_ -> []
Expand Down

0 comments on commit a044a3a

Please sign in to comment.