Skip to content

Commit

Permalink
Adjust some ignores for 'dart format'
Browse files Browse the repository at this point in the history
  • Loading branch information
goderbauer committed Dec 14, 2024
1 parent 2f66432 commit 396a65d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
3 changes: 2 additions & 1 deletion lib/ui/hooks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ typedef _ListStringArgFunction = Object? Function(List<String> args);
void _runMain(Function startMainIsolateFunction,
Function userMainFunction,
List<String> args) {
startMainIsolateFunction(() { // ignore: avoid_dynamic_calls
// ignore: avoid_dynamic_calls
startMainIsolateFunction(() {
if (userMainFunction is _ListStringArgFunction) {
userMainFunction(args);
} else {
Expand Down
3 changes: 2 additions & 1 deletion lib/web_ui/lib/src/engine/services/message_codecs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ class StandardMessageCodec implements MessageCodec<dynamic> {
} else if (value is double) {
buffer.putUint8(_valueFloat64);
buffer.putFloat64(value);
} else if (value is int) { // ignore: avoid_double_and_int_checks
// ignore: avoid_double_and_int_checks
} else if (value is int) {
if (-0x7fffffff - 1 <= value && value <= 0x7fffffff) {
buffer.putUint8(_valueInt32);
buffer.putInt32(value);
Expand Down
6 changes: 4 additions & 2 deletions lib/web_ui/test/engine/view/view_constraints_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,12 @@ Future<void> testMain() async {
expect(
ViewConstraints.fromJs(constraints, size),
const ViewConstraints(
minWidth: 500,
// ignore: avoid_redundant_argument_values
minWidth: 500, maxWidth: double.infinity,
maxWidth: double.infinity,
minHeight: 300,
// ignore: avoid_redundant_argument_values
minHeight: 300, maxHeight: double.infinity,
maxHeight: double.infinity,
));
});
});
Expand Down
3 changes: 2 additions & 1 deletion testing/dart/image_filter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ void main() async {

List<ColorFilter> colorFilters() {
// Create new color filter instances on each invocation.
return <ColorFilter> [ // ignore: prefer_const_constructors
// ignore: prefer_const_constructors
return <ColorFilter> [
ColorFilter.mode(green, BlendMode.color), // ignore: prefer_const_constructors
ColorFilter.mode(red, BlendMode.color), // ignore: prefer_const_constructors
ColorFilter.mode(red, BlendMode.screen), // ignore: prefer_const_constructors
Expand Down
3 changes: 2 additions & 1 deletion testing/scenario_app/lib/src/platform_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ List<int> _to64(num value) {
final Uint8List temp = Uint8List(15);
if (value is double) {
temp.buffer.asByteData().setFloat64(7, value, Endian.little);
} else if (value is int) { // ignore: avoid_double_and_int_checks
// ignore: avoid_double_and_int_checks
} else if (value is int) {
temp.buffer.asByteData().setInt64(7, value, Endian.little);
}
return temp;
Expand Down
6 changes: 5 additions & 1 deletion tools/const_finder/test/fixtures/lib/box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,11 @@ const Box box2_98 = Box(box2_97, box2_97);
const Box box2_99 = Box(box2_98, box2_98);

Object confuse(Box x) {
try { throw x; } catch (e) { return e; } // ignore: only_throw_errors
try {
throw x; // ignore: only_throw_errors
} catch (e) {
return e;
}
}

void main() {
Expand Down

0 comments on commit 396a65d

Please sign in to comment.