Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass in a language version when calling the formatter.
There is an upcoming version of dart_style that makes this argument required, so every DartFormatter() constructor callsite needs to pass it in. These are the last two I could find in the Dart SDK. I'm not familiar with the surrounding code, but I believe passing in DartFormatter.latestLanguage version will do the right thing: * For the benchmark script, that's generated code that we will always want to be valid on the latest version of Dart. * For the text_outline_suite, my understanding is that CFE tests that require older language versions always use the "// @Dart=x.y" comment to opt in to that version. Those comments are also respected by the formatter and override the languageVersion argument passed to the constructor. So I think passing in latestSupportedVersion will do the right thing. Bug: #56687 Change-Id: If29188df479c7b41beb68ac889d56be13a395a16 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389622 Commit-Queue: Johnni Winther <johnniwinther@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
- Loading branch information