tracex v0.1.0 Tracex.Project View Source

Wrapper for project metadata

Keeps information about project's source files and defined modules. Project modules can be tagged or have extra attributes assigned.

Link to this section Summary

Functions

Add an extra attribute to a module for future inspection

Add module to the project

Builds project struct from mix config

Returns project module

Returns the list of modules tracked for project, optionally filtered

Tags a module with tag for future filtering

Link to this section Types

Link to this type

project_module()

View Source
project_module() :: Tracex.Project.Module.t()
Link to this type

t()

View Source
t() :: %Tracex.Project{
  modules: %{optional(atom()) => project_module()},
  root_path: binary(),
  source_files: [binary()]
}

Link to this section Functions

Link to this function

add_extra(project, module, key, val)

View Source
add_extra(t(), atom(), atom(), any()) :: t()

Add an extra attribute to a module for future inspection

Link to this function

add_module(project, arg)

View Source
add_module(t(), {atom(), binary()}) :: t()

Add module to the project

Link to this function

build_from_mix_project(config \\ Mix.Project.config())

View Source
build_from_mix_project(keyword()) :: t()

Builds project struct from mix config

Link to this function

get_module(project, module)

View Source
get_module(t(), atom()) :: project_module()

Returns project module

Link to this function

get_modules(project, filters \\ [])

View Source
get_modules(t(), [atom()]) :: [project_module()]

Returns the list of modules tracked for project, optionally filtered

Options:

  • tags - list of tags to filter modules by (at least one tag must match)
Link to this function

tag_module(project, module, tag)

View Source
tag_module(t(), atom(), atom()) :: t()

Tags a module with tag for future filtering