Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 88b77fe

Browse files
munificentwhesse
authored andcommitted
Roll dart_style 1.3.7 into the SDK.
The main reason is that this adds better help text when run from `dart format`. But it includes a couple of other changes and fixes: * Don't crash when non-ASCII whitespace is trimmed. * Split all conditional expressions (`?:`) when they are nested. * Handle `external` and `abstract` fields and variables. Change-Id: I59326e693bfe538013cd23b58924461f60e8e908 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160981 Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: William Hesse <whesse@google.com>
1 parent 58ff2d0 commit 88b77fe

8 files changed

+32
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242

4343
### Tools
4444

45+
#### dartfmt
46+
47+
* Don't crash when non-ASCII whitespace is trimmed.
48+
* Split all conditional expressions (`?:`) when they are nested.
49+
* Handle `external` and `abstract` fields and variables.
50+
4551
#### Linter
4652

4753
Updated the Linter to `0.1.118`, which includes:

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ vars = {
9494
# and land the review.
9595
#
9696
# For more details, see https://github.com/dart-lang/sdk/issues/30164
97-
"dart_style_tag": "1.3.6", # Please see the note above before updating.
97+
"dart_style_tag": "1.3.7", # Please see the note above before updating.
9898

9999
"chromedriver_tag": "83.0.4103.39",
100100
"dartdoc_rev" : "291ebc50072746bc59ccab59115a298915218428",

pkg/dartdev/test/commands/format_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void format() {
2222
var result = p.runSync('format', ['--help']);
2323
expect(result.exitCode, 0);
2424
expect(result.stderr, isEmpty);
25-
expect(result.stdout, contains('Idiomatically formats Dart source code.'));
25+
expect(result.stdout, contains('Idiomatically format Dart source code.'));
2626
expect(result.stdout,
2727
contains('Usage: dart format [options...] <files or directories...>'));
2828
});

pkg/front_end/testcases/nnbd/abstract_fields.dart.textual_outline.expect

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ abstract class A {
33
abstract final int finalInstanceField;
44
abstract covariant num covariantInstanceField;
55
}
6+
67
mixin B {
78
abstract int instanceField;
89
abstract final int finalInstanceField;

pkg/front_end/testcases/nnbd/abstract_fields_spec.dart.textual_outline.expect

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ abstract class A {
66
abstract covariant num cn;
77
abstract covariant var cx;
88
}
9+
910
main() {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
abstract class A {
2+
abstract covariant num cn;
3+
abstract covariant var cx;
4+
abstract final fx;
5+
abstract final int fi;
6+
abstract int i1, i2;
7+
abstract var x;
8+
}
9+
10+
main() {}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
external int s1;
22
external final fx;
3+
34
class A {
45
external int i1;
56
external covariant var cx;
67
external static int s1;
78
external static final fx;
89
}
10+
911
main() {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class A {
2+
external covariant var cx;
3+
external int i1;
4+
external static final fx;
5+
external static int s1;
6+
}
7+
8+
external final fx;
9+
external int s1;
10+
main() {}

0 commit comments

Comments
 (0)