id = "elm-format" name = "elm-format" homepage = "https://github.com/avh4/elm-format" description = "Format Elm source code in the idiomatic way." executables = ["elm-format"] [commands] format = 1 label = "Format Elm code" description = "Format Elm files in place, to a separate file, or check them. Files are overwritten unless --output or --validate is used." quality = "ai-draft" base = "fig:elm-format" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/elm-format.ts" license = "MIT" [[commands.field]] id = "input" label = "Files or directories" type = "path" path = { kind = "any", role = "input", must_exist = true } position = 0 multiple = true effect = "overwrite" sources = ["fig"] [[commands.field]] id = "output" label = "Output file" description = "Write here instead of overwriting the source." type = "path" path = { kind = "file", role = "output" } option = ["--output"] sources = ["fig"] [[commands.field]] id = "validate" label = "Validate only" description = "Check formatting without changing files." type = "boolean" option = ["--validate"] sources = ["fig"] [[commands.field]] id = "yes" label = "Answer yes to prompts" type = "boolean" option = ["--yes"] sources = ["fig"] [[commands.field]] id = "elm_version" label = "Elm version" type = "string" option = ["--elm-version"] suggestions = [{ value = "0.19", label = "0.19" }, { value = "0.18", label = "0.18" }] sources = ["fig"] [[commands.task]] id = "validate" label = "Check formatting" fields = ["input", "validate"] required = ["input"] set = { validate = [true] } [[commands.task]] id = "format" label = "Format in place" fields = ["input", "yes"] required = ["input"] [[commands.group]] id = "basic" label = "Basic" fields = ["input", "validate", "yes"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["output", "elm_version"]