# `Reach.Project`
[🔗](https://github.com/elixir-vibe/reach/blob/v2.2.0/lib/reach/project.ex#L1)

Multi-file project analysis.

Builds graphs for all source files in a project, links cross-module
call edges, and applies external function summaries for dependencies.

## Examples

    # Analyze a full Mix project
    project = Reach.Project.from_mix_project()

    # Analyze specific paths
    project = Reach.Project.from_glob("lib/**/*.ex")

    # Query across the whole project
    Reach.Project.taint_analysis(project,
      sources: [type: :call, function: :params],
      sinks: [type: :call, module: System, function: :cmd]
    )

# `t`

```elixir
@type t() :: %Reach.Project{
  call_graph: Graph.t(),
  graph: Graph.t(),
  modules: %{required(module()) =&gt; map()},
  nodes: %{required(Reach.IR.Node.id()) =&gt; Reach.IR.Node.t()},
  plugins: [module()],
  summaries: %{required({module(), atom(), non_neg_integer()}) =&gt; map()}
}
```

# `from_glob`

```elixir
@spec from_glob(
  String.t(),
  keyword()
) :: t()
```

Builds a project graph from a glob pattern.

# `from_mix_project`

```elixir
@spec from_mix_project(keyword()) :: t()
```

Builds a project graph from the current Mix project.

Uses `Mix.Project.config()` to discover source paths via `:elixirc_paths`
and `:erlc_paths`. Umbrella children are included automatically.

# `from_sources`

```elixir
@spec from_sources(
  [Path.t()],
  keyword()
) :: t()
```

Builds a project graph from source file paths.

# `summarize_dependency`

```elixir
@spec summarize_dependency(module()) :: %{
  required({module(), atom(), non_neg_integer()}) =&gt; map()
}
```

Computes a function summary for a compiled dependency module.

Returns a map of `{module, function, arity} => %{param_index => flows_to_return?}`.
These summaries can be passed as the `:summaries` option to `from_sources/2`.

# `taint_analysis`

```elixir
@spec taint_analysis(
  t(),
  keyword()
) :: [map()]
```

Runs taint analysis across the entire project.

Same interface as `Reach.taint_analysis/2` but searches all modules.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
