Unreviewed changes
2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: pkg/analysis_server/test/lsp/migrate_test.dart
Insertions: 54, Deletions: 54.
@@ -38,7 +38,7 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.0.0 -> ^3.1.0''',
+ - test_project: ^3.0.0 -> ^3.1.0''',
expectedEdit: '''
>>>>>>>>>> pubspec.yaml
name: test_project
@@ -77,8 +77,8 @@
uris: [Uri.file(project1Path), Uri.file(project2Path)],
expectedSummary: '''
Bumped SDK constraints in 2 package(s):
-- project1: ^3.0.0 -> ^3.1.0
-- project2: ^3.2.0 -> ^3.3.0''',
+ - project1: ^3.0.0 -> ^3.1.0
+ - project2: ^3.2.0 -> ^3.3.0''',
expectedEdit: '''
>>>>>>>>>> project1/pubspec.yaml
name: project1
@@ -289,19 +289,19 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0
Pre-migration fixes:
-2 fixes made in 1 file.
+ 2 fixes made in 1 file.
-my_project/lib/main.dart
- extraneous_modifier • 2 fixes
+ my_project/lib/main.dart
+ extraneous_modifier • 2 fixes
Post-migration fixes:
-2 fixes made in 1 file.
+ 2 fixes made in 1 file.
-my_project/lib/main.dart
- unnecessary_type_name_in_constructor • 2 fixes''',
+ my_project/lib/main.dart
+ unnecessary_type_name_in_constructor • 2 fixes''',
expectedEdit: '''
>>>>>>>>>> lib/main.dart
class C {
@@ -352,26 +352,26 @@
uris: [projectFolderUri, toUri(otherPackagePath)],
expectedSummary: '''
Bumped SDK constraints in 2 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
-- other_package: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0
+ - other_package: ^3.12.0 -> ^3.13.0
Pre-migration fixes:
-2 fixes made in 2 files.
+ 2 fixes made in 2 files.
-my_project/lib/main.dart
- extraneous_modifier • 1 fix
+ my_project/lib/main.dart
+ extraneous_modifier • 1 fix
-other_package/lib/other.dart
- extraneous_modifier • 1 fix
+ other_package/lib/other.dart
+ extraneous_modifier • 1 fix
Post-migration fixes:
-2 fixes made in 2 files.
+ 2 fixes made in 2 files.
-my_project/lib/main.dart
- unnecessary_type_name_in_constructor • 1 fix
+ my_project/lib/main.dart
+ unnecessary_type_name_in_constructor • 1 fix
-other_package/lib/other.dart
- unnecessary_type_name_in_constructor • 1 fix''',
+ other_package/lib/other.dart
+ unnecessary_type_name_in_constructor • 1 fix''',
expectedEdit: '''
>>>>>>>>>> ../other_package/lib/other.dart
class D {
@@ -412,13 +412,13 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0
Post-migration fixes:
-2 fixes made in 1 file.
+ 2 fixes made in 1 file.
-my_project/lib/main.dart
- unnecessary_type_name_in_constructor • 2 fixes''',
+ my_project/lib/main.dart
+ unnecessary_type_name_in_constructor • 2 fixes''',
expectedEdit: '''
>>>>>>>>>> lib/main.dart
class C {
@@ -447,13 +447,13 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0
Pre-migration fixes:
-2 fixes made in 1 file.
+ 2 fixes made in 1 file.
-my_project/lib/main.dart
- extraneous_modifier • 2 fixes''',
+ my_project/lib/main.dart
+ extraneous_modifier • 2 fixes''',
expectedEdit: '''
>>>>>>>>>> lib/main.dart
void m(int x, y) {}
@@ -481,16 +481,16 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0
Pre-migration fixes:
-2 fixes made in 2 files.
+ 2 fixes made in 2 files.
-my_project/lib/main.dart
- extraneous_modifier • 1 fix
+ my_project/lib/main.dart
+ extraneous_modifier • 1 fix
-my_project/lib/other.dart
- extraneous_modifier • 1 fix''',
+ my_project/lib/other.dart
+ extraneous_modifier • 1 fix''',
expectedEdit: '''
>>>>>>>>>> lib/main.dart
void m(int x) {}
@@ -532,17 +532,17 @@
uris: [projectFolderUri, toUri(otherPackagePath)],
expectedSummary: '''
Bumped SDK constraints in 2 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
-- other_package: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0
+ - other_package: ^3.12.0 -> ^3.13.0
Pre-migration fixes:
-2 fixes made in 2 files.
+ 2 fixes made in 2 files.
-my_project/lib/main.dart
- extraneous_modifier • 1 fix
+ my_project/lib/main.dart
+ extraneous_modifier • 1 fix
-other_package/lib/other.dart
- extraneous_modifier • 1 fix''',
+ other_package/lib/other.dart
+ extraneous_modifier • 1 fix''',
expectedEdit: '''
>>>>>>>>>> ../other_package/lib/other.dart
void f(y) {}
@@ -589,16 +589,16 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0
Pre-migration fixes:
-2 fixes made in 2 files.
+ 2 fixes made in 2 files.
-my_project/lib/a.dart
- extraneous_modifier • 1 fix
+ my_project/lib/a.dart
+ extraneous_modifier • 1 fix
-my_project/lib/src/b.dart
- extraneous_modifier • 1 fix''',
+ my_project/lib/src/b.dart
+ extraneous_modifier • 1 fix''',
expectedEdit: '''
>>>>>>>>>> lib/a.dart
void m(int x) {}
@@ -626,7 +626,7 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0''',
+ - test_project: ^3.12.0 -> ^3.13.0''',
expectedEdit: '''
>>>>>>>>>> pubspec.yaml
name: test_project
@@ -670,13 +670,13 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0
Pre-migration fixes:
-1 fix made in 1 file.
+ 1 fix made in 1 file.
-my_project/lib/main.dart
- avoid_final_parameters • 1 fix''',
+ my_project/lib/main.dart
+ avoid_final_parameters • 1 fix''',
expectedEdit: '''
>>>>>>>>>> lib/main.dart
void m(int x) {}
```
```
The name of the file: pkg/analysis_server/lib/src/lsp/handlers/custom/handler_migrate.dart
Insertions: 6, Deletions: 4.
@@ -318,7 +318,7 @@
'Bumped SDK constraints in ${bumpedLines.length} package(s):',
);
for (var line in bumpedLines) {
- summaryBuffer.writeln(line);
+ summaryBuffer.writeln(' $line');
}
}
@@ -444,18 +444,20 @@
var fixPlural = totalFixes == 1 ? 'fix' : 'fixes';
var filePlural = totalFiles == 1 ? 'file' : 'files';
- buffer.writeln('$totalFixes $fixPlural made in $totalFiles $filePlural.');
+ buffer.writeln(
+ ' $totalFixes $fixPlural made in $totalFiles $filePlural.',
+ );
var sortedPaths = fixesMap.keys.toList()..sort();
for (var path in sortedPaths) {
buffer.writeln();
- buffer.writeln(path);
+ buffer.writeln(' $path');
var fileFixes = fixesMap[path]!;
var sortedCodes = fileFixes.keys.toList()..sort();
for (var code in sortedCodes) {
var count = fileFixes[code]!;
var fixPlural = count == 1 ? 'fix' : 'fixes';
- buffer.writeln(' $code • $count $fixPlural');
+ buffer.writeln(' $code • $count $fixPlural');
}
}
}
```