oaspec/formatter

Types

Errors from formatting operations.

pub type FormatError {
  GleamNotFound
  FormatFailed(exit_code: Int)
}

Constructors

  • GleamNotFound
  • FormatFailed(exit_code: Int)

Values

pub fn error_to_string(error: FormatError) -> String

Convert a format error to a human-readable string.

pub fn format_files(
  dirs: List(String),
) -> Result(Nil, FormatError)

Format generated Gleam files in the given directories using gleam format.

Search Document