id = "dart"
name = "Dart"
homepage = "https://dart.dev"
description = "A command-line utility for Dart development."
icon = "theSVG:dart"
executables = ["dart"]
[dotfiles]
paths = []
exclude = []
secret = [
"[appData]/dart/pub-credentials.json",
"[appData]/dart/pub-tokens.json",
]
[commands]
format = 1
label = "Dart commands"
description = "Common dart subcommands: analyze, format, create and pub get. Global flags and other subcommands are left out."
quality = "ai-draft"
base = "fig:dart"
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/dart.ts"
license = "MIT"
[[commands.subcommand]]
path = ["analyze"]
label = "Analyze code"
description = "Static analysis of a Dart project."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/dart.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "directory"
label = "Project directory"
type = "path"
position = 0
path = { kind = "directory", role = "input" }
sources = ["fig"]
[[commands.subcommand.field]]
id = "fatal_infos"
label = "Treat infos as fatal"
type = "boolean"
option = ["--fatal-infos"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "fatal_warnings"
label = "Treat warnings as fatal"
type = "boolean"
option = ["--fatal-warnings"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "no_fatal_warnings"
label = "Do not treat warnings as fatal"
type = "boolean"
option = ["--no-fatal-warnings"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "strict"
label = "Strict analysis"
set = { fatal_infos = [true] }
fields = ["directory", "fatal_infos"]
required = []
[[commands.subcommand.task]]
id = "plain"
label = "Analyze project"
fields = ["directory", "no_fatal_warnings"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["directory", "fatal_infos", "fatal_warnings", "no_fatal_warnings"]
[[commands.subcommand]]
path = ["format"]
label = "Format code"
description = "Rewrites files in place unless an output mode is given."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/dart.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "targets"
label = "Files or directories"
type = "path"
position = 0
multiple = true
path = { kind = "any", role = "input" }
effect = "overwrite"
sources = ["fig"]
[[commands.subcommand.field]]
id = "line_length"
label = "Line length"
type = "integer"
option = ["--line-length", "-l"]
suggestions = [{ value = "80", label = "80" }, { value = "120", label = "120" }]
sources = ["fig"]
[[commands.subcommand.field]]
id = "set_exit_if_changed"
label = "Exit 1 if anything changes"
type = "boolean"
option = ["--set-exit-if-changed"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "fix"
label = "Apply style fixes"
type = "boolean"
option = ["--fix"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "format"
label = "Format in place"
fields = ["targets", "line_length", "fix"]
required = ["targets"]
[[commands.subcommand.task]]
id = "check"
label = "Check only (CI)"
set = { set_exit_if_changed = [true] }
fields = ["targets", "set_exit_if_changed"]
required = ["targets"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["targets", "line_length", "set_exit_if_changed", "fix"]
[[commands.subcommand]]
path = ["create"]
label = "Create project"
description = "Creates a new Dart project from a template."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/dart.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "directory"
label = "Target directory"
type = "path"
position = 0
path = { kind = "directory", role = "output" }
sources = ["fig"]
[[commands.subcommand.field]]
id = "template"
label = "Template"
type = "string"
option = ["--template", "-t"]
suggestions = [{ value = "console", label = "console" }, { value = "package", label = "package" }, { value = "server-shelf", label = "server-shelf" }, { value = "web", label = "web" }]
sources = ["fig"]
[[commands.subcommand.field]]
id = "force"
label = "Generate even if directory exists"
type = "boolean"
option = ["--force"]
effect = "overwrite"
sources = ["fig"]
[[commands.subcommand.field]]
id = "no_pub"
label = "Skip pub get"
type = "boolean"
option = ["--no-pub"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "console"
label = "Console app"
set = { template = ["console"] }
fields = ["directory", "template"]
required = ["directory"]
[[commands.subcommand.task]]
id = "package"
label = "Package"
set = { template = ["package"] }
fields = ["directory", "template"]
required = ["directory"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["directory", "template", "force", "no_pub"]
[[commands.subcommand]]
path = ["pub", "get"]
label = "Get packages"
description = "Resolves and downloads dependencies."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/dart.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "offline"
label = "Use cached packages only"
type = "boolean"
option = ["--offline"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "dry_run"
label = "Dry run"
type = "boolean"
option = ["--dry-run", "-n"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "precompile"
label = "Precompile executables"
type = "boolean"
option = ["--precompile"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "get"
label = "Get packages"
fields = ["offline", "precompile"]
required = []
[[commands.subcommand.task]]
id = "preview"
label = "Preview changes"
set = { dry_run = [true] }
fields = ["dry_run"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["offline", "dry_run", "precompile"]