fix lints with the new pedantic (#1445)
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 0c7b4ac..30c8ff3 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -5,6 +5,7 @@
errors:
# There are a number of deprecated members used through this package
deprecated_member_use_from_same_package: ignore
+ unsafe_html: ignore
enable-experiment:
- non-nullable
linter:
diff --git a/pkgs/test/lib/src/runner/browser/platform.dart b/pkgs/test/lib/src/runner/browser/platform.dart
index 8a4b7f8..00b09b3 100644
--- a/pkgs/test/lib/src/runner/browser/platform.dart
+++ b/pkgs/test/lib/src/runner/browser/platform.dart
@@ -230,13 +230,13 @@
var htmlTemplatePath = _config.customHtmlTemplatePath!;
if (!File(htmlTemplatePath).existsSync()) {
throw LoadException(
- path, '"${htmlTemplatePath}" does not exist or is not readable');
+ path, '"$htmlTemplatePath" does not exist or is not readable');
}
final templateFileContents = File(htmlTemplatePath).readAsStringSync();
if ('{{testScript}}'.allMatches(templateFileContents).length != 1) {
throw LoadException(path,
- '"${htmlTemplatePath}" must contain exactly one {{testScript}} placeholder');
+ '"$htmlTemplatePath" must contain exactly one {{testScript}} placeholder');
}
_checkHtmlCorrectness(htmlTemplatePath, path);
}
@@ -283,7 +283,7 @@
if (!File(htmlPath).readAsStringSync().contains('packages/test/dart.js')) {
throw LoadException(
path,
- '"${htmlPath}" must contain <script src="packages/test/dart.js">'
+ '"$htmlPath" must contain <script src="packages/test/dart.js">'
'</script>.');
}
}
diff --git a/pkgs/test/test/runner/node/runner_test.dart b/pkgs/test/test/runner/node/runner_test.dart
index d732497..149f951 100644
--- a/pkgs/test/test/runner/node/runner_test.dart
+++ b/pkgs/test/test/runner/node/runner_test.dart
@@ -302,7 +302,7 @@
import 'package:test/test.dart';
void main() {
- test("success", () {}, onPlatform: {"${otherOS}": Skip()});
+ test("success", () {}, onPlatform: {"$otherOS": Skip()});
}
''').create();
diff --git a/pkgs/test_core/lib/src/runner/debugger.dart b/pkgs/test_core/lib/src/runner/debugger.dart
index 5e902d6..cb52e3e 100644
--- a/pkgs/test_core/lib/src/runner/debugger.dart
+++ b/pkgs/test_core/lib/src/runner/debugger.dart
@@ -153,8 +153,7 @@
}
}
- var buffer =
- StringBuffer('${bold}The test runner is paused.${noColor} ');
+ var buffer = StringBuffer('${bold}The test runner is paused.$noColor ');
if (runtime.isDartVM) {
buffer.write('Open the Observatory ');
} else {
diff --git a/pkgs/test_core/lib/src/runner/spawn_hybrid.dart b/pkgs/test_core/lib/src/runner/spawn_hybrid.dart
index 16e4fbd..6202446 100644
--- a/pkgs/test_core/lib/src/runner/spawn_hybrid.dart
+++ b/pkgs/test_core/lib/src/runner/spawn_hybrid.dart
@@ -131,7 +131,7 @@
var packageConfig = await currentPackageConfig;
var package = packageConfig.packageOf(parsedUri);
var version = package?.languageVersion;
- if (version != null) return '// @dart=${version}';
+ if (version != null) return '// @dart=$version';
}
// Fall back on no language comment.