dart-lang / dart_style

An opinionated formatter/linter for Dart code
https://pub.dev/packages/dart_style
BSD 3-Clause "New" or "Revised" License
645 stars 117 forks source link

Add a couple of regression tests for examples from Jake. #1457

Closed munificent closed 3 months ago

munificent commented 3 months ago

These are things he noticed when trying the old prototype formatter. The real implementation does somewhat better than the prototype, but these may not still have the ideal formatting.

For the first one, there is still a TODO to consider tweaking the heuristics for block arguments, so I'm going to just land this test the way it's currently behaving and then we can revisit it when more of the regression tests are migrated.

cc @jakemac53