You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working towards #1311
The `Compact` and `Expanded` reporters have a lot of code in common,
along with many superficial, and a few not-superficial differences. Some
of the impactful differences look like they may be bugs. Make it easier
to understand both reporters and their differences by reducing the
superficial changes.
The JSON reporter shares less code with the others, but aim for a
consistent field ordering there as well.
- Avoid using `Configuration.current` from the compact reporter. This
was never added in the expanded reporter to avoid a transitive import
to `dart:io`. The pattern of being configured at construction is
already baked in to the `ReporterFactory` typedef as is a more clear
pattern than reading from a magic zone scoped variable. Add required
constructor args for the compact reporter which match those in the
expanded reporter. Remove the TODO.
- Use the same pattern for setting the color escape code fields. In the
future we will likely want to migrate to `package:io` for these.
- Shuffle some fields so they are ordered consistently in both
reporters.
- Add a default for `_lastProgressPassed` to avoid making it nullable.
- Add `_printPath` and `_printPlatform` fields in the compact reporter
rather than read them lazily through the zone scoped configuration.
- Make the arguments required for the constructors instead of adding
defaults which are never used.
- Use 2 slashs for comments.
0 commit comments