Skip to content

Commit 218057a

Browse files
munificentCommit Queue
authored and
Commit Queue
committed
Roll the latest dart_style into the SDK.
There are only three visible changes: - Respect "// @Dart=" comments when deciding what style to use: dart-lang/dart_style@6753ab4 - Allow a list of files in "include:" in analysis_options.yaml: dart-lang/dart_style@ecfc0cb - Optimize by about 5%: dart-lang/dart_style@02957e6 There are no style changes. Change-Id: If301978e0127ca5fa54b78611a2d002102e66798 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395460 Reviewed-by: Morgan :) <[email protected]> Auto-Submit: Bob Nystrom <[email protected]> Commit-Queue: Morgan :) <[email protected]> Reviewed-by: Jens Johansen <[email protected]>
1 parent 3515a19 commit 218057a

7 files changed

+29
-23
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ vars = {
131131
# and land the review.
132132
#
133133
# For more details, see https://github.com/dart-lang/sdk/issues/30164.
134-
"dart_style_rev": "dc13a2f8e667825980cbc1a06ed645620f9bed70", # disable tools/rev_sdk_deps.dart
134+
"dart_style_rev": "f6d020e48cc531a0967c91fa88028c086fedfbf9", # disable tools/rev_sdk_deps.dart
135135
"dartdoc_rev": "6bbd3d7b535ee4ed889beaeea68d66e54b196aee",
136136
"ecosystem_rev": "52e4ceb6f0715bab5c47495429c4a2b7ce708a66",
137137
"flute_rev": "a531c96a8b43d015c6bfbbfe3ab54867b0763b8b",

pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.textual_outline.expect

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// @dart = 2.19
22

3-
enum Enum<T> { a<num>(), b<String>(), c<bool>() }
3+
enum Enum<T> {
4+
a<num>(),
5+
b<String>(),
6+
c<bool>(),
7+
}
48

59
method1(Enum<dynamic> e) {}
610

pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.textual_outline_modelled.expect

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// @dart = 2.19
22

3-
enum Enum<T> { a<num>(), b<String>(), c<bool>() }
3+
enum Enum<T> {
4+
a<num>(),
5+
b<String>(),
6+
c<bool>(),
7+
}
48

59
method1(Enum<dynamic> e) {}
610

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ import 'dart:async';
55
void main() {}
66

77
final t = StreamTransformer.fromHandlers(
8-
handleData: (data, sink) => Future.microtask(() => sink.add(data)),
9-
handleDone: (sink) => Future.microtask(() => sink.close()),
10-
);
8+
handleData: (data, sink) => Future.microtask(() => sink.add(data)),
9+
handleDone: (sink) => Future.microtask(() => sink.close()));
1110

1211
final s1 = [];
1312

pkg/front_end/testcases/nnbd/issue41102.dart.textual_outline_modelled.expect

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ final s8 = s7[0];
3737
final s9 = s7[0] = 0;
3838

3939
final t = StreamTransformer.fromHandlers(
40-
handleData: (data, sink) => Future.microtask(() => sink.add(data)),
41-
handleDone: (sink) => Future.microtask(() => sink.close()),
42-
);
40+
handleData: (data, sink) => Future.microtask(() => sink.add(data)),
41+
handleDone: (sink) => Future.microtask(() => sink.close()));
4342

4443
int? s5;
4544

pkg/front_end/testcases/patterns/exhaustiveness/unsound_cast_3_2.dart.textual_outline.expect

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ class Y extends B {}
1515
class Z implements A, B {}
1616

1717
int unsound1(S s) => switch (s) {
18-
X() as A => 0,
19-
Y() as B => 1,
20-
};
18+
X() as A => 0,
19+
Y() as B => 1,
20+
};
2121

2222
int? sound1(S s) => switch (s) {
23-
X() as A => 0,
24-
Y() as B => 1,
25-
_ => null,
26-
};
23+
X() as A => 0,
24+
Y() as B => 1,
25+
_ => null,
26+
};
2727

2828
int unsound2(S s) {}
2929

pkg/front_end/testcases/patterns/exhaustiveness/unsound_cast_3_2.dart.textual_outline_modelled.expect

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ class Z implements A, B {}
1515
expect(expected, actual) {}
1616

1717
int? sound1(S s) => switch (s) {
18-
X() as A => 0,
19-
Y() as B => 1,
20-
_ => null,
21-
};
18+
X() as A => 0,
19+
Y() as B => 1,
20+
_ => null,
21+
};
2222

2323
int? sound2(S s) {}
2424

2525
int unsound1(S s) => switch (s) {
26-
X() as A => 0,
27-
Y() as B => 1,
28-
};
26+
X() as A => 0,
27+
Y() as B => 1,
28+
};
2929

3030
int unsound2(S s) {}
3131

0 commit comments

Comments
 (0)