Ancora.TaskArgs (ancora v1.0.0-rc.1)

Copy Markdown View Source

Shared validation of OptionParser leftovers for spec mix tasks.

validate/3 returns a uniform error message naming the task, while validate!/3 keeps the raising API for callers that do not need to emit output before rejection.

Summary

Functions

validate(task, rest, invalid)

@spec validate(String.t(), [String.t()], [{String.t(), String.t() | nil}]) ::
  :ok | {:error, String.t()}

validate!(task, rest, invalid)

@spec validate!(String.t(), [String.t()], [{String.t(), String.t() | nil}]) :: :ok