Capstone.Config.Project (Capstone v0.33.3)

Copy Markdown View Source

The project: section of target.exs — the identity of the generated project.

name and github_org are required. module and app, when the key is absent, are derived from name — never from a placeholder — so an incomplete project: block still produces a config a real project could boot with.

module accepts any atom, not only a plausible module alias: telling "looks like a real module" from "is any atom" would mean loading the module, which a generator must never do (goals.md G6 — nothing here evaluates target.exs, and loading code is a form of evaluating it).

Summary

Functions

Builds a t/0 from the raw project: keyword list, prefixing every error path with path.

Types

t()

@type t() :: %Capstone.Config.Project{
  app: atom(),
  github_org: String.t(),
  module: module(),
  name: String.t()
}

Functions

from_keyword(fields, path)

@spec from_keyword(
  keyword(),
  Capstone.Config.path()
) :: {:ok, t()} | {:error, [Capstone.Config.error()]}

Builds a t/0 from the raw project: keyword list, prefixing every error path with path.