Coverex - Coverage Reports for Elixir v1.4.10 Coverex.Source
This module provides access to the source code the system to be analyzed.
Summary
Functions
Returns the aliased module name if there are any dots in its name
Returns the atom module name based on the (reversed) alias list
Returns the coverall data for the list of mods as Elixir datastructure. This can be encoded as JSON for uploading to coveralls
Strips the current directory from the path
Returns all modules and functions together with their start lines as they definend in the given quoted code
Returns the quoted code and the source of a module
Gets a list of all modules within one sourcefile. Calculates the coverage data for each module and merges them together. Returns a mapping of line number to coverage data for the entire source file. Guarantees that all line numbers up to the maximun reached line are filled in
This function aggregates the coverage information per module to a coverage information per source file
Types
line_entries :: %{optional(pos_integer) => {pos_integer | nil, binary | nil}}
line_pairs :: %{optional(symbol) => pos_integer}
lines :: {pos_integer, pos_integer | nil}
modules :: %{optional(symbol) => line_pairs}
source_file :: %{name: String.t, source: String.t, coverage: [pos_integer | nil]}
symbol :: :atom
Functions
Specs
coveralls_data([symbol]) :: [source_file]
Returns the coverall data for the list of mods as Elixir datastructure. This can be encoded as JSON for uploading to coveralls.
Specs
find_all_mods_and_funs(any) :: modules
Returns all modules and functions together with their start lines as they definend in the given quoted code
Specs
generate_lines([{{symbol, pos_integer}, pos_integer}], line_pairs) :: line_entries
Specs
get_quoted_source(atom) :: {Macro.t, binary}
Returns the quoted code and the source of a module
Specs
merge_coverage([{symbol, lines}]) :: line_entries
Gets a list of all modules within one sourcefile. Calculates the coverage data for each module and merges them together. Returns a mapping of line number to coverage data for the entire source file. Guarantees that all line numbers up to the maximun reached line are filled in.
Specs
sources_and_lines([{symbol, [lines]}]) :: [{filename, line_entries}]
This function aggregates the coverage information per module to a coverage information per source file.
Takes a list of modules and determines the list of corresponding filenames. Returns to each filename a map of coverage information for the entire file.