Presubmit.Source.Facts.Function (presubmit v0.2.2)

Copy Markdown View Source

One function or macro, folded across its clauses.

Summary

Functions

Whether the function is part of the module's documented API: public, not marked @doc false, and not in a module marked @moduledoc false.

Identity used for diffing: {module, name, arity}.

Whether the function is callable from other modules (def or defmacro).

Types

kind()

@type kind() :: :def | :defp | :defmacro | :defmacrop

t()

@type t() :: %Presubmit.Source.Facts.Function{
  arity: arity(),
  clauses: [non_neg_integer()],
  delegate?: boolean(),
  deprecated?: boolean(),
  doc: nil | false | :present,
  impl?: boolean(),
  kind: kind(),
  line: pos_integer(),
  module: module(),
  module_hidden?: boolean(),
  name: atom(),
  path: String.t(),
  spec?: boolean()
}

Functions

api?(function)

@spec api?(t()) :: boolean()

Whether the function is part of the module's documented API: public, not marked @doc false, and not in a module marked @moduledoc false.

key(function)

@spec key(t()) :: {module(), atom(), arity()}

Identity used for diffing: {module, name, arity}.

public?(function)

@spec public?(t()) :: boolean()

Whether the function is callable from other modules (def or defmacro).