Skip to content

Commit f772b57

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Fix curly_braces_in_flow_control_structures lint.
R=brianwilkerson@google.com, paulberry@google.com Change-Id: I63cb372bf04f80182f873e2143971cb3cf1392fe Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127447 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
1 parent bf7f27a commit f772b57

File tree

8 files changed

+1365
-594
lines changed

8 files changed

+1365
-594
lines changed

pkg/analyzer/analysis_options.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ analyzer:
1111
# violations that need to be cleaned up. Each one can be cleaned up and
1212
# enabled according to the value provided.
1313
avoid_return_types_on_setters: ignore
14-
curly_braces_in_flow_control_structures: ignore
1514
empty_catches: ignore
1615
prefer_iterable_wheretype: ignore
1716
# TODO(srawlins): At the time of writing, 230 violations in lib/. The fix

pkg/analyzer/lib/src/dart/analysis/crc32.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,10 @@ int getCrc32(List<int> array, [int crc = 0]) {
280280
crc = _CRC32_TABLE[(crc ^ array[ip++]) & 0xff] ^ (crc >> 8);
281281
len -= 8;
282282
}
283-
if (len > 0)
283+
if (len > 0) {
284284
do {
285285
crc = _CRC32_TABLE[(crc ^ array[ip++]) & 0xff] ^ (crc >> 8);
286286
} while (--len > 0);
287+
}
287288
return crc ^ 0xffffffff;
288289
}

pkg/analyzer/lib/src/dart/element/member.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,9 @@ class MethodMember extends ExecutableMember implements MethodElement {
706706
var typeParameter = typeParameters[i];
707707
if (typeParameter is TypeParameterElementImpl) {
708708
typeParameter.appendTo(buffer);
709-
} else
709+
} else {
710710
(typeParameter as TypeParameterMember).appendTo(buffer);
711+
}
711712
}
712713
buffer.write('>');
713714
}

0 commit comments

Comments
 (0)