dart-lang / mockito

Mockito-inspired mock library for Dart
https://pub.dev/packages/mockito
Apache License 2.0
623 stars 160 forks source link

Use curly braces in if statement, in accordance with upcoming lint rule change. #760

Closed copybara-service[bot] closed 5 days ago

copybara-service[bot] commented 6 days ago

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.