You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update dartdev to use the format command object from dart_style.
I thought that this landed over a month ago. This needs to be rolled into the Dart SDK 2.9
New output from dart format --help:
Idiomatically formats Dart source code.
Usage: dart format [options...] <files or directories...>
-h, --help Print this usage information.
Common options:
-o, --output Where formatted output should be written.
[json] Print code and selection as JSON
[none] Discard.
[show] Print code to terminal.
[write] (default) Overwrite formatted files on disc.
--show Which filenames to print.
[all] All visited files and directories.
[changed] (default) Only the names of files whose formatting is changed.
[none] No file names or directories.
--summary Summary shown after formatting completes.
[line] (default) Single line summary.
[none] No summary.
[profile] Tracks how long it took for format each file.
Non-whitespace fixes (off by default):
--fix Apply all style fixes.
--fix-doc-comments Use triple slash for documentation comments.
--fix-function-typedefs Use new syntax for function type typedefs.
--fix-named-default-separator Use "=" as the separator before named parameter default values.
--fix-optional-const Remove "const" keyword inside constant context.
--fix-optional-new Remove "new" keyword.
--fix-single-cascade-statements Remove unnecessary single cascades from expression statements.
Other options:
-l, --line-length Wrap lines longer than this.
(defaults to "80")
-i, --indent Spaces of leading indentation.
(defaults to "0")
--set-exit-if-changed Return exit code 1 if there are any formatting changes.
--follow-links Follow links to files and directories.
If unset, links will be ignored.
--version Show version information.
Options when formatting from stdin:
--selection Selection to preserve formatted as "start:length".
--stdin-name The path name to show when an error occurs.
(defaults to "stdin")
Run "dart help" to see global options.
Change-Id: I18a49abd919672e988296f83c23636b14c29bdeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153900
Reviewed-by: Bob Nystrom <[email protected]>
Commit-Queue: Jaime Wren <[email protected]>
0 commit comments