id = "trunk" name = "Trunk" description = "All-in-one tool for checking, formatting and monitoring code." homepage = "https://trunk.io" executables = ["trunk"] [commands] format = 1 label = "Trunk" description = "Run Trunk checks and formatters. Other subcommands are outside this form." quality = "ai-draft" base = "fig:trunk" 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/trunk.ts" license = "MIT" [[commands.subcommand]] path = ["check"] label = "Check code" description = "Run linters on changed files, or all files." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/trunk.ts" license = "MIT" [[commands.subcommand.field]] id = "paths" label = "Paths" type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "all" label = "All files" type = "boolean" option = ["--all", "-a"] sources = ["fig"] [[commands.subcommand.field]] id = "fix" label = "Apply fixes" type = "boolean" option = ["--fix", "-y"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.field]] id = "no_fix" label = "Do not fix" type = "boolean" option = ["--no-fix", "-n"] sources = ["fig"] [[commands.subcommand.field]] id = "filter" label = "Filter linters" type = "string" option = ["--filter"] sources = ["fig"] [[commands.subcommand.field]] id = "diff" label = "Diff mode" type = "string" option = ["--diff"] suggestions = [{ value = "none", label = "none" }, { value = "compact", label = "compact" }, { value = "full", label = "full" }] sources = ["fig"] [[commands.subcommand.field]] id = "upstream" label = "Upstream branch" type = "string" option = ["--upstream"] sources = ["fig"] [[commands.subcommand.task]] id = "changed" label = "Check changed files" fields = ["paths", "no_fix"] required = [] [[commands.subcommand.task]] id = "all" label = "Check everything" set = { all = [true] } fields = ["paths", "all", "no_fix", "filter"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["paths", "all", "fix", "no_fix"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["filter", "diff", "upstream"] [[commands.subcommand]] path = ["fmt"] label = "Format code" description = "Run formatters on changed files, or all files." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/trunk.ts" license = "MIT" [[commands.subcommand.field]] id = "paths" label = "Paths" type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "all" label = "All files" type = "boolean" option = ["--all", "-a"] sources = ["fig"] [[commands.subcommand.field]] id = "no_fix" label = "Do not fix" type = "boolean" option = ["--no-fix", "-n"] sources = ["fig"] [[commands.subcommand.field]] id = "filter" label = "Filter formatters" type = "string" option = ["--filter"] sources = ["fig"] [[commands.subcommand.field]] id = "upstream" label = "Upstream branch" type = "string" option = ["--upstream"] sources = ["fig"] [[commands.subcommand.task]] id = "fmt" label = "Format changed files" fields = ["paths"] required = [] [[commands.subcommand.task]] id = "all" label = "Format everything" set = { all = [true] } fields = ["paths", "all", "filter"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["paths", "all", "no_fix"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["filter", "upstream"]