Jai_Format module

find_config

procedure · 1 overloadsince 0.30.0Source

The settings for files in directory: the [format] of the nearest jacket.toml in it or one of its parents, up to and including stop ("" to go to the top), else the defaults. file is the jacket.toml that was used ("" for the defaults); config.root is its directory. When the file cannot be parsed, ok is false and error says why (line N: ...).

find_config :: (
    directory: string,
    read: Format_File_Reader,
    stop := ""
) -> (config: Format_Config, file: string, ok: bool, error: string)

The settings for files in directory: the [format] of the nearest jacket.toml in it or one of its parents, up to and including stop ("" to go to the top), else the defaults. file is the jacket.toml that was used ("" for the defaults); config.root is its directory. When the file cannot be parsed, ok is false and error says why (line N: ...).

Parameters

directory: string
stop := ""

Returns

file: string
ok: bool
error: string

See also