dart-lang / code_builder

A fluent API for generating valid Dart source code
https://pub.dev/packages/code_builder
BSD 3-Clause "New" or "Revised" License
427 stars 66 forks source link

Reduce the use of trailing commas #398

Open devoncarew opened 1 year ago

devoncarew commented 1 year ago

This package was updated to use trailing commas for generated parameter and expression lists in order to address (substantial) dart format slowdowns when formatting some larger generated files.

It would be nice to dial back the use of trailing commas a bit so that shorter methods (with <= three parameters?) are generated without trailing commas.

https://github.com/dart-lang/code_builder/pull/390 was one such attempt at reducing the use of trailing commas.