[pkg/testing] restore analysis options settings

Use package:lints/recommended.yaml for pkg/testing.

Change-Id: I15aedcc4c82447a9d033b575adae745eb138f6f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363484
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
diff --git a/pkg/testing/analysis_options.yaml b/pkg/testing/analysis_options.yaml
index 2295ff8..2bd5500 100644
--- a/pkg/testing/analysis_options.yaml
+++ b/pkg/testing/analysis_options.yaml
@@ -2,6 +2,8 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
+include: package:lints/recommended.yaml
+
 analyzer:
   errors:
     # Allow having TODOs in the code
@@ -9,18 +11,8 @@
 
 linter:
   rules:
-    - collection_methods_unrelated_type
-    - curly_braces_in_flow_control_structures
-    - prefer_adjacent_string_concatenation
-    - unawaited_futures
-    - avoid_void_async
-    - recursive_getters
-    - avoid_empty_else
-    - empty_statements
-    - valid_regexps
-    - package_api_docs
-    - lines_longer_than_80_chars
-    - unrelated_type_equality_checks
-    - annotate_overrides
     - always_declare_return_types
-    # - always_specify_types
+    - avoid_void_async
+    - lines_longer_than_80_chars
+    - package_api_docs
+    - unawaited_futures
diff --git a/pkg/testing/lib/src/chain.dart b/pkg/testing/lib/src/chain.dart
index 77cd2d7..4c24109 100644
--- a/pkg/testing/lib/src/chain.dart
+++ b/pkg/testing/lib/src/chain.dart
@@ -66,10 +66,10 @@
     List<String> includeEndsWith =
         List<String>.from(json['includeEndsWith'] ?? const []);
     List<RegExp> pattern = [
-      for (final p in json['pattern'] ?? const []) new RegExp(p)
+      for (final p in json['pattern'] ?? const []) RegExp(p)
     ];
     List<RegExp> exclude = [
-      for (final e in json['exclude'] ?? const []) new RegExp(e)
+      for (final e in json['exclude'] ?? const []) RegExp(e)
     ];
     return Chain(name, kind, source, rootUri, subRoots, statusFile,
         includeEndsWith, pattern, exclude);
@@ -289,7 +289,7 @@
             include = true;
           }
           if (include) {
-            result.add(new FileBasedTestDescription(suite.root, entity));
+            result.add(FileBasedTestDescription(suite.root, entity));
           }
         }
       } else {
@@ -419,7 +419,7 @@
 }
 
 RegExp _createRegExpForAsterisk(String s) {
-  StringBuffer sb = new StringBuffer("^");
+  StringBuffer sb = StringBuffer("^");
   String between = "";
   for (String split in s.split("*")) {
     sb.write(between);
@@ -427,5 +427,5 @@
     sb.write(RegExp.escape(split));
   }
   sb.write("\$");
-  return new RegExp(sb.toString());
+  return RegExp(sb.toString());
 }
diff --git a/pkg/testing/lib/src/run_tests.dart b/pkg/testing/lib/src/run_tests.dart
index e9500d6..af6cee5 100644
--- a/pkg/testing/lib/src/run_tests.dart
+++ b/pkg/testing/lib/src/run_tests.dart
@@ -140,7 +140,6 @@
 void fail(String message) {
   print(message);
   io.exitCode = 1;
-  return null;
 }
 
 Future<void> main(List<String> arguments) {