Skip to content

Commit a7fdf71

Browse files
srawlinscopybara-github
authored andcommitted
Use curly braces in if statement, in accordance with upcoming lint rule change.
This lint rule currently measures from the end of the condition, but needs to measure from the start of the if-statement. E.g. if ("long condition and other long condition" != "another long condition" && "more tests".isNotEmpty) return null; This is currently allowed, but should not be, as per Effective Dart. This will be fixed in a Dart SDK CL. PiperOrigin-RevId: 647347218
1 parent 9deddcf commit a7fdf71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/builder.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,9 @@ class _MockTargetGatherer {
602602
// turned into `dynamic` by the analyzer.
603603
typeArguments.forEachIndexed((typeArgIdx, typeArgument) {
604604
if (!(typeArgument is analyzer.DynamicType ||
605-
typeArgument is analyzer.InvalidType)) return;
605+
typeArgument is analyzer.InvalidType)) {
606+
return;
607+
}
606608
if (typeArgIdx >= mockTypeArguments.arguments.length) return;
607609
final typeArgAst = mockTypeArguments.arguments[typeArgIdx];
608610
if (typeArgAst is! ast.NamedType) {

0 commit comments

Comments
 (0)