Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the `engine` subdirectory and enforces that these files stay formatted with a presubmit check. **Reviewers:** Please carefully review all the commits except for the one titled "formatted". The "formatted" commit was auto-generated by running `dev/tools/format.sh -a -f`. The other commits were hand-crafted to prepare the repo for the formatting change. I recommend reviewing the commits one-by-one via the "Commits" tab and avoiding Github's "Files changed" tab as it will likely slow down your browser because of the size of this PR. --------- Co-authored-by: Kate Lovett <katelovett@google.com> Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8e0993eda8
commit
5491c8c146
@@ -19,8 +19,7 @@ class Data {
|
||||
}
|
||||
|
||||
List<Data> test(int length) {
|
||||
return List<Data>.generate(length,
|
||||
(int index) => Data(index * index));
|
||||
return List<Data>.generate(length, (int index) => Data(index * index));
|
||||
}
|
||||
|
||||
Future<void> execute() async {
|
||||
|
||||
@@ -11,20 +11,17 @@ const int _kNumWarmUp = 100;
|
||||
|
||||
Future<void> execute() async {
|
||||
final List<String> words = 'Lorem Ipsum is simply dummy text of the printing and'
|
||||
" typesetting industry. Lorem Ipsum has been the industry's"
|
||||
' standard dummy text ever since the 1500s, when an unknown'
|
||||
' printer took a galley of type and scrambled it to make a'
|
||||
' type specimen book'.split(' ');
|
||||
" typesetting industry. Lorem Ipsum has been the industry's"
|
||||
' standard dummy text ever since the 1500s, when an unknown'
|
||||
' printer took a galley of type and scrambled it to make a'
|
||||
' type specimen book'
|
||||
.split(' ');
|
||||
final List<InlineSpanSemanticsInformation> data = <InlineSpanSemanticsInformation>[];
|
||||
for (int i = 0; i < words.length; i++) {
|
||||
if (i.isEven) {
|
||||
data.add(
|
||||
InlineSpanSemanticsInformation(words[i]),
|
||||
);
|
||||
data.add(InlineSpanSemanticsInformation(words[i]));
|
||||
} else if (i.isEven) {
|
||||
data.add(
|
||||
InlineSpanSemanticsInformation(words[i], isPlaceholder: true),
|
||||
);
|
||||
data.add(InlineSpanSemanticsInformation(words[i], isPlaceholder: true));
|
||||
}
|
||||
}
|
||||
print(words);
|
||||
@@ -77,13 +74,17 @@ String consumeSpan(Iterable<InlineSpanSemanticsInformation> items) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Iterable<InlineSpanSemanticsInformation> combineSemanticsInfoSyncStar(List<InlineSpanSemanticsInformation> inputs) sync* {
|
||||
Iterable<InlineSpanSemanticsInformation> combineSemanticsInfoSyncStar(
|
||||
List<InlineSpanSemanticsInformation> inputs,
|
||||
) sync* {
|
||||
String workingText = '';
|
||||
String? workingLabel;
|
||||
for (final InlineSpanSemanticsInformation info in inputs) {
|
||||
if (info.requiresOwnNode) {
|
||||
yield InlineSpanSemanticsInformation(workingText, semanticsLabel: workingLabel ?? workingText);
|
||||
yield InlineSpanSemanticsInformation(
|
||||
workingText,
|
||||
semanticsLabel: workingLabel ?? workingText,
|
||||
);
|
||||
workingText = '';
|
||||
workingLabel = null;
|
||||
yield info;
|
||||
@@ -97,13 +98,17 @@ Iterable<InlineSpanSemanticsInformation> combineSemanticsInfoSyncStar(List<Inlin
|
||||
assert(workingLabel != null);
|
||||
}
|
||||
|
||||
Iterable<InlineSpanSemanticsInformation> combineSemanticsInfoList(List<InlineSpanSemanticsInformation> inputs) {
|
||||
Iterable<InlineSpanSemanticsInformation> combineSemanticsInfoList(
|
||||
List<InlineSpanSemanticsInformation> inputs,
|
||||
) {
|
||||
String workingText = '';
|
||||
String? workingLabel;
|
||||
final List<InlineSpanSemanticsInformation> result = <InlineSpanSemanticsInformation>[];
|
||||
for (final InlineSpanSemanticsInformation info in inputs) {
|
||||
if (info.requiresOwnNode) {
|
||||
result.add(InlineSpanSemanticsInformation(workingText, semanticsLabel: workingLabel ?? workingText));
|
||||
result.add(
|
||||
InlineSpanSemanticsInformation(workingText, semanticsLabel: workingLabel ?? workingText),
|
||||
);
|
||||
workingText = '';
|
||||
workingLabel = null;
|
||||
result.add(info);
|
||||
|
||||
Reference in New Issue
Block a user