bulk fix for `use_function_type_syntax_for_parameters`

Change-Id: I3a28cea584cc98dd0dcc9b750887485a7950b7ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178264
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
index 8cbef0b..61d79bc 100644
--- a/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
+++ b/pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart
@@ -257,6 +257,9 @@
     LintNames.unnecessary_this: [
       RemoveThisExpression.newInstance,
     ],
+    LintNames.use_function_type_syntax_for_parameters: [
+      ConvertToGenericFunctionSyntax.newInstance,
+    ],
     LintNames.use_rethrow_when_possible: [
       UseRethrow.newInstance,
     ],
diff --git a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_generic_function_syntax_test.dart b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_generic_function_syntax_test.dart
index af826e2..e279e12 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_generic_function_syntax_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_generic_function_syntax_test.dart
@@ -10,6 +10,7 @@
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(PreferGenericFunctionTypeAliasesTest);
+    defineReflectiveTests(UseFunctionTypeSyntaxForParametersTest);
   });
 }
 
@@ -29,3 +30,29 @@
 ''');
   }
 }
+
+@reflectiveTest
+class UseFunctionTypeSyntaxForParametersTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.use_function_type_syntax_for_parameters;
+
+  Future<void> test_singleFile() async {
+    await resolveTestCode('''
+g(String f(int x), int h()) {}
+''');
+    await assertHasFix('''
+g(String Function(int x) f, int Function() h) {}
+''');
+  }
+
+  @failingTest
+  Future<void> test_singleFile_nested() async {
+    // Only the outer function gets converted.
+    await resolveTestCode('''
+g(String f(int h())) {}
+''');
+    await assertHasFix('''
+g(String Function(int Function() h) f) {}
+''');
+  }
+}