View Source Spark.Igniter (spark v2.2.10)

Helpers for patching Spark DSLs.

Summary

Functions

Returns {igniter, true} if the module has the extension, or {igniter, false} otherwise.

Prepends a new section or list of sections to the section order in a formatter configuration.

Sets an option at a given path within in a DSL.

Functions

Link to this function

add_extension(igniter, module, type, key, extension, singleton? \\ false)

View Source
@spec add_extension(Igniter.t(), module(), module(), atom(), module(), boolean()) ::
  Igniter.t()

Adds an extension to a DSL module.

Link to this function

has_extension(igniter, module, type, key, extension)

View Source
@spec has_extension(Igniter.t(), module(), module(), atom(), module()) ::
  {Igniter.t(), boolean()}

Returns {igniter, true} if the module has the extension, or {igniter, false} otherwise.

Link to this function

prepend_to_section_order(igniter, type, sections)

View Source

Prepends a new section or list of sections to the section order in a formatter configuration.

Link to this function

remove_extension(igniter, module, type, key, extension, singleton? \\ false)

View Source
@spec remove_extension(Igniter.t(), module(), module(), atom(), module(), boolean()) ::
  Igniter.t()

Removes an extension from a DSL module.

Link to this function

set_option(igniter, module, path, value, updater \\ &{:ok, &1})

View Source
@spec set_option(
  Igniter.t(),
  module(),
  dsl_path :: [atom()],
  value :: term(),
  (Sourceror.Zipper.t() ->
     {:ok, Sourceror.Zipper.t()} | {:error, term() | [term()]} | :error)
) :: Igniter.t()

Sets an option at a given path within in a DSL.

Link to this function

update_dsl(igniter, module, path, value, func)

View Source