Skip to content

Commit 70bfd81

Browse files
authored
Improve the toString method on the BuildSpec class (#7811)
Other changes are from the Dart formatter
1 parent 03d6ca1 commit 70bfd81

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

tool/plugin/lib/build_spec.dart

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class BuildSpec {
1212
// Build targets
1313
// TODO (jwren) can we get rid of "name"
1414
final String name;
15+
1516
// TODO (jwren) these two can be consilidated
1617

1718
final String version;
@@ -100,8 +101,14 @@ class BuildSpec {
100101

101102
@override
102103
String toString() {
103-
return 'BuildSpec($ideaProduct $ideaVersion $dartPluginVersion $sinceBuild '
104-
'$untilBuild version: "$release")';
104+
return 'BuildSpec('
105+
'ideaProduct: $ideaProduct, '
106+
'ideaVersion: $ideaVersion, '
107+
'baseVersion: $baseVersion, '
108+
'dartPluginVersion: $dartPluginVersion, '
109+
'since: $sinceBuild, '
110+
'until: $untilBuild, '
111+
'version: "$release")';
105112
}
106113

107114
Future<BuildSpec> initChangeLog() async {
@@ -131,9 +138,11 @@ class BuildSpec {
131138
class SyntheticBuildSpec extends BuildSpec {
132139
late final BuildSpec alternate;
133140

134-
SyntheticBuildSpec.fromJson(super.json,
135-
super.releaseNum,
136-
List<BuildSpec> specs,) : super.fromJson() {
141+
SyntheticBuildSpec.fromJson(
142+
super.json,
143+
super.releaseNum,
144+
List<BuildSpec> specs,
145+
) : super.fromJson() {
137146
try {
138147
// 'isUnitTestTarget' should always be in the spec for the latest IntelliJ (not AS).
139148
alternate = specs.firstWhere((s) => s.isUnitTestTarget);

0 commit comments

Comments
 (0)