# `VirtualTimeGenServer.ModuleReferences`
[🔗](https://github.com/d-led/gen_server_virtual_time/blob/v1.1.0/packages/gen_server_virtual_time/lib/virtual_time_gen_server/module_references.ex#L1)

Finds the modules a source tree refers to.

Reads `.ex` and `.exs` files and reports every remote call and struct literal
with the module it names, the function it calls and where it appears. Files
that do not parse are reported instead of failing the run: a project that does
not compile is exactly when this is useful.

# `module_reference`

```elixir
@type module_reference() :: %{
  module: String.t(),
  function: String.t() | nil,
  file: Path.t(),
  line: pos_integer()
}
```

# `result`

```elixir
@type result() :: %{references: [module_reference()], unparsable: [Path.t()]}
```

# `scan`

```elixir
@spec scan([Path.t()]) :: result()
```

Scans every file below each path (or the file itself) and collects its
references, in source order.

---

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