# `VulnCheck.Workspace.Detector`
[🔗](https://github.com/Voskan/vulncheck/blob/v1.0.1/lib/vulncheck/workspace/detector.ex#L1)

Detects the kind of BEAM project located in a directory.

  * `:umbrella` — `mix.exs` declaring `apps_path` (or an `apps/*/mix.exs`
    layout) with a root `mix.lock`
  * `:mix` — `mix.exs` with `mix.lock`
  * `:gleam` — `gleam.toml` with `manifest.toml`
  * `:rebar3` — `rebar.config` with `rebar.lock`

# `info`

```elixir
@type info() :: %{
  type: :mix | :umbrella | :rebar3 | :gleam,
  root: String.t(),
  lockfile: String.t(),
  manifest: String.t()
}
```

# `detect`

```elixir
@spec detect(Path.t()) ::
  {:ok, info()} | {:error, :lockfile_not_found | :unknown_project, String.t()}
```

Detects the project type of `dir`.

Returns `{:error, :lockfile_not_found, details}` when a project manifest is
present without its lockfile, and `{:error, :unknown_project, details}` when
no supported manifest exists.

---

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