Commit d1a06cf
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]>1 parent ad3202b commit d1a06cf
3 files changed
Lines changed: 10 additions & 85 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 20 | | |
30 | 21 | | |
31 | 22 | | |
32 | 23 | | |
33 | 24 | | |
34 | | - | |
35 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
36 | 28 | | |
37 | 29 | | |
38 | 30 | | |
39 | 31 | | |
40 | 32 | | |
41 | 33 | | |
42 | 34 | | |
43 | | - | |
| 35 | + | |
44 | 36 | | |
45 | 37 | | |
46 | 38 | | |
47 | 39 | | |
48 | 40 | | |
49 | 41 | | |
50 | 42 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
70 | 47 | | |
71 | 48 | | |
72 | 49 | | |
| |||
76 | 53 | | |
77 | 54 | | |
78 | 55 | | |
79 | | - | |
| 56 | + | |
80 | 57 | | |
81 | 58 | | |
0 commit comments