Enforce and fix lints from package:pedantic (#2291)

- always_declare_return_types
- annotate_overrides
- curly_braces_in_flow_control_structures
- prefer_for_elements_to_map_fromiterable
- prefer_if_null_operators
- prefer_single_quotes
- prefer_spread_collections
- unawaited_futures
- use_function_type_syntax_for_parameters

Rename a method starting with `get` to use a more accurately descriptive
verb.

Tighten the types on some methods highlighted by the
`always_declare_return_types` lint by making them generic instead of
returning `dynamic`.
diff --git a/analysis_options.yaml b/analysis_options.yaml
index cf62cb2..cf4a3f0 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,3 +1,5 @@
+include: package:pedantic/analysis_options.yaml
+
 analyzer:
   errors:
     unused_import: error
diff --git a/lib/src/ascii_tree.dart b/lib/src/ascii_tree.dart
index aa25cd8..58892b8 100644
--- a/lib/src/ascii_tree.dart
+++ b/lib/src/ascii_tree.dart
@@ -100,7 +100,7 @@
 /// will have their contents truncated. Defaults to `false`.
 String fromMap(Map<String, Map> map, {bool showAllChildren}) {
   var buffer = StringBuffer();
-  _draw(buffer, "", null, map, showAllChildren: showAllChildren);
+  _draw(buffer, '', null, map, showAllChildren: showAllChildren);
   return buffer.toString();
 }
 
@@ -112,7 +112,7 @@
     if (isLastChild) {
       buffer.write(log.gray("'-- "));
     } else {
-      buffer.write(log.gray("|-- "));
+      buffer.write(log.gray('|-- '));
     }
   }
 
@@ -121,9 +121,9 @@
 }
 
 String _getPrefix(bool isRoot, bool isLast) {
-  if (isRoot) return "";
-  if (isLast) return "    ";
-  return log.gray("|   ");
+  if (isRoot) return '';
+  if (isLast) return '    ';
+  return log.gray('|   ');
 }
 
 void _draw(
@@ -137,7 +137,7 @@
   // Recurse to the children.
   var childNames = ordered(children.keys);
 
-  drawChild(bool isLastChild, String child) {
+  void drawChild(bool isLastChild, String child) {
     var childPrefix = _getPrefix(name == null, isLast);
     _draw(buffer, '$prefix$childPrefix', child,
         children[child] as Map<String, Map>,
diff --git a/lib/src/command.dart b/lib/src/command.dart
index 6eac61f..404ac3d 100644
--- a/lib/src/command.dart
+++ b/lib/src/command.dart
@@ -41,6 +41,7 @@
 
   // Lazily initialize the parser because the superclass constructor requires
   // it but we want to initialize it based on [allowTrailingOptions].
+  @override
   ArgParser get argParser =>
       _argParser ??= ArgParser(allowTrailingOptions: allowTrailingOptions);
 
@@ -52,11 +53,13 @@
   /// it has no effect. This only needs to be set in leaf commands.
   bool get isOffline => false;
 
+  @override
   String get usageFooter {
     if (docUrl == null) return null;
-    return "See $docUrl for detailed documentation.";
+    return 'See $docUrl for detailed documentation.';
   }
 
+  @override
   void printUsage() {
     log.message(usage);
   }
diff --git a/lib/src/command/barback.dart b/lib/src/command/barback.dart
index e90e493..442e708 100644
--- a/lib/src/command/barback.dart
+++ b/lib/src/command/barback.dart
@@ -9,19 +9,20 @@
 /// Shared base class for [BuildCommand] and [ServeCommand].
 abstract class BarbackCommand extends PubCommand {
   BarbackCommand() {
-    argParser.addOption("mode", hide: true);
-    argParser.addFlag("all", hide: true);
-    argParser.addOption("web-compiler", hide: true);
+    argParser.addOption('mode', hide: true);
+    argParser.addFlag('all', hide: true);
+    argParser.addOption('web-compiler', hide: true);
   }
 
-  run() {
+  @override
+  void run() {
     // Switch to JSON output if specified. We need to do this before parsing
     // the source directories so an error will be correctly reported in JSON
     // format.
     log.json.enabled =
-        argResults.options.contains("format") && argResults["format"] == "json";
+        argResults.options.contains('format') && argResults['format'] == 'json';
 
-    fail(log.red("Dart 2 has a new build system. Learn how to migrate "
+    fail(log.red('Dart 2 has a new build system. Learn how to migrate '
         "from ${log.bold('pub build')} and\n"
         "${log.bold('pub serve')}: https://webdev.dartlang.org/dart-2\n"));
   }
diff --git a/lib/src/command/build.dart b/lib/src/command/build.dart
index 5013ec3..8c199d6 100644
--- a/lib/src/command/build.dart
+++ b/lib/src/command/build.dart
@@ -6,13 +6,16 @@
 
 /// Handles the `build` pub command.
 class BuildCommand extends BarbackCommand {
-  String get name => "build";
-  String get description => "Deprecated command";
+  @override
+  String get name => 'build';
+  @override
+  String get description => 'Deprecated command';
+  @override
   bool get hidden => true;
 
   BuildCommand() {
-    argParser.addOption("define", hide: true);
-    argParser.addOption("format", hide: true);
-    argParser.addOption("output", hide: true);
+    argParser.addOption('define', hide: true);
+    argParser.addOption('format', hide: true);
+    argParser.addOption('output', hide: true);
   }
 }
diff --git a/lib/src/command/cache.dart b/lib/src/command/cache.dart
index 7fb7d00..b817e69 100644
--- a/lib/src/command/cache.dart
+++ b/lib/src/command/cache.dart
@@ -9,10 +9,14 @@
 
 /// Handles the `cache` pub command.
 class CacheCommand extends PubCommand {
-  String get name => "cache";
-  String get description => "Work with the system cache.";
-  String get invocation => "pub cache <subcommand>";
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-cache";
+  @override
+  String get name => 'cache';
+  @override
+  String get description => 'Work with the system cache.';
+  @override
+  String get invocation => 'pub cache <subcommand>';
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-cache';
 
   CacheCommand() {
     addSubcommand(CacheAddCommand());
diff --git a/lib/src/command/cache_add.dart b/lib/src/command/cache_add.dart
index 9d19007..5a6f90f 100644
--- a/lib/src/command/cache_add.dart
+++ b/lib/src/command/cache_add.dart
@@ -12,39 +12,44 @@
 
 /// Handles the `cache add` pub command.
 class CacheAddCommand extends PubCommand {
-  String get name => "add";
-  String get description => "Install a package.";
+  @override
+  String get name => 'add';
+  @override
+  String get description => 'Install a package.';
+  @override
   String get invocation =>
-      "pub cache add <package> [--version <constraint>] [--all]";
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-cache";
+      'pub cache add <package> [--version <constraint>] [--all]';
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-cache';
 
   CacheAddCommand() {
-    argParser.addFlag("all",
-        help: "Install all matching versions.", negatable: false);
+    argParser.addFlag('all',
+        help: 'Install all matching versions.', negatable: false);
 
-    argParser.addOption("version", abbr: "v", help: "Version constraint.");
+    argParser.addOption('version', abbr: 'v', help: 'Version constraint.');
   }
 
+  @override
   Future run() async {
     // Make sure there is a package.
     if (argResults.rest.isEmpty) {
-      usageException("No package to add given.");
+      usageException('No package to add given.');
     }
 
     // Don't allow extra arguments.
     if (argResults.rest.length > 1) {
       var unexpected = argResults.rest.skip(1).map((arg) => '"$arg"');
-      var arguments = pluralize("argument", unexpected.length);
-      usageException("Unexpected $arguments ${toSentence(unexpected)}.");
+      var arguments = pluralize('argument', unexpected.length);
+      usageException('Unexpected $arguments ${toSentence(unexpected)}.');
     }
 
     var package = argResults.rest.single;
 
     // Parse the version constraint, if there is one.
     var constraint = VersionConstraint.any;
-    if (argResults["version"] != null) {
+    if (argResults['version'] != null) {
       try {
-        constraint = VersionConstraint.parse(argResults["version"]);
+        constraint = VersionConstraint.parse(argResults['version']);
       } on FormatException catch (error) {
         usageException(error.message);
       }
@@ -60,14 +65,14 @@
 
     if (ids.isEmpty) {
       // TODO(rnystrom): Show most recent unmatching version?
-      fail("Package $package has no versions that match $constraint.");
+      fail('Package $package has no versions that match $constraint.');
     }
 
-    downloadVersion(id) async {
+    Future<void> downloadVersion(id) async {
       if (cache.contains(id)) {
         // TODO(rnystrom): Include source and description if not hosted.
         // See solve_report.dart for code to harvest.
-        log.message("Already cached ${id.name} ${id.version}.");
+        log.message('Already cached ${id.name} ${id.version}.');
         return null;
       }
 
@@ -75,7 +80,7 @@
       await source.downloadToSystemCache(id);
     }
 
-    if (argResults["all"]) {
+    if (argResults['all']) {
       // Install them in ascending order.
       ids.sort((id1, id2) => id1.version.compareTo(id2.version));
       await Future.forEach(ids, downloadVersion);
diff --git a/lib/src/command/cache_list.dart b/lib/src/command/cache_list.dart
index abc1cad..ae8db8f 100644
--- a/lib/src/command/cache_list.dart
+++ b/lib/src/command/cache_list.dart
@@ -10,12 +10,18 @@
 
 /// Handles the `cache list` pub command.
 class CacheListCommand extends PubCommand {
-  String get name => "list";
-  String get description => "List packages in the system cache.";
-  String get invocation => "pub cache list";
+  @override
+  String get name => 'list';
+  @override
+  String get description => 'List packages in the system cache.';
+  @override
+  String get invocation => 'pub cache list';
+  @override
   bool get hidden => true;
+  @override
   bool get takesArguments => false;
 
+  @override
   void run() {
     // TODO(keertip): Add flag to list packages from non default sources.
     var packagesObj = <String, Map>{};
diff --git a/lib/src/command/cache_repair.dart b/lib/src/command/cache_repair.dart
index 0631884..ed1f5c0 100644
--- a/lib/src/command/cache_repair.dart
+++ b/lib/src/command/cache_repair.dart
@@ -13,12 +13,18 @@
 
 /// Handles the `cache repair` pub command.
 class CacheRepairCommand extends PubCommand {
-  String get name => "repair";
-  String get description => "Reinstall cached packages.";
-  String get invocation => "pub cache repair";
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-cache";
+  @override
+  String get name => 'repair';
+  @override
+  String get description => 'Reinstall cached packages.';
+  @override
+  String get invocation => 'pub cache repair';
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-cache';
+  @override
   bool get takesArguments => false;
 
+  @override
   Future run() async {
     var successes = [];
     var failures = [];
@@ -33,19 +39,19 @@
     }
 
     if (successes.isNotEmpty) {
-      var packages = pluralize("package", successes.length);
-      log.message("Reinstalled ${log.green(successes.length)} $packages.");
+      var packages = pluralize('package', successes.length);
+      log.message('Reinstalled ${log.green(successes.length)} $packages.');
     }
 
     if (failures.isNotEmpty) {
-      var packages = pluralize("package", failures.length);
+      var packages = pluralize('package', failures.length);
       var buffer = StringBuffer(
-          "Failed to reinstall ${log.red(failures.length)} $packages:\n");
+          'Failed to reinstall ${log.red(failures.length)} $packages:\n');
 
       for (var id in failures) {
-        buffer.write("- ${log.bold(id.name)} ${id.version}");
+        buffer.write('- ${log.bold(id.name)} ${id.version}');
         if (id.source != cache.sources.defaultSource) {
-          buffer.write(" from ${id.source}");
+          buffer.write(' from ${id.source}');
         }
         buffer.writeln();
       }
@@ -55,19 +61,19 @@
 
     var results = await globals.repairActivatedPackages();
     if (results.first.isNotEmpty) {
-      var packages = pluralize("package", results.first.length);
-      log.message("Reactivated ${log.green(results.first.length)} $packages.");
+      var packages = pluralize('package', results.first.length);
+      log.message('Reactivated ${log.green(results.first.length)} $packages.');
     }
 
     if (results.last.isNotEmpty) {
-      var packages = pluralize("package", results.last.length);
+      var packages = pluralize('package', results.last.length);
       log.message(
-          "Failed to reactivate ${log.red(results.last.length)} $packages:\n" +
-              results.last.map((name) => "- ${log.bold(name)}").join("\n"));
+          'Failed to reactivate ${log.red(results.last.length)} $packages:\n' +
+              results.last.map((name) => '- ${log.bold(name)}').join('\n'));
     }
 
     if (successes.isEmpty && failures.isEmpty) {
-      log.message("No packages in cache, so nothing to repair.");
+      log.message('No packages in cache, so nothing to repair.');
     }
 
     if (failures.isNotEmpty || results.last.isNotEmpty) {
diff --git a/lib/src/command/deps.dart b/lib/src/command/deps.dart
index 0cd677b..d8c7b26 100644
--- a/lib/src/command/deps.dart
+++ b/lib/src/command/deps.dart
@@ -16,11 +16,17 @@
 
 /// Handles the `deps` pub command.
 class DepsCommand extends PubCommand {
-  String get name => "deps";
-  String get description => "Print package dependencies.";
-  List<String> get aliases => const ["dependencies", "tab"];
-  String get invocation => "pub deps";
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-deps";
+  @override
+  String get name => 'deps';
+  @override
+  String get description => 'Print package dependencies.';
+  @override
+  List<String> get aliases => const ['dependencies', 'tab'];
+  @override
+  String get invocation => 'pub deps';
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-deps';
+  @override
   bool get takesArguments => false;
 
   final AnalysisContextManager analysisContextManager =
@@ -33,21 +39,22 @@
   bool get _includeDev => argResults['dev'];
 
   DepsCommand() {
-    argParser.addOption("style",
-        abbr: "s",
-        help: "How output should be displayed.",
-        allowed: ["compact", "tree", "list"],
-        defaultsTo: "tree");
+    argParser.addOption('style',
+        abbr: 's',
+        help: 'How output should be displayed.',
+        allowed: ['compact', 'tree', 'list'],
+        defaultsTo: 'tree');
 
-    argParser.addFlag("dev",
+    argParser.addFlag('dev',
         negatable: true,
-        help: "Whether to include dev dependencies.",
+        help: 'Whether to include dev dependencies.',
         defaultsTo: true);
 
-    argParser.addFlag("executables",
-        negatable: false, help: "List all available executables.");
+    argParser.addFlag('executables',
+        negatable: false, help: 'List all available executables.');
   }
 
+  @override
   void run() {
     // Explicitly run this in case we don't access `entrypoint.packageGraph`.
     entrypoint.assertUpToDate();
@@ -64,14 +71,14 @@
 
       _buffer.writeln(_labelPackage(entrypoint.root));
 
-      switch (argResults["style"]) {
-        case "compact":
+      switch (argResults['style']) {
+        case 'compact':
           _outputCompact();
           break;
-        case "list":
+        case 'list':
           _outputList();
           break;
-        case "tree":
+        case 'tree':
           _outputTree();
           break;
       }
@@ -88,33 +95,33 @@
   /// line.
   void _outputCompact() {
     var root = entrypoint.root;
-    _outputCompactPackages("dependencies", root.dependencies.keys);
+    _outputCompactPackages('dependencies', root.dependencies.keys);
     if (_includeDev) {
-      _outputCompactPackages("dev dependencies", root.devDependencies.keys);
+      _outputCompactPackages('dev dependencies', root.devDependencies.keys);
     }
     _outputCompactPackages(
-        "dependency overrides", root.dependencyOverrides.keys);
+        'dependency overrides', root.dependencyOverrides.keys);
 
     var transitive = _getTransitiveDependencies();
-    _outputCompactPackages("transitive dependencies", transitive);
+    _outputCompactPackages('transitive dependencies', transitive);
   }
 
   /// Outputs one section of packages in the compact output.
-  _outputCompactPackages(String section, Iterable<String> names) {
+  void _outputCompactPackages(String section, Iterable<String> names) {
     if (names.isEmpty) return;
 
     _buffer.writeln();
-    _buffer.writeln("$section:");
+    _buffer.writeln('$section:');
     for (var name in ordered(names)) {
       var package = _getPackage(name);
 
-      _buffer.write("- ${_labelPackage(package)}");
+      _buffer.write('- ${_labelPackage(package)}');
       if (package.dependencies.isEmpty) {
         _buffer.writeln();
       } else {
         var depNames = package.dependencies.keys;
         var depsList = "[${depNames.join(' ')}]";
-        _buffer.writeln(" ${log.gray(depsList)}");
+        _buffer.writeln(' ${log.gray(depsList)}');
       }
     }
   }
@@ -126,32 +133,32 @@
   /// shown.
   void _outputList() {
     var root = entrypoint.root;
-    _outputListSection("dependencies", root.dependencies.keys);
+    _outputListSection('dependencies', root.dependencies.keys);
     if (_includeDev) {
-      _outputListSection("dev dependencies", root.devDependencies.keys);
+      _outputListSection('dev dependencies', root.devDependencies.keys);
     }
-    _outputListSection("dependency overrides", root.dependencyOverrides.keys);
+    _outputListSection('dependency overrides', root.dependencyOverrides.keys);
 
     var transitive = _getTransitiveDependencies();
     if (transitive.isEmpty) return;
 
-    _outputListSection("transitive dependencies", ordered(transitive));
+    _outputListSection('transitive dependencies', ordered(transitive));
   }
 
   /// Outputs one section of packages in the list output.
-  _outputListSection(String name, Iterable<String> deps) {
+  void _outputListSection(String name, Iterable<String> deps) {
     if (deps.isEmpty) return;
 
     _buffer.writeln();
-    _buffer.writeln("$name:");
+    _buffer.writeln('$name:');
 
     for (var name in deps) {
       var package = _getPackage(name);
-      _buffer.writeln("- ${_labelPackage(package)}");
+      _buffer.writeln('- ${_labelPackage(package)}');
 
       for (var dep in package.dependencies.values) {
         _buffer
-            .writeln("  - ${log.bold(dep.name)} ${log.gray(dep.constraint)}");
+            .writeln('  - ${log.bold(dep.name)} ${log.gray(dep.constraint)}');
       }
     }
   }
@@ -206,7 +213,7 @@
   }
 
   String _labelPackage(Package package) =>
-      "${log.bold(package.name)} ${package.version}";
+      '${log.bold(package.name)} ${package.version}';
 
   /// Gets the names of the non-immediate dependencies of the root package.
   Set<String> _getTransitiveDependencies() {
@@ -307,12 +314,13 @@
     // Sort executables to make executable that matches the package name to be
     // the first in the list.
     executables.sort((e1, e2) {
-      if (e1 == packageName)
+      if (e1 == packageName) {
         return -1;
-      else if (e2 == packageName)
+      } else if (e2 == packageName) {
         return 1;
-      else
+      } else {
         return e1.compareTo(e2);
+      }
     });
 
     return '$packageName: ${executables.map(log.bold).join(', ')}';
diff --git a/lib/src/command/downgrade.dart b/lib/src/command/downgrade.dart
index b66d7c6..31a31f1 100644
--- a/lib/src/command/downgrade.dart
+++ b/lib/src/command/downgrade.dart
@@ -10,13 +10,18 @@
 
 /// Handles the `downgrade` pub command.
 class DowngradeCommand extends PubCommand {
-  String get name => "downgrade";
+  @override
+  String get name => 'downgrade';
+  @override
   String get description =>
       "Downgrade the current package's dependencies to oldest versions.\n\n"
       "This doesn't modify the lockfile, so it can be reset with \"pub get\".";
-  String get invocation => "pub downgrade [dependencies...]";
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-downgrade";
+  @override
+  String get invocation => 'pub downgrade [dependencies...]';
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-downgrade';
 
+  @override
   bool get isOffline => argResults['offline'];
 
   DowngradeCommand() {
@@ -31,6 +36,7 @@
     argParser.addFlag('packages-dir', negatable: true, hide: true);
   }
 
+  @override
   Future run() async {
     if (argResults.wasParsed('packages-dir')) {
       log.warning(log.yellow(
@@ -41,8 +47,8 @@
         useLatest: argResults.rest, dryRun: dryRun);
 
     if (isOffline) {
-      log.warning("Warning: Downgrading when offline may not update you to "
-          "the oldest versions of your dependencies.");
+      log.warning('Warning: Downgrading when offline may not update you to '
+          'the oldest versions of your dependencies.');
     }
   }
 }
diff --git a/lib/src/command/get.dart b/lib/src/command/get.dart
index a5ea742..6bcd0eb 100644
--- a/lib/src/command/get.dart
+++ b/lib/src/command/get.dart
@@ -10,12 +10,18 @@
 
 /// Handles the `get` pub command.
 class GetCommand extends PubCommand {
-  String get name => "get";
+  @override
+  String get name => 'get';
+  @override
   String get description => "Get the current package's dependencies.";
-  String get invocation => "pub get";
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-get";
-  List<String> get aliases => const ["install"];
-  bool get isOffline => argResults["offline"];
+  @override
+  String get invocation => 'pub get';
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-get';
+  @override
+  List<String> get aliases => const ['install'];
+  @override
+  bool get isOffline => argResults['offline'];
 
   GetCommand() {
     argParser.addFlag('offline',
@@ -28,11 +34,12 @@
 
     argParser.addFlag('precompile',
         defaultsTo: false,
-        help: "Precompile executables in immediate dependencies.");
+        help: 'Precompile executables in immediate dependencies.');
 
     argParser.addFlag('packages-dir', negatable: true, hide: true);
   }
 
+  @override
   Future run() {
     if (argResults.wasParsed('packages-dir')) {
       log.warning(log.yellow(
diff --git a/lib/src/command/global.dart b/lib/src/command/global.dart
index ea4a2ea..fd26934 100644
--- a/lib/src/command/global.dart
+++ b/lib/src/command/global.dart
@@ -10,10 +10,14 @@
 
 /// Handles the `global` pub command.
 class GlobalCommand extends PubCommand {
-  String get name => "global";
-  String get description => "Work with global packages.";
-  String get invocation => "pub global <subcommand>";
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-global";
+  @override
+  String get name => 'global';
+  @override
+  String get description => 'Work with global packages.';
+  @override
+  String get invocation => 'pub global <subcommand>';
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-global';
 
   GlobalCommand() {
     addSubcommand(GlobalActivateCommand());
diff --git a/lib/src/command/global_activate.dart b/lib/src/command/global_activate.dart
index be966ae..1d9b1f1 100644
--- a/lib/src/command/global_activate.dart
+++ b/lib/src/command/global_activate.dart
@@ -12,93 +12,97 @@
 
 /// Handles the `global activate` pub command.
 class GlobalActivateCommand extends PubCommand {
-  String get name => "activate";
+  @override
+  String get name => 'activate';
+  @override
   String get description => "Make a package's executables globally available.";
-  String get invocation => "pub global activate <package> [version-constraint]";
+  @override
+  String get invocation => 'pub global activate <package> [version-constraint]';
 
   GlobalActivateCommand() {
-    argParser.addOption("source",
-        abbr: "s",
-        help: "The source used to find the package.",
-        allowed: ["git", "hosted", "path"],
-        defaultsTo: "hosted");
+    argParser.addOption('source',
+        abbr: 's',
+        help: 'The source used to find the package.',
+        allowed: ['git', 'hosted', 'path'],
+        defaultsTo: 'hosted');
 
-    argParser.addMultiOption("features",
-        abbr: "f", help: "Feature(s) to enable.", hide: true);
+    argParser.addMultiOption('features',
+        abbr: 'f', help: 'Feature(s) to enable.', hide: true);
 
-    argParser.addMultiOption("omit-features",
-        abbr: "F", help: "Feature(s) to disable.", hide: true);
+    argParser.addMultiOption('omit-features',
+        abbr: 'F', help: 'Feature(s) to disable.', hide: true);
 
-    argParser.addFlag("no-executables",
-        negatable: false, help: "Do not put executables on PATH.");
+    argParser.addFlag('no-executables',
+        negatable: false, help: 'Do not put executables on PATH.');
 
-    argParser.addMultiOption("executable",
-        abbr: "x", help: "Executable(s) to place on PATH.");
+    argParser.addMultiOption('executable',
+        abbr: 'x', help: 'Executable(s) to place on PATH.');
 
-    argParser.addFlag("overwrite",
+    argParser.addFlag('overwrite',
         negatable: false,
-        help: "Overwrite executables from other packages with the same name.");
+        help: 'Overwrite executables from other packages with the same name.');
 
-    argParser.addOption("hosted-url",
-        abbr: "u",
+    argParser.addOption('hosted-url',
+        abbr: 'u',
         help:
-            "A custom pub server URL for the package. Only applies when using the `hosted` source.");
+            'A custom pub server URL for the package. Only applies when using the `hosted` source.');
   }
 
+  @override
   Future run() {
     // Default to `null`, which means all executables.
     List<String> executables;
-    if (argResults.wasParsed("executable")) {
-      if (argResults.wasParsed("no-executables")) {
-        usageException("Cannot pass both --no-executables and --executable.");
+    if (argResults.wasParsed('executable')) {
+      if (argResults.wasParsed('no-executables')) {
+        usageException('Cannot pass both --no-executables and --executable.');
       }
 
-      executables = argResults["executable"] as List<String>;
-    } else if (argResults["no-executables"]) {
+      executables = argResults['executable'] as List<String>;
+    } else if (argResults['no-executables']) {
       // An empty list means no executables.
       executables = [];
     }
 
     var features = <String, FeatureDependency>{};
-    for (var feature in argResults["features"] ?? []) {
+    for (var feature in argResults['features'] ?? []) {
       features[feature] = FeatureDependency.required;
     }
-    for (var feature in argResults["omit-features"] ?? []) {
+    for (var feature in argResults['omit-features'] ?? []) {
       if (features.containsKey(feature)) {
-        usageException("Cannot both enable and disable $feature.");
+        usageException('Cannot both enable and disable $feature.');
       }
 
       features[feature] = FeatureDependency.unused;
     }
 
-    var overwrite = argResults["overwrite"];
-    var hostedUrl = argResults["hosted-url"];
+    var overwrite = argResults['overwrite'];
+    var hostedUrl = argResults['hosted-url'];
     Iterable<String> args = argResults.rest;
 
-    readArg([String error]) {
+    dynamic readArg([String error]) {
       if (args.isEmpty) usageException(error);
       var arg = args.first;
       args = args.skip(1);
       return arg;
     }
 
-    validateNoExtraArgs() {
+    void validateNoExtraArgs() {
       if (args.isEmpty) return;
       var unexpected = args.map((arg) => '"$arg"');
-      var arguments = pluralize("argument", unexpected.length);
-      usageException("Unexpected $arguments ${toSentence(unexpected)}.");
+      var arguments = pluralize('argument', unexpected.length);
+      usageException('Unexpected $arguments ${toSentence(unexpected)}.');
     }
 
-    switch (argResults["source"]) {
-      case "git":
-        var repo = readArg("No Git repository given.");
+    switch (argResults['source']) {
+      case 'git':
+        var repo = readArg('No Git repository given.');
         // TODO(rnystrom): Allow passing in a Git ref too.
         validateNoExtraArgs();
         return globals.activateGit(repo, executables,
             features: features, overwriteBinStubs: overwrite);
 
-      case "hosted":
-        var package = readArg("No package to activate given.");
+      case 'hosted':
+        var package = readArg('No package to activate given.');
 
         // Parse the version constraint, if there is one.
         var constraint = VersionConstraint.any;
@@ -114,20 +118,20 @@
         return globals.activateHosted(package, constraint, executables,
             features: features, overwriteBinStubs: overwrite, url: hostedUrl);
 
-      case "path":
+      case 'path':
         if (features.isNotEmpty) {
           // Globally-activated path packages just use the existing lockfile, so
           // we can't change the feature selection.
-          usageException("--features and --omit-features may not be used with "
-              "the path source.");
+          usageException('--features and --omit-features may not be used with '
+              'the path source.');
         }
 
-        var path = readArg("No package to activate given.");
+        var path = readArg('No package to activate given.');
         validateNoExtraArgs();
         return globals.activatePath(path, executables,
             overwriteBinStubs: overwrite);
     }
 
-    throw "unreachable";
+    throw 'unreachable';
   }
 }
diff --git a/lib/src/command/global_deactivate.dart b/lib/src/command/global_deactivate.dart
index 6f6ba22..769f16c 100644
--- a/lib/src/command/global_deactivate.dart
+++ b/lib/src/command/global_deactivate.dart
@@ -8,25 +8,29 @@
 
 /// Handles the `global deactivate` pub command.
 class GlobalDeactivateCommand extends PubCommand {
-  String get name => "deactivate";
-  String get description => "Remove a previously activated package.";
-  String get invocation => "pub global deactivate <package>";
+  @override
+  String get name => 'deactivate';
+  @override
+  String get description => 'Remove a previously activated package.';
+  @override
+  String get invocation => 'pub global deactivate <package>';
 
+  @override
   void run() {
     // Make sure there is a package.
     if (argResults.rest.isEmpty) {
-      usageException("No package to deactivate given.");
+      usageException('No package to deactivate given.');
     }
 
     // Don't allow extra arguments.
     if (argResults.rest.length > 1) {
       var unexpected = argResults.rest.skip(1).map((arg) => '"$arg"');
-      var arguments = pluralize("argument", unexpected.length);
-      usageException("Unexpected $arguments ${toSentence(unexpected)}.");
+      var arguments = pluralize('argument', unexpected.length);
+      usageException('Unexpected $arguments ${toSentence(unexpected)}.');
     }
 
     if (!globals.deactivate(argResults.rest.first)) {
-      dataError("No active package ${log.bold(argResults.rest.first)}.");
+      dataError('No active package ${log.bold(argResults.rest.first)}.');
     }
   }
 }
diff --git a/lib/src/command/global_list.dart b/lib/src/command/global_list.dart
index 61eb9eb..dc26119 100644
--- a/lib/src/command/global_list.dart
+++ b/lib/src/command/global_list.dart
@@ -6,12 +6,18 @@
 
 /// Handles the `global list` pub command.
 class GlobalListCommand extends PubCommand {
-  String get name => "list";
+  @override
+  String get name => 'list';
+  @override
   String get description => 'List globally activated packages.';
+  @override
   String get invocation => 'pub global list';
+  @override
   bool get allowTrailingOptions => false;
+  @override
   bool get takesArguments => false;
 
+  @override
   void run() {
     globals.listActivePackages();
   }
diff --git a/lib/src/command/global_run.dart b/lib/src/command/global_run.dart
index 93c187f..cac856b 100644
--- a/lib/src/command/global_run.dart
+++ b/lib/src/command/global_run.dart
@@ -13,11 +13,15 @@
 
 /// Handles the `global run` pub command.
 class GlobalRunCommand extends PubCommand {
+  @override
   String get name => 'run';
+  @override
   String get description =>
       'Run an executable from a globally activated package.\n'
       "NOTE: We are currently optimizing this command's startup time.";
+  @override
   String get invocation => 'pub global run <package>:<executable> [args...]';
+  @override
   bool get allowTrailingOptions => false;
 
   GlobalRunCommand() {
@@ -26,6 +30,7 @@
     argParser.addOption('mode', help: 'Deprecated option', hide: true);
   }
 
+  @override
   Future run() async {
     if (argResults.rest.isEmpty) {
       usageException('Must specify an executable to run.');
diff --git a/lib/src/command/lish.dart b/lib/src/command/lish.dart
index 114bf78..626ae63 100644
--- a/lib/src/command/lish.dart
+++ b/lib/src/command/lish.dart
@@ -18,11 +18,17 @@
 
 /// Handles the `lish` and `publish` pub commands.
 class LishCommand extends PubCommand {
-  String get name => "publish";
-  String get description => "Publish the current package to pub.dartlang.org.";
-  String get invocation => "pub publish [options]";
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-lish";
-  List<String> get aliases => const ["lish", "lush"];
+  @override
+  String get name => 'publish';
+  @override
+  String get description => 'Publish the current package to pub.dartlang.org.';
+  @override
+  String get invocation => 'pub publish [options]';
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-lish';
+  @override
+  List<String> get aliases => const ['lish', 'lush'];
+  @override
   bool get takesArguments => false;
 
   /// The URL of the server to which to upload the package.
@@ -67,7 +73,7 @@
         return log.progress('Uploading', () async {
           // TODO(nweiz): Cloud Storage can provide an XML-formatted error. We
           // should report that error and exit.
-          var newUri = server.resolve("/api/packages/versions/new");
+          var newUri = server.resolve('/api/packages/versions/new');
           var response = await client.get(newUri, headers: pubApiHeaders);
           var parameters = parseJsonResponse(response);
 
@@ -109,6 +115,7 @@
     }
   }
 
+  @override
   Future run() async {
     if (force && dryRun) {
       usageException('Cannot use both --force and --dry-run.');
@@ -145,7 +152,7 @@
 
   /// Returns the value associated with [key] in [map]. Throws a user-friendly
   /// error if [map] doens't contain [key].
-  _expectField(Map map, String key, http.Response response) {
+  dynamic _expectField(Map map, String key, http.Response response) {
     if (map.containsKey(key)) return map[key];
     invalidServerResponse(response);
   }
@@ -158,10 +165,10 @@
     var warnings = pair.last;
 
     if (errors.isNotEmpty) {
-      log.error("Sorry, your package is missing "
+      log.error('Sorry, your package is missing '
           "${(errors.length > 1) ? 'some requirements' : 'a requirement'} "
           "and can't be published yet.\nFor more information, see: "
-          "https://dart.dev/tools/pub/cmd/pub-lish.\n");
+          'https://dart.dev/tools/pub/cmd/pub-lish.\n');
       return false;
     }
 
@@ -169,7 +176,7 @@
 
     if (dryRun) {
       var s = warnings.length == 1 ? '' : 's';
-      log.warning("\nPackage has ${warnings.length} warning$s.");
+      log.warning('\nPackage has ${warnings.length} warning$s.');
       return warnings.isEmpty;
     }
 
@@ -177,12 +184,12 @@
 
     if (warnings.isNotEmpty) {
       var s = warnings.length == 1 ? '' : 's';
-      message = "\nPackage has ${warnings.length} warning$s. Upload anyway";
+      message = '\nPackage has ${warnings.length} warning$s. Upload anyway';
     }
 
     var confirmed = await confirm(message);
     if (!confirmed) {
-      log.error("Package upload canceled.");
+      log.error('Package upload canceled.');
       return false;
     }
     return true;
diff --git a/lib/src/command/list_package_dirs.dart b/lib/src/command/list_package_dirs.dart
index e598bbf..c3b14f1 100644
--- a/lib/src/command/list_package_dirs.dart
+++ b/lib/src/command/list_package_dirs.dart
@@ -12,17 +12,23 @@
 
 /// Handles the `list-package-dirs` pub command.
 class ListPackageDirsCommand extends PubCommand {
-  String get name => "list-package-dirs";
-  String get description => "Print local paths to dependencies.";
-  String get invocation => "pub list-package-dirs";
+  @override
+  String get name => 'list-package-dirs';
+  @override
+  String get description => 'Print local paths to dependencies.';
+  @override
+  String get invocation => 'pub list-package-dirs';
+  @override
   bool get takesArguments => false;
+  @override
   bool get hidden => true;
 
   ListPackageDirsCommand() {
-    argParser.addOption("format",
-        help: "How output should be displayed.", allowed: ["json"]);
+    argParser.addOption('format',
+        help: 'How output should be displayed.', allowed: ['json']);
   }
 
+  @override
   void run() {
     log.json.enabled = true;
 
@@ -38,18 +44,18 @@
       var packageDir = source.getDirectory(package);
       // Normalize paths and make them absolute for backwards compatibility
       // with the protocol used by the analyzer.
-      return p.normalize(p.absolute(p.join(packageDir, "lib")));
+      return p.normalize(p.absolute(p.join(packageDir, 'lib')));
     });
 
     // Include the self link.
     packages[entrypoint.root.name] =
-        p.normalize(p.absolute(entrypoint.root.path("lib")));
+        p.normalize(p.absolute(entrypoint.root.path('lib')));
 
-    output["packages"] = packages;
+    output['packages'] = packages;
 
     // Include the file(s) which when modified will affect the results. For pub,
     // that's just the pubspec and lockfile.
-    output["input_files"] = [
+    output['input_files'] = [
       p.normalize(p.absolute(entrypoint.lockFilePath)),
       p.normalize(p.absolute(entrypoint.pubspecPath))
     ];
diff --git a/lib/src/command/logout.dart b/lib/src/command/logout.dart
index 664508a..e22f0ca 100644
--- a/lib/src/command/logout.dart
+++ b/lib/src/command/logout.dart
@@ -9,12 +9,16 @@
 
 /// Handles the `logout` pub command.
 class LogoutCommand extends PubCommand {
-  String get name => "logout";
+  @override
+  String get name => 'logout';
+  @override
   String get description => 'Log out of pub.dartlang.org.';
+  @override
   String get invocation => 'pub logout';
 
   LogoutCommand();
 
+  @override
   Future run() async {
     oauth2.logout(cache);
   }
diff --git a/lib/src/command/run.dart b/lib/src/command/run.dart
index c5da1b3..ad2a117 100644
--- a/lib/src/command/run.dart
+++ b/lib/src/command/run.dart
@@ -14,10 +14,15 @@
 
 /// Handles the `run` pub command.
 class RunCommand extends PubCommand {
+  @override
   String get name => 'run';
+  @override
   String get description => 'Run an executable from a package.';
+  @override
   String get invocation => 'pub run <executable> [args...]';
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-run";
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-run';
+  @override
   bool get allowTrailingOptions => false;
 
   RunCommand() {
@@ -26,6 +31,7 @@
     argParser.addOption('mode', help: 'Deprecated option', hide: true);
   }
 
+  @override
   Future run() async {
     if (argResults.rest.isEmpty) {
       usageException('Must specify an executable to run.');
@@ -75,7 +81,7 @@
       final pkg = entrypoint.packageGraph.packages[package];
       // The recompile function will only be called when [package] exists.
       assert(pkg != null);
-      final executablePath = pkg.path(p.join("bin", executable));
+      final executablePath = pkg.path(p.join('bin', executable));
       return entrypoint.precompileExecutable(package, executablePath);
     });
     await flushThenExit(exitCode);
diff --git a/lib/src/command/serve.dart b/lib/src/command/serve.dart
index 45e55ea..4c560e7 100644
--- a/lib/src/command/serve.dart
+++ b/lib/src/command/serve.dart
@@ -6,12 +6,15 @@
 
 /// Handles the `serve` pub command.
 class ServeCommand extends BarbackCommand {
-  String get name => "serve";
-  String get description => "Deprecated command";
+  @override
+  String get name => 'serve';
+  @override
+  String get description => 'Deprecated command';
+  @override
   bool get hidden => true;
 
   ServeCommand() {
-    argParser.addOption("define", hide: true);
+    argParser.addOption('define', hide: true);
     argParser.addOption('hostname', hide: true);
     argParser.addOption('port', hide: true);
     argParser.addFlag('log-admin-url', hide: true);
diff --git a/lib/src/command/upgrade.dart b/lib/src/command/upgrade.dart
index 98e44ae..aba5174 100644
--- a/lib/src/command/upgrade.dart
+++ b/lib/src/command/upgrade.dart
@@ -10,13 +10,19 @@
 
 /// Handles the `upgrade` pub command.
 class UpgradeCommand extends PubCommand {
-  String get name => "upgrade";
+  @override
+  String get name => 'upgrade';
+  @override
   String get description =>
       "Upgrade the current package's dependencies to latest versions.";
-  String get invocation => "pub upgrade [dependencies...]";
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-upgrade";
-  List<String> get aliases => const ["update"];
+  @override
+  String get invocation => 'pub upgrade [dependencies...]';
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-upgrade';
+  @override
+  List<String> get aliases => const ['update'];
 
+  @override
   bool get isOffline => argResults['offline'];
 
   UpgradeCommand() {
@@ -30,11 +36,12 @@
 
     argParser.addFlag('precompile',
         defaultsTo: false,
-        help: "Precompile executables in immediate dependencies.");
+        help: 'Precompile executables in immediate dependencies.');
 
     argParser.addFlag('packages-dir', negatable: true, hide: true);
   }
 
+  @override
   Future run() async {
     if (argResults.wasParsed('packages-dir')) {
       log.warning(log.yellow(
@@ -46,8 +53,8 @@
         precompile: argResults['precompile']);
 
     if (isOffline) {
-      log.warning("Warning: Upgrading when offline may not update you to the "
-          "latest versions of your dependencies.");
+      log.warning('Warning: Upgrading when offline may not update you to the '
+          'latest versions of your dependencies.');
     }
   }
 }
diff --git a/lib/src/command/uploader.dart b/lib/src/command/uploader.dart
index 4adce39..3f91e28 100644
--- a/lib/src/command/uploader.dart
+++ b/lib/src/command/uploader.dart
@@ -13,11 +13,15 @@
 
 /// Handles the `uploader` pub command.
 class UploaderCommand extends PubCommand {
-  String get name => "uploader";
+  @override
+  String get name => 'uploader';
+  @override
   String get description =>
-      "Manage uploaders for a package on pub.dartlang.org.";
-  String get invocation => "pub uploader [options] {add/remove} <email>";
-  String get docUrl => "https://dart.dev/tools/pub/cmd/pub-uploader";
+      'Manage uploaders for a package on pub.dartlang.org.';
+  @override
+  String get invocation => 'pub uploader [options] {add/remove} <email>';
+  @override
+  String get docUrl => 'https://dart.dev/tools/pub/cmd/pub-uploader';
 
   /// The URL of the package hosting server.
   Uri get server => Uri.parse(argResults['server']);
@@ -31,6 +35,7 @@
             '(defaults to the current package)');
   }
 
+  @override
   Future run() {
     if (argResults.rest.isEmpty) {
       log.error('No uploader command given.');
@@ -61,15 +66,15 @@
           var uploader = rest[0];
           return oauth2.withClient(cache, (client) {
             if (command == 'add') {
-              var url = server.resolve("/api/packages/"
-                  "${Uri.encodeComponent(package)}/uploaders");
+              var url = server.resolve('/api/packages/'
+                  '${Uri.encodeComponent(package)}/uploaders');
               return client
-                  .post(url, headers: pubApiHeaders, body: {"email": uploader});
+                  .post(url, headers: pubApiHeaders, body: {'email': uploader});
             } else {
               // command == 'remove'
-              var url = server.resolve("/api/packages/"
-                  "${Uri.encodeComponent(package)}/uploaders/"
-                  "${Uri.encodeComponent(uploader)}");
+              var url = server.resolve('/api/packages/'
+                  '${Uri.encodeComponent(package)}/uploaders/'
+                  '${Uri.encodeComponent(uploader)}');
               return client.delete(url, headers: pubApiHeaders);
             }
           });
diff --git a/lib/src/command/version.dart b/lib/src/command/version.dart
index 284fe51..46dc23e 100644
--- a/lib/src/command/version.dart
+++ b/lib/src/command/version.dart
@@ -8,11 +8,15 @@
 
 /// Handles the `version` pub command.
 class VersionCommand extends PubCommand {
-  String get name => "version";
-  String get description => "Print pub version.";
-  String get invocation => "pub version";
+  @override
+  String get name => 'version';
+  @override
+  String get description => 'Print pub version.';
+  @override
+  String get invocation => 'pub version';
 
+  @override
   void run() {
-    log.message("Pub ${sdk.version}");
+    log.message('Pub ${sdk.version}');
   }
 }
diff --git a/lib/src/command_runner.dart b/lib/src/command_runner.dart
index 7e536f0..6335cee 100644
--- a/lib/src/command_runner.dart
+++ b/lib/src/command_runner.dart
@@ -45,7 +45,7 @@
   /// expected to happen when unit tests invoke code inside pub without going
   /// through a command.)
   static String get command {
-    if (_options == null) return "";
+    if (_options == null) return '';
 
     var list = <String>[];
     for (var command = _options.command;
@@ -53,16 +53,17 @@
         command = command.command) {
       list.add(command.name);
     }
-    return list.join(" ");
+    return list.join(' ');
   }
 
   /// The top-level options parsed by the command runner.
   static ArgResults _options;
 
+  @override
   String get usageFooter =>
-      "See https://dart.dev/tools/pub/cmd for detailed documentation.";
+      'See https://dart.dev/tools/pub/cmd for detailed documentation.';
 
-  PubCommandRunner() : super("pub", "Pub is a package manager for Dart.") {
+  PubCommandRunner() : super('pub', 'Pub is a package manager for Dart.') {
     argParser.addFlag('version', negatable: false, help: 'Print pub version.');
     argParser.addFlag('trace',
         help: 'Print debugging information when an error occurs.');
@@ -109,6 +110,7 @@
     addCommand(VersionCommand());
   }
 
+  @override
   Future run(Iterable<String> args) async {
     try {
       _options = super.parse(args);
@@ -119,6 +121,7 @@
     await runCommand(_options);
   }
 
+  @override
   Future runCommand(ArgResults topLevelResults) async {
     log.withPrejudice = topLevelResults['with-prejudice'];
     log.sparkle = topLevelResults['sparkle'];
@@ -183,7 +186,7 @@
         // Escape the argument for users to copy-paste in bash.
         // Wrap with single quotation, and use '\'' to insert single quote, as
         // long as we have no spaces this doesn't create a new argument.
-        protectArgument(String x) =>
+        String protectArgument(String x) =>
             RegExp(r'^[a-zA-Z0-9-_]+$').stringMatch(x) == null
                 ? "'${x.replaceAll("'", r"'\''")}'"
                 : x;
@@ -200,6 +203,7 @@
     }
   }
 
+  @override
   void printUsage() {
     log.message(usage);
   }
@@ -221,7 +225,7 @@
     String actualRev;
     try {
       actualRev =
-          git.runSync(["rev-parse", "HEAD"], workingDir: pubRoot).single;
+          git.runSync(['rev-parse', 'HEAD'], workingDir: pubRoot).single;
     } on git.GitException catch (_) {
       // When building for Debian, pub isn't checked out via git.
       return;
@@ -229,9 +233,9 @@
 
     if (depsRev == actualRev) return;
     log.warning("${log.yellow('Warning:')} the revision of pub in DEPS is "
-        "${log.bold(depsRev)},\n"
-        "but ${log.bold(actualRev)} is checked out in "
-        "${p.relative(pubRoot)}.\n\n");
+        '${log.bold(depsRev)},\n'
+        'but ${log.bold(actualRev)} is checked out in '
+        '${p.relative(pubRoot)}.\n\n');
   }
 
   /// Returns the appropriate exit code for [exception], falling back on 1 if no
diff --git a/lib/src/dart.dart b/lib/src/dart.dart
index 193e2dc..87a9950 100644
--- a/lib/src/dart.dart
+++ b/lib/src/dart.dart
@@ -29,7 +29,7 @@
   // but it parts in another file that does.
   return dart.declarations.any((node) {
     return node is FunctionDeclaration &&
-        node.name.name == "main" &&
+        node.name.name == 'main' &&
         node.functionExpression.parameters.parameters.length <= 2;
   });
 }
@@ -51,18 +51,18 @@
 
   if (packagesFile != null) {
     // Resolve [packagesFile] in case it's relative to work around sdk#33177.
-    args.insert(0, "--packages=${Uri.base.resolveUri(packagesFile)}");
+    args.insert(0, '--packages=${Uri.base.resolveUri(packagesFile)}');
   }
 
   var result = await runProcess(Platform.executable, args);
   if (result.success) {
-    log.message("Precompiled $name.");
+    log.message('Precompiled $name.');
   } else {
     // Don't leave partial results.
     deleteEntry(snapshotPath);
 
     throw ApplicationException(
-        log.yellow("Failed to precompile $name:\n") + result.stderr.join('\n'));
+        log.yellow('Failed to precompile $name:\n') + result.stderr.join('\n'));
   }
 }
 
@@ -176,5 +176,5 @@
   String get message => toString();
 
   @override
-  String toString() => errors.join("\n");
+  String toString() => errors.join('\n');
 }
diff --git a/lib/src/entrypoint.dart b/lib/src/entrypoint.dart
index 36a9d2b..749c818 100644
--- a/lib/src/entrypoint.dart
+++ b/lib/src/entrypoint.dart
@@ -44,7 +44,7 @@
   // sdks:
   //   dart: ">=1.2.3 <2.0.0"
   // ```
-  var sdkNames = sdks.keys.map((name) => "  " + name).join('|');
+  var sdkNames = sdks.keys.map((name) => '  ' + name).join('|');
   return RegExp(r'^(' + sdkNames + r'|sdk): "?([^"]*)"?$', multiLine: true);
 }();
 
@@ -109,11 +109,9 @@
     if (_packageGraph != null) return _packageGraph;
 
     assertUpToDate();
-    var packages = Map<String, Package>.fromIterable(
-      lockFile.packages.values,
-      key: (id) => id.name,
-      value: (id) => cache.load(id as PackageId),
-    );
+    var packages = {
+      for (var id in lockFile.packages.values) id.name: cache.load(id)
+    };
     packages[root.name] = root;
 
     _packageGraph = PackageGraph(this, lockFile, packages);
@@ -282,12 +280,12 @@
 
     if (executables.isEmpty) return;
 
-    await log.progress("Precompiling executables", () async {
+    await log.progress('Precompiling executables', () async {
       ensureDir(_snapshotPath);
 
       // Make sure there's a trailing newline so our version file matches the
       // SDK's.
-      writeTextFile(p.join(_snapshotPath, 'sdk-version'), "${sdk.version}\n");
+      writeTextFile(p.join(_snapshotPath, 'sdk-version'), '${sdk.version}\n');
 
       await _precompileExecutables(executables);
     });
@@ -305,7 +303,7 @@
 
   /// Precompiles executable .dart file at [path] to a snapshot.
   Future<void> precompileExecutable(String package, String path) async {
-    return await log.progress("Precompiling executable", () async {
+    return await log.progress('Precompiling executable', () async {
       var dir = p.join(_snapshotPath, package);
       ensureDir(dir);
       return waitAndPrintErrors([_precompileExecutable(package, path)]);
@@ -339,7 +337,7 @@
     // TODO(nweiz): Use the VM to check this when issue 20802 is fixed.
     var sdkVersionPath = p.join(_snapshotPath, 'sdk-version');
     if (!fileExists(sdkVersionPath) ||
-        readTextFile(sdkVersionPath) != "${sdk.version}\n") {
+        readTextFile(sdkVersionPath) != '${sdk.version}\n') {
       deleteEntry(_snapshotPath);
       return;
     }
@@ -378,7 +376,7 @@
     // it's good to start from scratch anyway.
     var executablesExist = executables.every((executable) {
       var snapshotPath = p.join(_snapshotPath, packageName,
-          "${p.basename(executable)}.snapshot.dart2");
+          '${p.basename(executable)}.snapshot.dart2');
       return fileExists(snapshotPath);
     });
     if (!executablesExist) return executables;
@@ -425,7 +423,7 @@
     // Manually parse the lockfile because a full YAML parse is relatively slow
     // and this is on the hot path for "pub run".
     var lockFileText = readTextFile(lockFilePath);
-    var hasPathDependencies = lockFileText.contains("\n    source: path\n");
+    var hasPathDependencies = lockFileText.contains('\n    source: path\n');
 
     var pubspecModified = File(pubspecPath).lastModifiedSync();
     var lockFileModified = File(lockFilePath).lastModifiedSync();
@@ -471,7 +469,7 @@
 
       var parsedConstraint = VersionConstraint.parse(match[2]);
       if (!parsedConstraint.allows(sdk.version)) {
-        dataError("${sdk.name} ${sdk.version} is incompatible with your "
+        dataError('${sdk.name} ${sdk.version} is incompatible with your '
             "dependencies' SDK constraints. Please run \"pub get\" again.");
       }
     }
@@ -535,7 +533,7 @@
       // Get the directory.
       var dir = source.getDirectory(package);
       // See if the directory is there and looks like a package.
-      return dirExists(dir) && fileExists(p.join(dir, "pubspec.yaml"));
+      return dirExists(dir) && fileExists(p.join(dir, 'pubspec.yaml'));
     });
   }
 
@@ -572,7 +570,7 @@
         // package. This is also done by [_arePackagesAvailable] but that may not
         // be run if the lockfile is newer than the pubspec.
         if (source is CachedSource && !dirExists(lockFilePackagePath) ||
-            !fileExists(p.join(lockFilePackagePath, "pubspec.yaml"))) {
+            !fileExists(p.join(lockFilePackagePath, 'pubspec.yaml'))) {
           return false;
         }
 
diff --git a/lib/src/error_group.dart b/lib/src/error_group.dart
index 284b9a2..1702fc8 100644
--- a/lib/src/error_group.dart
+++ b/lib/src/error_group.dart
@@ -68,7 +68,7 @@
   Future<T> registerFuture<T>(Future<T> future) {
     if (_isDone) {
       throw StateError("Can't register new members on a complete "
-          "ErrorGroup.");
+          'ErrorGroup.');
     }
 
     var wrapped = _ErrorGroupFuture(this, future);
@@ -91,7 +91,7 @@
   Stream<T> registerStream<T>(Stream<T> stream) {
     if (_isDone) {
       throw StateError("Can't register new members on a complete "
-          "ErrorGroup.");
+          'ErrorGroup.');
     }
 
     var wrapped = _ErrorGroupStream(this, stream);
@@ -134,10 +134,11 @@
 
     _isDone = true;
     _done._signalError(error, stackTrace);
-    if (!caught && !_done._hasListeners)
+    if (!caught && !_done._hasListeners) {
       scheduleMicrotask(() {
         throw error;
       });
+    }
   }
 
   /// Notifies [this] that one of its member [Future]s is complete.
@@ -191,26 +192,31 @@
     _completer.future.catchError((_) {});
   }
 
-  Future<S> then<S>(FutureOr<S> onValue(T value), {Function onError}) {
+  @override
+  Future<S> then<S>(FutureOr<S> Function(T) onValue, {Function onError}) {
     _hasListeners = true;
     return _completer.future.then(onValue, onError: onError);
   }
 
-  Future<T> catchError(Function onError, {bool test(Object error)}) {
+  @override
+  Future<T> catchError(Function onError, {bool Function(Object error) test}) {
     _hasListeners = true;
     return _completer.future.catchError(onError, test: test);
   }
 
-  Future<T> whenComplete(void action()) {
+  @override
+  Future<T> whenComplete(void Function() action) {
     _hasListeners = true;
     return _completer.future.whenComplete(action);
   }
 
-  Future<T> timeout(Duration timeLimit, {onTimeout()}) {
+  @override
+  Future<T> timeout(Duration timeLimit, {void Function() onTimeout}) {
     _hasListeners = true;
     return _completer.future.timeout(timeLimit, onTimeout: onTimeout);
   }
 
+  @override
   Stream<T> asStream() {
     _hasListeners = true;
     return _completer.future.asStream();
@@ -272,8 +278,9 @@
     });
   }
 
-  StreamSubscription<T> listen(void onData(T value),
-      {Function onError, void onDone(), bool cancelOnError}) {
+  @override
+  StreamSubscription<T> listen(void Function(T) onData,
+      {Function onError, void Function() onDone, bool cancelOnError}) {
     return _stream.listen(onData,
         onError: onError, onDone: onDone, cancelOnError: true);
   }
diff --git a/lib/src/exceptions.dart b/lib/src/exceptions.dart
index a743b41..4e49504 100644
--- a/lib/src/exceptions.dart
+++ b/lib/src/exceptions.dart
@@ -6,9 +6,9 @@
 import 'dart:isolate';
 
 import 'package:args/command_runner.dart';
-import "package:http/http.dart" as http;
-import "package:stack_trace/stack_trace.dart";
-import "package:yaml/yaml.dart";
+import 'package:http/http.dart' as http;
+import 'package:stack_trace/stack_trace.dart';
+import 'package:yaml/yaml.dart';
 
 import 'dart.dart';
 import 'sdk.dart';
@@ -22,12 +22,14 @@
 
   ApplicationException(this.message);
 
+  @override
   String toString() => message;
 }
 
 /// An exception class for exceptions that are intended to be seen by the user
 /// and are associated with a problem in a file at some path.
 class FileException implements ApplicationException {
+  @override
   final String message;
 
   /// The path to the file that was missing or erroneous.
@@ -35,6 +37,7 @@
 
   FileException(this.message, this.path);
 
+  @override
   String toString() => message;
 }
 
@@ -87,6 +90,7 @@
       {innerError, StackTrace innerTrace, this.missingSdk})
       : super(message, innerError, innerTrace);
 
+  @override
   String toString() => "Package doesn't exist ($message).";
 }
 
diff --git a/lib/src/executable.dart b/lib/src/executable.dart
index a48c333..2923822 100644
--- a/lib/src/executable.dart
+++ b/lib/src/executable.dart
@@ -39,7 +39,7 @@
     {bool checked = false,
     String packagesFile,
     String snapshotPath,
-    Future<void> recompile()}) async {
+    Future<void> Function() recompile}) async {
   packagesFile ??= entrypoint.packagesFile;
 
   // Make sure the package is an immediate dependency of the entrypoint or the
@@ -79,16 +79,16 @@
   // If the command has a path separator, then it's a path relative to the
   // root of the package. Otherwise, it's implicitly understood to be in
   // "bin".
-  if (p.split(executable).length == 1) executable = p.join("bin", executable);
+  if (p.split(executable).length == 1) executable = p.join('bin', executable);
 
   var executablePath = await _executablePath(entrypoint, package, executable);
 
   if (executablePath == null) {
-    var message = "Could not find ${log.bold(executable)}";
+    var message = 'Could not find ${log.bold(executable)}';
     if (entrypoint.isGlobal || package != entrypoint.root.name) {
-      message += " in package ${log.bold(package)}";
+      message += ' in package ${log.bold(package)}';
     }
-    log.error("$message.");
+    log.error('$message.');
     return exit_codes.NO_INPUT;
   }
 
@@ -123,7 +123,7 @@
 ///
 /// Returns `null` if [path] doesn't exist and isn't generated by [recompile].
 Future<int> _runOrCompileSnapshot(String path, Iterable<String> args,
-    {Future<void> recompile(),
+    {Future<void> Function() recompile,
     String packagesFile,
     bool checked = false}) async {
   if (!fileExists(path)) {
@@ -149,7 +149,7 @@
 ///
 /// This doesn't do any validation of the snapshot's SDK version.
 Future<int> _runSnapshot(String path, Iterable<String> args,
-    {Future<void> recompile(),
+    {Future<void> Function() recompile,
     String packagesFile,
     bool checked = false}) async {
   Uri packageConfig;
@@ -170,11 +170,11 @@
         packageConfig: packageConfig);
   } on IsolateSpawnException catch (error) {
     if (recompile == null) rethrow;
-    if (!error.message.contains("Invalid kernel binary format version")) {
+    if (!error.message.contains('Invalid kernel binary format version')) {
       rethrow;
     }
 
-    log.fine("Precompiled executable is out of date.");
+    log.fine('Precompiled executable is out of date.');
     await recompile();
     await isolate.runUri(url, argList, null,
         checked: checked, packageConfig: packageConfig);
diff --git a/lib/src/feature.dart b/lib/src/feature.dart
index a3e74a3..0fcd20e 100644
--- a/lib/src/feature.dart
+++ b/lib/src/feature.dart
@@ -38,7 +38,7 @@
     // [enableFeature] adds a feature to [features], along with any other
     // features it requires.
     var enabledFeatures = <Feature>{};
-    enableFeature(Feature feature) {
+    void enableFeature(Feature feature) {
       if (!enabledFeatures.add(feature)) return;
       for (var require in feature.requires) {
         enableFeature(features[require]);
@@ -64,9 +64,9 @@
         requires = requires == null
             ? const []
             : UnmodifiableListView(requires.toList()),
-        sdkConstraints = UnmodifiableMapView(sdkConstraints == null
-            ? {"dart": VersionConstraint.any}
-            : sdkConstraints);
+        sdkConstraints = UnmodifiableMapView(
+            sdkConstraints ?? {'dart': VersionConstraint.any});
 
+  @override
   String toString() => name;
 }
diff --git a/lib/src/git.dart b/lib/src/git.dart
index b8a8cc1..96f36b8 100644
--- a/lib/src/git.dart
+++ b/lib/src/git.dart
@@ -21,10 +21,12 @@
   /// The standard error emitted by git.
   final String stderr;
 
+  @override
   String get message => 'Git error. Command: git ${args.join(" ")}\n$stderr';
 
   GitException(Iterable<String> args, this.stderr) : args = args.toList();
 
+  @override
   String toString() => message;
 }
 
@@ -38,15 +40,15 @@
 Future<List<String>> run(List<String> args,
     {String workingDir, Map<String, String> environment}) async {
   if (!isInstalled) {
-    fail("Cannot find a Git executable.\n"
-        "Please ensure Git is correctly installed.");
+    fail('Cannot find a Git executable.\n'
+        'Please ensure Git is correctly installed.');
   }
 
   log.muteProgress();
   try {
     var result = await runProcess(command, args,
         workingDir: workingDir, environment: environment);
-    if (!result.success) throw GitException(args, result.stderr.join("\n"));
+    if (!result.success) throw GitException(args, result.stderr.join('\n'));
     return result.stdout;
   } finally {
     log.unmuteProgress();
@@ -57,13 +59,13 @@
 List<String> runSync(List<String> args,
     {String workingDir, Map<String, String> environment}) {
   if (!isInstalled) {
-    fail("Cannot find a Git executable.\n"
-        "Please ensure Git is correctly installed.");
+    fail('Cannot find a Git executable.\n'
+        'Please ensure Git is correctly installed.');
   }
 
   var result = runProcessSync(command, args,
       workingDir: workingDir, environment: environment);
-  if (!result.success) throw GitException(args, result.stderr.join("\n"));
+  if (!result.success) throw GitException(args, result.stderr.join('\n'));
   return result.stdout;
 }
 
@@ -72,10 +74,10 @@
 String get command {
   if (_commandCache != null) return _commandCache;
 
-  if (_tryGitCommand("git")) {
-    _commandCache = "git";
-  } else if (_tryGitCommand("git.cmd")) {
-    _commandCache = "git.cmd";
+  if (_tryGitCommand('git')) {
+    _commandCache = 'git';
+  } else if (_tryGitCommand('git.cmd')) {
+    _commandCache = 'git.cmd';
   } else {
     return null;
   }
@@ -90,8 +92,8 @@
 bool _tryGitCommand(String command) {
   // If "git --version" prints something familiar, git is working.
   try {
-    var result = runProcessSync(command, ["--version"]);
-    var regexp = RegExp("^git version");
+    var result = runProcessSync(command, ['--version']);
+    var regexp = RegExp('^git version');
     return result.stdout.length == 1 && regexp.hasMatch(result.stdout.single);
   } on ProcessException catch (error, stackTrace) {
     var chain = Chain.forTrace(stackTrace);
diff --git a/lib/src/global_packages.dart b/lib/src/global_packages.dart
index eafdea8..c71e81c 100644
--- a/lib/src/global_packages.dart
+++ b/lib/src/global_packages.dart
@@ -58,10 +58,10 @@
   final SystemCache cache;
 
   /// The directory where the lockfiles for activated packages are stored.
-  String get _directory => p.join(cache.rootDir, "global_packages");
+  String get _directory => p.join(cache.rootDir, 'global_packages');
 
   /// The directory where binstubs for global package executables are stored.
-  String get _binStubDir => p.join(cache.rootDir, "bin");
+  String get _binStubDir => p.join(cache.rootDir, 'bin');
 
   /// Creates a new global package registry backed by the given directory on
   /// the user's file system.
@@ -171,7 +171,7 @@
   Future _installInCache(PackageRange dep, List<String> executables,
       {bool overwriteBinStubs}) async {
     // Create a dummy package with just [dep] so we can do resolution on it.
-    var root = Package.inMemory(Pubspec("pub global activate",
+    var root = Package.inMemory(Pubspec('pub global activate',
         dependencies: [dep], sources: cache.sources));
 
     // Resolve it and download its dependencies.
@@ -232,7 +232,7 @@
   /// successfully precompiled.
   Future<Map<String, String>> _precompileExecutables(
       Entrypoint entrypoint, String packageName) {
-    return log.progress("Precompiling executables", () async {
+    return log.progress('Precompiling executables', () async {
       var binDir = p.join(_directory, packageName, 'bin');
       cleanDir(binDir);
 
@@ -277,7 +277,7 @@
     // TODO(nweiz): This cleans up Dart 1.6's old lockfile location. Remove it
     // when Dart 1.6 is old enough that we don't think anyone will have these
     // lockfiles anymore (issue 20703).
-    var oldPath = p.join(_directory, "$package.lock");
+    var oldPath = p.join(_directory, '$package.lock');
     if (fileExists(oldPath)) deleteEntry(oldPath);
 
     writeTextFile(_getLockFilePath(package), lockFile.serialize(cache.rootDir));
@@ -343,7 +343,7 @@
         lockFile = LockFile.load(oldLockFilePath, cache.sources);
       } on IOException {
         // If we couldn't read the lock file, it's not activated.
-        dataError("No active package ${log.bold(name)}.");
+        dataError('No active package ${log.bold(name)}.');
       }
 
       // Move the old lockfile to its new location.
@@ -375,13 +375,13 @@
       if (sdk == null) {
         dataError('${log.bold(name)} ${entrypoint.root.version} requires '
             'unknown SDK "$name".');
-      } else if (sdkName == "dart") {
+      } else if (sdkName == 'dart') {
         if (constraint.allows(sdk.version)) return;
         dataError("${log.bold(name)} ${entrypoint.root.version} doesn't "
-            "support Dart ${sdk.version}.");
+            'support Dart ${sdk.version}.');
       } else {
-        dataError("${log.bold(name)} ${entrypoint.root.version} requires the "
-            "${sdk.name} SDK, which is unsupported for global executables.");
+        dataError('${log.bold(name)} ${entrypoint.root.version} requires the '
+            '${sdk.name} SDK, which is unsupported for global executables.');
       }
     });
 
@@ -417,17 +417,17 @@
   /// Gets the path to the lock file for an activated cached package with
   /// [name].
   String _getLockFilePath(String name) =>
-      p.join(_directory, name, "pubspec.lock");
+      p.join(_directory, name, 'pubspec.lock');
 
   /// Gets the path to the .packages file for an activated cached package with
   /// [name].
   String _getPackagesFilePath(String name) =>
-      p.join(_directory, name, ".packages");
+      p.join(_directory, name, '.packages');
 
   /// Gets the path to the `package_config.json` file for an
   /// activated cached package with [name].
   String _getPackageConfigFilePath(String name) =>
-      p.join(_directory, name, ".dart_tool", "package_config.json");
+      p.join(_directory, name, '.dart_tool', 'package_config.json');
 
   /// Shows the user a formatted list of globally activated packages.
   void listActivePackages() {
@@ -452,7 +452,7 @@
 
     if (id == null) {
       throw FormatException("Pubspec for activated package $name didn't "
-          "contain an entry for itself.");
+          'contain an entry for itself.');
     }
 
     return id;
@@ -482,12 +482,12 @@
       for (var entry in listDir(_binStubDir)) {
         try {
           var binstub = readTextFile(entry);
-          var package = _binStubProperty(binstub, "Package");
+          var package = _binStubProperty(binstub, 'Package');
           if (package == null) {
             throw ApplicationException("No 'Package' property.");
           }
 
-          var executable = _binStubProperty(binstub, "Executable");
+          var executable = _binStubProperty(binstub, 'Executable');
           if (executable == null) {
             throw ApplicationException("No 'Executable' property.");
           }
@@ -495,8 +495,8 @@
           executables.putIfAbsent(package, () => []).add(executable);
         } catch (error, stackTrace) {
           log.error(
-              "Error reading binstub for "
-              "\"${p.basenameWithoutExtension(entry)}\"",
+              'Error reading binstub for '
+              '"${p.basenameWithoutExtension(entry)}"',
               error,
               stackTrace);
 
@@ -512,7 +512,7 @@
         PackageId id;
         try {
           id = _loadPackageId(entry);
-          log.message("Reactivating ${log.bold(id.name)} ${id.version}...");
+          log.message('Reactivating ${log.bold(id.name)} ${id.version}...');
 
           var entrypoint = find(id.name);
           var snapshots = await _precompileExecutables(entrypoint, id.name);
@@ -524,11 +524,11 @@
               suggestIfNotOnPath: false);
           successes.add(id.name);
         } catch (error, stackTrace) {
-          var message = "Failed to reactivate "
-              "${log.bold(p.basenameWithoutExtension(entry))}";
+          var message = 'Failed to reactivate '
+              '${log.bold(p.basenameWithoutExtension(entry))}';
           if (id != null) {
-            message += " ${id.version}";
-            if (id.source is! HostedSource) message += " from ${id.source}";
+            message += ' ${id.version}';
+            if (id.source is! HostedSource) message += ' from ${id.source}';
           }
 
           log.error(message, error, stackTrace);
@@ -540,15 +540,15 @@
     }
 
     if (executables.isNotEmpty) {
-      var message = StringBuffer("Binstubs exist for non-activated "
-          "packages:\n");
+      var message = StringBuffer('Binstubs exist for non-activated '
+          'packages:\n');
       executables.forEach((package, executableNames) {
         for (var executable in executableNames) {
           deleteEntry(p.join(_binStubDir, executable));
         }
 
-        message.writeln("  From ${log.bold(package)}: "
-            "${toSentence(executableNames)}");
+        message.writeln('  From ${log.bold(package)}: '
+            '${toSentence(executableNames)}');
       });
       log.error(message);
     }
@@ -615,25 +615,25 @@
     }
 
     if (installed.isNotEmpty) {
-      var names = namedSequence("executable", installed.map(log.bold));
-      log.message("Installed $names.");
+      var names = namedSequence('executable', installed.map(log.bold));
+      log.message('Installed $names.');
     }
 
     // Show errors for any collisions.
     if (collided.isNotEmpty) {
       for (var command in ordered(collided.keys)) {
         if (overwriteBinStubs) {
-          log.warning("Replaced ${log.bold(command)} previously installed from "
-              "${log.bold(collided[command])}.");
+          log.warning('Replaced ${log.bold(command)} previously installed from '
+              '${log.bold(collided[command])}.');
         } else {
-          log.warning("Executable ${log.bold(command)} was already installed "
-              "from ${log.bold(collided[command])}.");
+          log.warning('Executable ${log.bold(command)} was already installed '
+              'from ${log.bold(collided[command])}.');
         }
       }
 
       if (!overwriteBinStubs) {
-        log.warning("Deactivate the other package(s) or activate "
-            "${log.bold(package.name)} using --overwrite.");
+        log.warning('Deactivate the other package(s) or activate '
+            '${log.bold(package.name)} using --overwrite.');
       }
     }
 
@@ -650,12 +650,12 @@
     // TODO(rnystrom): This can print false positives since a script may be
     // produced by a transformer. Do something better.
     var binFiles = package
-        .listFiles(beneath: "bin", recursive: false)
+        .listFiles(beneath: 'bin', recursive: false)
         .map((path) => package.relative(path))
         .toList();
     for (var executable in installed) {
       var script = package.pubspec.executables[executable];
-      var scriptPath = p.join("bin", "$script.dart");
+      var scriptPath = p.join('bin', '$script.dart');
       if (!binFiles.contains(scriptPath)) {
         log.warning('Warning: Executable "$executable" runs "$scriptPath", '
             'which was not found in ${log.bold(package.name)}.');
@@ -680,16 +680,16 @@
   String _createBinStub(Package package, String executable, String script,
       {bool overwrite, String snapshot}) {
     var binStubPath = p.join(_binStubDir, executable);
-    if (Platform.isWindows) binStubPath += ".bat";
+    if (Platform.isWindows) binStubPath += '.bat';
 
     // See if the binstub already exists. If so, it's for another package
     // since we already deleted all of this package's binstubs.
     String previousPackage;
     if (fileExists(binStubPath)) {
       var contents = readTextFile(binStubPath);
-      previousPackage = _binStubProperty(contents, "Package");
+      previousPackage = _binStubProperty(contents, 'Package');
       if (previousPackage == null) {
-        log.fine("Could not parse binstub $binStubPath:\n$contents");
+        log.fine('Could not parse binstub $binStubPath:\n$contents');
       } else if (!overwrite) {
         return previousPackage;
       }
@@ -704,11 +704,11 @@
       assert(p.isAbsolute(snapshot));
       invocation = 'dart "$snapshot"';
     } else {
-      invocation = "pub global run ${package.name}:$script";
+      invocation = 'pub global run ${package.name}:$script';
     }
 
     if (Platform.isWindows) {
-      var batch = """
+      var batch = '''
 @echo off
 rem This file was created by pub v${sdk.version}.
 rem Package: ${package.name}
@@ -716,10 +716,10 @@
 rem Executable: $executable
 rem Script: $script
 $invocation %*
-""";
+''';
 
       if (snapshot != null) {
-        batch += """
+        batch += '''
 
 rem The VM exits with code 253 if the snapshot version is out-of-date.
 rem If it is, we need to delete it and run "pub global" manually.
@@ -728,12 +728,12 @@
 )
 
 pub global run ${package.name}:$script %*
-""";
+''';
       }
 
       writeTextFile(binStubPath, batch);
     } else {
-      var bash = """
+      var bash = '''
 #!/usr/bin/env sh
 # This file was created by pub v${sdk.version}.
 # Package: ${package.name}
@@ -741,10 +741,10 @@
 # Executable: $executable
 # Script: $script
 $invocation "\$@"
-""";
+''';
 
       if (snapshot != null) {
-        bash += """
+        bash += '''
 
 # The VM exits with code 253 if the snapshot version is out-of-date.
 # If it is, we need to delete it and run "pub global" manually.
@@ -754,7 +754,7 @@
 fi
 
 pub global run ${package.name}:$script "\$@"
-""";
+''';
       }
 
       // Write this as the system encoding since the system is going to execute
@@ -769,7 +769,7 @@
           deleteEntry(binStubPath);
         } on IOException catch (err) {
           // Do nothing. We're going to fail below anyway.
-          log.fine("Could not delete binstub:\n$err");
+          log.fine('Could not delete binstub:\n$err');
         }
 
         fail('Could not make "$binStubPath" executable (exit code '
@@ -786,14 +786,14 @@
 
     for (var file in listDir(_binStubDir, includeDirs: false)) {
       var contents = readTextFile(file);
-      var binStubPackage = _binStubProperty(contents, "Package");
+      var binStubPackage = _binStubProperty(contents, 'Package');
       if (binStubPackage == null) {
-        log.fine("Could not parse binstub $file:\n$contents");
+        log.fine('Could not parse binstub $file:\n$contents');
         continue;
       }
 
       if (binStubPackage == package) {
-        log.fine("Deleting old binstub $file");
+        log.fine('Deleting old binstub $file');
         deleteEntry(file);
       }
     }
@@ -808,11 +808,11 @@
     if (Platform.isWindows) {
       // See if the shell can find one of the binstubs.
       // "\q" means return exit code 0 if found or 1 if not.
-      var result = runProcessSync("where", [r"\q", installed + ".bat"]);
+      var result = runProcessSync('where', [r'\q', installed + '.bat']);
       if (result.exitCode == 0) return;
 
       log.warning("${log.yellow('Warning:')} Pub installs executables into "
-          "${log.bold(_binStubDir)}, which is not on your path.\n"
+          '${log.bold(_binStubDir)}, which is not on your path.\n'
           "You can fix that by adding that directory to your system's "
           '"Path" environment variable.\n'
           'A web search for "configure windows path" will show you how.');
@@ -822,7 +822,7 @@
       // The "command" builtin is more reliable than the "which" executable. See
       // http://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then
       var result =
-          runProcessSync("command", ["-v", installed], runInShell: true);
+          runProcessSync('command', ['-v', installed], runInShell: true);
       if (result.exitCode == 0) return;
 
       var binDir = _binStubDir;
@@ -832,19 +832,19 @@
       }
 
       log.warning("${log.yellow('Warning:')} Pub installs executables into "
-          "${log.bold(binDir)}, which is not on your path.\n"
+          '${log.bold(binDir)}, which is not on your path.\n'
           "You can fix that by adding this to your shell's config file "
-          "(.bashrc, .bash_profile, etc.):\n"
-          "\n"
+          '(.bashrc, .bash_profile, etc.):\n'
+          '\n'
           "  ${log.bold('export PATH="\$PATH":"$binDir"')}\n"
-          "\n");
+          '\n');
     }
   }
 
   /// Returns the value of the property named [name] in the bin stub script
   /// [source].
   String _binStubProperty(String source, String name) {
-    var pattern = RegExp(quoteRegExp(name) + r": ([a-zA-Z0-9_-]+)");
+    var pattern = RegExp(quoteRegExp(name) + r': ([a-zA-Z0-9_-]+)');
     var match = pattern.firstMatch(source);
     return match == null ? null : match[1];
   }
diff --git a/lib/src/http.dart b/lib/src/http.dart
index 63d5160..598ead8 100644
--- a/lib/src/http.dart
+++ b/lib/src/http.dart
@@ -41,26 +41,26 @@
 
   http.Client _inner;
 
-  _PubHttpClient([http.Client inner])
-      : _inner = inner == null ? http.Client() : inner;
+  _PubHttpClient([http.Client inner]) : _inner = inner ?? http.Client();
 
+  @override
   Future<http.StreamedResponse> send(http.BaseRequest request) async {
     if (_shouldAddMetadata(request)) {
-      request.headers["X-Pub-OS"] = Platform.operatingSystem;
-      request.headers["X-Pub-Command"] = PubCommandRunner.command;
-      request.headers["X-Pub-Session-ID"] = _sessionId;
+      request.headers['X-Pub-OS'] = Platform.operatingSystem;
+      request.headers['X-Pub-Command'] = PubCommandRunner.command;
+      request.headers['X-Pub-Session-ID'] = _sessionId;
 
-      var environment = Platform.environment["PUB_ENVIRONMENT"];
+      var environment = Platform.environment['PUB_ENVIRONMENT'];
       if (environment != null) {
-        request.headers["X-Pub-Environment"] = environment;
+        request.headers['X-Pub-Environment'] = environment;
       }
 
       var type = Zone.current[#_dependencyType];
-      if (type != null) request.headers["X-Pub-Reason"] = type.toString();
+      if (type != null) request.headers['X-Pub-Reason'] = type.toString();
     }
 
     _requestStopwatches[request] = Stopwatch()..start();
-    request.headers[HttpHeaders.userAgentHeader] = "Dart pub ${sdk.version}";
+    request.headers[HttpHeaders.userAgentHeader] = 'Dart pub ${sdk.version}';
     _logRequest(request);
 
     http.StreamedResponse streamedResponse;
@@ -97,28 +97,28 @@
 
   /// Whether extra metadata headers should be added to [request].
   bool _shouldAddMetadata(http.BaseRequest request) {
-    if (runningFromTest && Platform.environment.containsKey("PUB_HOSTED_URL")) {
-      if (request.url.origin != Platform.environment["PUB_HOSTED_URL"]) {
+    if (runningFromTest && Platform.environment.containsKey('PUB_HOSTED_URL')) {
+      if (request.url.origin != Platform.environment['PUB_HOSTED_URL']) {
         return false;
       }
     } else {
-      if (request.url.origin != "https://pub.dartlang.org") return false;
+      if (request.url.origin != 'https://pub.dartlang.org') return false;
     }
 
     return const [
-      "cache add",
-      "cache repair",
-      "downgrade",
-      "get",
-      "global activate",
-      "upgrade",
+      'cache add',
+      'cache repair',
+      'downgrade',
+      'get',
+      'global activate',
+      'upgrade',
     ].contains(PubCommandRunner.command);
   }
 
   /// Logs the fact that [request] was sent, and information about it.
   void _logRequest(http.BaseRequest request) {
     var requestLog = StringBuffer();
-    requestLog.writeln("HTTP ${request.method} ${request.url}");
+    requestLog.writeln('HTTP ${request.method} ${request.url}');
     request.headers
         .forEach((name, value) => requestLog.writeln(_logField(name, value)));
 
@@ -127,7 +127,7 @@
       var contentType = ContentType.parse(contentTypeString ?? '');
       if (request is http.MultipartRequest) {
         requestLog.writeln();
-        requestLog.writeln("Body fields:");
+        requestLog.writeln('Body fields:');
         request.fields.forEach(
             (name, value) => requestLog.writeln(_logField(name, value)));
 
@@ -135,7 +135,7 @@
       } else if (request is http.Request) {
         if (contentType.value == 'application/x-www-form-urlencoded') {
           requestLog.writeln();
-          requestLog.writeln("Body fields:");
+          requestLog.writeln('Body fields:');
           request.bodyFields.forEach(
               (name, value) => requestLog.writeln(_logField(name, value)));
         } else if (contentType.value == 'text/plain' ||
@@ -156,9 +156,9 @@
     var responseLog = StringBuffer();
     var request = response.request;
     var stopwatch = _requestStopwatches.remove(request)..stop();
-    responseLog.writeln("HTTP response ${response.statusCode} "
-        "${response.reasonPhrase} for ${request.method} ${request.url}");
-    responseLog.writeln("took ${stopwatch.elapsed}");
+    responseLog.writeln('HTTP response ${response.statusCode} '
+        '${response.reasonPhrase} for ${request.method} ${request.url}');
+    responseLog.writeln('took ${stopwatch.elapsed}');
     response.headers
         .forEach((name, value) => responseLog.writeln(_logField(name, value)));
 
@@ -169,9 +169,9 @@
   /// [name] and [value].
   String _logField(String name, String value) {
     if (_censoredFields.contains(name.toLowerCase())) {
-      return "$name: <censored>";
+      return '$name: <censored>';
     } else {
-      return "$name: $value";
+      return '$name: $value';
     }
   }
 }
@@ -190,6 +190,7 @@
 
   _ThrowingClient(this._inner);
 
+  @override
   Future<http.StreamedResponse> send(http.BaseRequest request) async {
     final streamedResponse = await _inner.send(request);
 
@@ -203,16 +204,16 @@
     }
 
     if (status == 406 && request.headers['Accept'] == pubApiHeaders['Accept']) {
-      fail("Pub ${sdk.version} is incompatible with the current version of "
-          "${request.url.host}.\n"
-          "Upgrade pub to the latest version and try again.");
+      fail('Pub ${sdk.version} is incompatible with the current version of '
+          '${request.url.host}.\n'
+          'Upgrade pub to the latest version and try again.');
     }
 
     if (status == 500 &&
-        (request.url.host == "pub.dartlang.org" ||
-            request.url.host == "storage.googleapis.com")) {
-      fail("HTTP error 500: Internal Server Error at ${request.url}.\n"
-          "This is likely a transient error. Please try again later.");
+        (request.url.host == 'pub.dartlang.org' ||
+            request.url.host == 'storage.googleapis.com')) {
+      fail('HTTP error 500: Internal Server Error at ${request.url}.\n'
+          'This is likely a transient error. Please try again later.');
     }
 
     throw PubHttpException(await http.Response.fromStream(streamedResponse));
@@ -230,7 +231,7 @@
           if (error is! IOException) return false;
 
           var chain = Chain.forTrace(stackTrace);
-          log.io("HTTP error:\n$error\n\n${chain.terse}");
+          log.io('HTTP error:\n$error\n\n${chain.terse}');
           return true;
         },
         delay: (retryCount) {
@@ -249,13 +250,13 @@
           }
         },
         onRetry: (request, response, retryCount) {
-          log.io("Retry #${retryCount + 1} for "
-              "${request.method} ${request.url}...");
+          log.io('Retry #${retryCount + 1} for '
+              '${request.method} ${request.url}...');
           if (retryCount != 3) return;
           if (!_retriedHosts.add(request.url.host)) return;
           log.message(
-              "It looks like ${request.url.host} is having some trouble.\n"
-              "Pub will wait for a while before trying to connect again.");
+              'It looks like ${request.url.host} is having some trouble.\n'
+              'Pub will wait for a while before trying to connect again.');
         })));
 
 /// The underlying HTTP client wrapped by [httpClient].
@@ -267,7 +268,8 @@
 /// the package being requested.
 ///
 /// If [type] is [DependencyType.none], no extra metadata is added.
-Future<T> withDependencyType<T>(DependencyType type, Future<T> callback()) {
+Future<T> withDependencyType<T>(
+    DependencyType type, Future<T> Function() callback) {
   if (type == DependencyType.none) return callback();
   return runZoned(callback, zoneValues: {#_dependencyType: type});
 }
@@ -327,6 +329,7 @@
 
   const PubHttpException(this.response);
 
+  @override
   String toString() => 'HTTP error ${response.statusCode}: '
       '${response.reasonPhrase}';
 }
diff --git a/lib/src/io.dart b/lib/src/io.dart
index d9d7eee..edf1e2a 100644
--- a/lib/src/io.dart
+++ b/lib/src/io.dart
@@ -9,10 +9,11 @@
 import 'dart:io';
 
 import 'package:async/async.dart';
-import 'package:path/path.dart' as path;
-import 'package:pool/pool.dart';
 import 'package:http/http.dart' show ByteStream;
 import 'package:http_multi_server/http_multi_server.dart';
+import 'package:path/path.dart' as path;
+import 'package:pedantic/pedantic.dart';
+import 'package:pool/pool.dart';
 import 'package:stack_trace/stack_trace.dart';
 
 import 'error_group.dart';
@@ -152,9 +153,9 @@
 
 /// Reads the contents of the binary file [file].
 List<int> readBinaryFile(String file) {
-  log.io("Reading binary file $file.");
+  log.io('Reading binary file $file.');
   var contents = File(file).readAsBytesSync();
-  log.io("Read ${contents.length} bytes from $file.");
+  log.io('Read ${contents.length} bytes from $file.');
   return contents;
 }
 
@@ -167,9 +168,9 @@
   encoding ??= utf8;
 
   // Sanity check: don't spew a huge file.
-  log.io("Writing ${contents.length} characters to text file $file.");
+  log.io('Writing ${contents.length} characters to text file $file.');
   if (!dontLogContents && contents.length < 1024 * 1024) {
-    log.fine("Contents:\n$contents");
+    log.fine('Contents:\n$contents');
   }
 
   deleteIfLink(file);
@@ -183,12 +184,12 @@
 /// being written.
 Future<String> _createFileFromStream(Stream<List<int>> stream, String file) {
   // TODO(nweiz): remove extra logging when we figure out the windows bot issue.
-  log.io("Creating $file from stream.");
+  log.io('Creating $file from stream.');
 
   return _descriptorPool.withResource(() async {
     deleteIfLink(file);
     await stream.pipe(File(file).openWrite());
-    log.fine("Created $file from stream.");
+    log.fine('Created $file from stream.');
     return file;
   });
 }
@@ -199,7 +200,7 @@
 /// which is never what we want, so this delete the symlink first if necessary.
 void deleteIfLink(String file) {
   if (!linkExists(file)) return;
-  log.io("Deleting symlink at $file.");
+  log.io('Deleting symlink at $file.');
   Link(file).deleteSync();
 }
 
@@ -217,7 +218,7 @@
 /// Returns the path of the created directory.
 String createTempDir(String base, String prefix) {
   var tempDir = Directory(base).createTempSync(prefix);
-  log.io("Created temp directory ${tempDir.path}");
+  log.io('Created temp directory ${tempDir.path}');
   return tempDir.path;
 }
 
@@ -227,7 +228,7 @@
 /// Returns the path of the created directory.
 String _createSystemTempDir() {
   var tempDir = Directory.systemTemp.createTempSync('pub_');
-  log.io("Created temp directory ${tempDir.path}");
+  log.io('Created temp directory ${tempDir.path}');
   return tempDir.resolveSymbolicLinksSync();
 }
 
@@ -291,9 +292,9 @@
               0, pathInDir.length - whitelistedBasename.length);
         }
 
-        if (pathInDir.contains("/.")) return false;
+        if (pathInDir.contains('/.')) return false;
         if (!Platform.isWindows) return true;
-        return !pathInDir.contains("\\.");
+        return !pathInDir.contains('\\.');
       })
       .map((entity) => entity.path)
       .toList();
@@ -312,7 +313,7 @@
 /// when we try to delete or move something while it's being scanned. To
 /// mitigate that, on Windows, this will retry the operation a few times if it
 /// fails.
-void _attempt(String description, void operation()) {
+void _attempt(String description, void Function() operation) {
   if (!Platform.isWindows) {
     operation();
     return;
@@ -320,15 +321,15 @@
 
   String getErrorReason(FileSystemException error) {
     if (error.osError.errorCode == 5) {
-      return "access was denied";
+      return 'access was denied';
     }
 
     if (error.osError.errorCode == 32) {
-      return "it was in use by another process";
+      return 'it was in use by another process';
     }
 
     if (error.osError.errorCode == 145) {
-      return "of dart-lang/sdk#25353";
+      return 'of dart-lang/sdk#25353';
     }
 
     return null;
@@ -342,8 +343,8 @@
       var reason = getErrorReason(error);
       if (reason == null) rethrow;
 
-      log.io("Failed to $description because $reason. "
-          "Retrying in 50ms.");
+      log.io('Failed to $description because $reason. '
+          'Retrying in 50ms.');
       sleep(Duration(milliseconds: 50));
     }
   }
@@ -354,9 +355,9 @@
     var reason = getErrorReason(error);
     if (reason == null) rethrow;
 
-    fail("Failed to $description because $reason.\n"
-        "This may be caused by a virus scanner or having a file\n"
-        "in the directory open in another application.");
+    fail('Failed to $description because $reason.\n'
+        'This may be caused by a virus scanner or having a file\n'
+        'in the directory open in another application.');
   }
 }
 
@@ -364,15 +365,15 @@
 ///
 /// If it's a directory, it will be deleted recursively.
 void deleteEntry(String path) {
-  _attempt("delete entry", () {
+  _attempt('delete entry', () {
     if (linkExists(path)) {
-      log.io("Deleting link $path.");
+      log.io('Deleting link $path.');
       Link(path).deleteSync();
     } else if (dirExists(path)) {
-      log.io("Deleting directory $path.");
+      log.io('Deleting directory $path.');
       Directory(path).deleteSync(recursive: true);
     } else if (fileExists(path)) {
-      log.io("Deleting file $path.");
+      log.io('Deleting file $path.');
       File(path).deleteSync();
     }
   });
@@ -384,8 +385,8 @@
   try {
     deleteEntry(path);
   } catch (error, stackTrace) {
-    log.fine("Failed to delete $path: $error\n"
-        "${Chain.forTrace(stackTrace)}");
+    log.fine('Failed to delete $path: $error\n'
+        '${Chain.forTrace(stackTrace)}');
   }
 }
 
@@ -400,8 +401,8 @@
 
 /// Renames (i.e. moves) the directory [from] to [to].
 void renameDir(String from, String to) {
-  _attempt("rename directory", () {
-    log.io("Renaming directory $from to $to.");
+  _attempt('rename directory', () {
+    log.io('Renaming directory $from to $to.');
     try {
       Directory(from).renameSync(to);
     } on IOException {
@@ -437,7 +438,7 @@
     }
   }
 
-  log.fine("Creating $symlink pointing to $target");
+  log.fine('Creating $symlink pointing to $target');
   Link(symlink).createSync(target);
 }
 
@@ -487,11 +488,11 @@
 
 /// A regular expression to match the script path of a pub script running from
 /// source in the Dart repo.
-final _dartRepoRegExp = RegExp(r"/third_party/pkg/pub/("
-    r"bin/pub\.dart"
-    r"|"
-    r"test/.*_test\.dart"
-    r")$");
+final _dartRepoRegExp = RegExp(r'/third_party/pkg/pub/('
+    r'bin/pub\.dart'
+    r'|'
+    r'test/.*_test\.dart'
+    r')$');
 
 /// Whether pub is running from source in the Dart repo.
 ///
@@ -502,7 +503,7 @@
     // When running from the test runner, we can't find our location via
     // Platform.script since the runner munges that. However, it guarantees that
     // the working directory is <repo>/third_party/pkg/pub.
-    return path.current.contains(RegExp(r"[/\\]third_party[/\\]pkg[/\\]pub$"));
+    return path.current.contains(RegExp(r'[/\\]third_party[/\\]pkg[/\\]pub$'));
   } else {
     return Platform.script.path.contains(_dartRepoRegExp);
   }
@@ -535,7 +536,7 @@
   if (runningAsTest) {
     // Running from "test/../some_test.dart".
     var components = path.split(script);
-    var testIndex = components.indexOf("test");
+    var testIndex = components.indexOf('test');
     if (testIndex == -1) throw StateError("Can't find pub's root.");
     return path.joinAll(components.take(testIndex));
   }
@@ -550,7 +551,7 @@
 /// in the Dart repo.
 final String dartRepoRoot = (() {
   if (!runningFromDartRepo) {
-    throw StateError("Not running from source in the Dart repo.");
+    throw StateError('Not running from source in the Dart repo.');
   }
 
   if (_runningAsTestRunner) {
@@ -580,11 +581,11 @@
 Future<bool> confirm(String message) {
   log.fine('Showing confirm message: $message');
   if (runningFromTest) {
-    log.message("$message (y/n)?");
+    log.message('$message (y/n)?');
   } else {
-    stdout.write(log.format("$message (y/n)? "));
+    stdout.write(log.format('$message (y/n)? '));
   }
-  return streamFirst(_stdinLines).then(RegExp(r"^[yY]").hasMatch);
+  return streamFirst(_stdinLines).then(RegExp(r'^[yY]').hasMatch);
 }
 
 /// Flushes the stdout and stderr streams, then exits the program with the given
@@ -676,7 +677,7 @@
         runInShell: runInShell);
 
     var process = _PubProcess(ioProcess);
-    process.exitCode.whenComplete(resource.release);
+    unawaited(process.exitCode.whenComplete(resource.release));
     return process;
   });
 }
@@ -781,7 +782,14 @@
 ///
 /// [fn] should have the same signature as [Process.start], except that the
 /// returned value may have any return type.
-_doProcess(Function fn, String executable, List<String> args,
+T _doProcess<T>(
+    T Function(String, List<String>,
+            {String workingDirectory,
+            Map<String, String> environment,
+            bool runInShell})
+        fn,
+    String executable,
+    List<String> args,
     {String workingDir,
     Map<String, String> environment,
     bool runInShell = false}) {
@@ -790,11 +798,11 @@
   // system path. So, if executable looks like it needs that (i.e. it doesn't
   // have any path separators in it), then spawn it through a shell.
   if (Platform.isWindows && !executable.contains('\\')) {
-    args = ["/c", executable, ...args];
-    executable = "cmd";
+    args = ['/c', executable, ...args];
+    executable = 'cmd';
   }
 
-  log.process(executable, args, workingDir == null ? '.' : workingDir);
+  log.process(executable, args, workingDir ?? '.');
 
   return fn(executable, args,
       workingDirectory: workingDir,
@@ -813,7 +821,7 @@
 ///
 /// Returns a future that completes to the value that the future returned from
 /// [fn] completes to.
-Future<T> withTempDir<T>(FutureOr<T> fn(String path)) async {
+Future<T> withTempDir<T>(FutureOr<T> Function(String path) fn) async {
   var tempDir = _createSystemTempDir();
   try {
     return await fn(tempDir);
@@ -836,37 +844,39 @@
 
 /// Extracts a `.tar.gz` file from [stream] to [destination].
 Future extractTarGz(Stream<List<int>> stream, String destination) async {
-  log.fine("Extracting .tar.gz stream to $destination.");
+  log.fine('Extracting .tar.gz stream to $destination.');
   if (Platform.isWindows) {
     return await _extractTarGzWindows(stream, destination);
   }
 
   var args = [
-    if (_noUnknownKeyword) "--warning=no-unknown-keyword",
-    "--extract",
-    "--gunzip",
-    "--no-same-owner",
-    "--no-same-permissions",
-    "--directory",
+    if (_noUnknownKeyword) '--warning=no-unknown-keyword',
+    '--extract',
+    '--gunzip',
+    '--no-same-owner',
+    '--no-same-permissions',
+    '--directory',
     destination
   ];
 
-  var process = await _startProcess("tar", args);
+  var process = await _startProcess('tar', args);
 
   // Ignore errors on process.std{out,err}. They'll be passed to
   // process.exitCode, and we don't want them being top-levelled by
   // std{out,err}Sink.
-  _store(process.stdout.handleError((_) {}), stdout, closeSink: false);
-  _store(process.stderr.handleError((_) {}), stderr, closeSink: false);
+  unawaited(
+      _store(process.stdout.handleError((_) {}), stdout, closeSink: false));
+  unawaited(
+      _store(process.stderr.handleError((_) {}), stderr, closeSink: false));
   var results =
       await Future.wait([_store(stream, process.stdin), process.exitCode]);
 
   var exitCode = results[1];
   if (exitCode != exit_codes.SUCCESS) {
-    throw Exception("Failed to extract .tar.gz stream to $destination "
-        "(exit code $exitCode).");
+    throw Exception('Failed to extract .tar.gz stream to $destination '
+        '(exit code $exitCode).');
   }
-  log.fine("Extracted .tar.gz stream to $destination. Exit code $exitCode.");
+  log.fine('Extracted .tar.gz stream to $destination. Exit code $exitCode.');
 }
 
 /// Whether to include "--warning=no-unknown-keyword" when invoking tar.
@@ -878,14 +888,14 @@
 final bool _noUnknownKeyword = _computeNoUnknownKeyword();
 bool _computeNoUnknownKeyword() {
   if (!Platform.isLinux) return false;
-  var result = Process.runSync("tar", ["--version"]);
+  var result = Process.runSync('tar', ['--version']);
   if (result.exitCode != 0) {
     throw ApplicationException(
-        "Failed to run tar (exit code ${result.exitCode}):\n${result.stderr}");
+        'Failed to run tar (exit code ${result.exitCode}):\n${result.stderr}');
   }
 
   var match =
-      RegExp(r"^tar \(GNU tar\) (\d+).(\d+)\n").firstMatch(result.stdout);
+      RegExp(r'^tar \(GNU tar\) (\d+).(\d+)\n').firstMatch(result.stdout);
   if (match == null) return false;
 
   var major = int.parse(match[1]);
@@ -971,10 +981,10 @@
       var args = [
         // ustar is the most recent tar format that's compatible across all
         // OSes.
-        "--format=ustar",
-        "--create",
-        "--gzip",
-        "--directory",
+        '--format=ustar',
+        '--create',
+        '--gzip',
+        '--directory',
         baseDir
       ];
 
@@ -983,15 +993,15 @@
         // GNU tar flags.
         // https://www.gnu.org/software/tar/manual/html_section/tar_33.html
 
-        args.addAll(["--files-from", "/dev/stdin"]);
-        stdin = contents.join("\n");
+        args.addAll(['--files-from', '/dev/stdin']);
+        stdin = contents.join('\n');
 
         /// Travis's version of tar apparently doesn't support passing unknown
         /// values to the --owner and --group flags for some reason.
         if (!isTravis) {
           // The ustar format doesn't support large UIDs. We don't care about
           // preserving ownership anyway, so we just set them to "pub".
-          args.addAll(["--owner=pub", "--group=pub"]);
+          args.addAll(['--owner=pub', '--group=pub']);
         }
       } else {
         // OSX can take inputs in mtree format since at least OSX 10.9 (bsdtar
@@ -999,18 +1009,18 @@
         // flags for those.
         //
         // https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/tar.1.html
-        args.add("@/dev/stdin");
+        args.add('@/dev/stdin');
 
         // The ustar format doesn't support large UIDs. We don't care about
         // preserving ownership anyway, so we just set them to "pub".
         // TODO(rnystrom): This assumes contents does not contain any
         // directories.
-        var mtreeHeader = "#mtree\n/set uname=pub gname=pub type=file\n";
+        var mtreeHeader = '#mtree\n/set uname=pub gname=pub type=file\n';
 
         // We need a newline at the end, otherwise the last file would get
         // ignored.
         stdin =
-            mtreeHeader + contents.join("\n").replaceAll(' ', r'\040') + "\n";
+            mtreeHeader + contents.join('\n').replaceAll(' ', r'\040') + '\n';
       }
 
       // Setting the working directory should be unnecessary since we pass an
@@ -1018,7 +1028,7 @@
       // input file, relative paths in the mtree file are interpreted as
       // relative to the current working directory, not the "--directory"
       // argument.
-      var process = await _startProcess("tar", args, workingDir: baseDir);
+      var process = await _startProcess('tar', args, workingDir: baseDir);
       process.stdin.add(utf8.encode(stdin));
       process.stdin.close();
       return process.stdout;
@@ -1030,12 +1040,12 @@
 
     try {
       // Create the file containing the list of files to compress.
-      var contentsPath = path.join(tempDir, "files.txt");
-      writeTextFile(contentsPath, contents.join("\n"));
+      var contentsPath = path.join(tempDir, 'files.txt');
+      writeTextFile(contentsPath, contents.join('\n'));
 
       // Create the tar file.
-      var tarFile = path.join(tempDir, "intermediate.tar");
-      var args = ["a", "-w$baseDir", tarFile, "@$contentsPath"];
+      var tarFile = path.join(tempDir, 'intermediate.tar');
+      var args = ['a', '-w$baseDir', tarFile, '@$contentsPath'];
 
       // We're passing 'baseDir' both as '-w' and setting it as the working
       // directory explicitly here intentionally. The former ensures that the
@@ -1046,7 +1056,7 @@
 
       // GZIP it. 7zip doesn't support doing both as a single operation.
       // Send the output to stdout.
-      args = ["a", "unused", "-tgzip", "-so", tarFile];
+      args = ['a', 'unused', '-tgzip', '-so', tarFile];
       return (await _startProcess(_pathTo7zip, args))
           .stdout
           .transform(onDoneTransformer(() => deleteEntry(tempDir)));
@@ -1070,7 +1080,7 @@
   // TODO(rnystrom): Remove this and change to returning one string.
   static List<String> _toLines(String output) {
     var lines = splitLines(output);
-    if (lines.isNotEmpty && lines.last == "") lines.removeLast();
+    if (lines.isNotEmpty && lines.last == '') lines.removeLast();
     return lines;
   }
 
diff --git a/lib/src/isolate.dart b/lib/src/isolate.dart
index 6e96fe6..ed30f48 100644
--- a/lib/src/isolate.dart
+++ b/lib/src/isolate.dart
@@ -30,7 +30,7 @@
       onExit: exitPort.sendPort);
 
   errorPort.listen((list) {
-    stderr.writeln("Unhandled exception:");
+    stderr.writeln('Unhandled exception:');
     stderr.writeln(list[0]);
     stderr.write(list[1]);
     exitCode = 255;
diff --git a/lib/src/lock_file.dart b/lib/src/lock_file.dart
index 6338d75..5da71a2 100644
--- a/lib/src/lock_file.dart
+++ b/lib/src/lock_file.dart
@@ -56,7 +56,7 @@
       : this._(
             Map.fromIterable(ids.where((id) => !id.isRoot),
                 key: (id) => id.name),
-            sdkConstraints ?? {"dart": VersionConstraint.any},
+            sdkConstraints ?? {'dart': VersionConstraint.any},
             mainDependencies ?? const UnmodifiableSetView.empty(),
             devDependencies ?? const UnmodifiableSetView.empty(),
             overriddenDependencies ?? const UnmodifiableSetView.empty());
@@ -71,7 +71,7 @@
 
   LockFile.empty()
       : packages = const {},
-        sdkConstraints = {"dart": VersionConstraint.any},
+        sdkConstraints = {'dart': VersionConstraint.any},
         _mainDependencies = const UnmodifiableSetView.empty(),
         _devDependencies = const UnmodifiableSetView.empty(),
         _overriddenDependencies = const UnmodifiableSetView.empty();
@@ -107,7 +107,7 @@
       // Lockfiles produced by pub versions from 1.14.0 through 1.18.0 included
       // a top-level "sdk" field which encoded the unified constraint on the
       // Dart SDK. They had no way of specifying constraints on other SDKs.
-      sdkConstraints["dart"] = _parseVersionConstraint(sdkNode);
+      sdkConstraints['dart'] = _parseVersionConstraint(sdkNode);
     } else if (parsedMap.containsKey('sdks')) {
       var sdksField = parsedMap['sdks'];
       _validate(sdksField is Map, 'The "sdks" field must be a mapping.',
@@ -185,7 +185,8 @@
   /// [description] should be a noun phrase that describes whatever's being
   /// parsed or processed by [fn]. [span] should be the location of whatever's
   /// being processed within the pubspec.
-  static _wrapFormatException(String description, SourceSpan span, fn()) {
+  static T _wrapFormatException<T>(
+      String description, SourceSpan span, T Function() fn) {
     try {
       return fn();
     } on FormatException catch (e) {
@@ -217,16 +218,16 @@
   /// If [entrypoint] is passed, a relative entry is added for its "lib/"
   /// directory.
   String packagesFile(SystemCache cache, [String entrypoint]) {
-    var header = "Generated by pub on ${DateTime.now()}.";
+    var header = 'Generated by pub on ${DateTime.now()}.';
 
     var map =
         Map<String, Uri>.fromIterable(ordered(packages.keys), value: (name) {
       var id = packages[name];
       var source = cache.source(id.source);
-      return p.toUri(p.join(source.getDirectory(id), "lib"));
+      return p.toUri(p.join(source.getDirectory(id), 'lib'));
     });
 
-    if (entrypoint != null) map[entrypoint] = Uri.parse("lib/");
+    if (entrypoint != null) map[entrypoint] = Uri.parse('lib/');
 
     var text = StringBuffer();
     packages_file.write(text, map, comment: header);
@@ -314,11 +315,11 @@
           value: (_, constraint) => constraint.toString()),
       'packages': packageMap
     };
-    return """
+    return '''
 # Generated by pub
 # See https://dart.dev/tools/pub/glossary#lockfile
 ${yamlToString(data)}
-""";
+''';
   }
 
   /// Returns the dependency classification for [package].
diff --git a/lib/src/log.dart b/lib/src/log.dart
index 6ae4cb5..79a73eb 100644
--- a/lib/src/log.dart
+++ b/lib/src/log.dart
@@ -72,32 +72,33 @@
   /// An error occurred and an operation could not be completed.
   ///
   /// Usually shown to the user on stderr.
-  static const ERROR = Level._("ERR ");
+  static const ERROR = Level._('ERR ');
 
   /// Something unexpected happened, but the program was able to continue,
   /// though possibly in a degraded fashion.
-  static const WARNING = Level._("WARN");
+  static const WARNING = Level._('WARN');
 
   /// A message intended specifically to be shown to the user.
-  static const MESSAGE = Level._("MSG ");
+  static const MESSAGE = Level._('MSG ');
 
   /// Some interaction with the external world occurred, such as a network
   /// operation, process spawning, or file IO.
-  static const IO = Level._("IO  ");
+  static const IO = Level._('IO  ');
 
   /// Incremental output during pub's version constraint solver.
-  static const SOLVER = Level._("SLVR");
+  static const SOLVER = Level._('SLVR');
 
   /// Fine-grained and verbose additional information.
   ///
   /// Used to provide program state context for other logs (such as what pub
   /// was doing when an IO operation occurred) or just more detail for an
   /// operation.
-  static const FINE = Level._("FINE");
+  static const FINE = Level._('FINE');
 
   const Level._(this.name);
   final String name;
 
+  @override
   String toString() => name;
 }
 
@@ -107,7 +108,7 @@
 /// displayed.
 class Verbosity {
   /// Silence all logging.
-  static const NONE = Verbosity._("none", {
+  static const NONE = Verbosity._('none', {
     Level.ERROR: null,
     Level.WARNING: null,
     Level.MESSAGE: null,
@@ -117,7 +118,7 @@
   });
 
   /// Shows only errors.
-  static const ERROR = Verbosity._("error", {
+  static const ERROR = Verbosity._('error', {
     Level.ERROR: _logToStderr,
     Level.WARNING: null,
     Level.MESSAGE: null,
@@ -127,7 +128,7 @@
   });
 
   /// Shows only errors and warnings.
-  static const WARNING = Verbosity._("warning", {
+  static const WARNING = Verbosity._('warning', {
     Level.ERROR: _logToStderr,
     Level.WARNING: _logToStderr,
     Level.MESSAGE: null,
@@ -137,7 +138,7 @@
   });
 
   /// The default verbosity which shows errors, warnings, and messages.
-  static const NORMAL = Verbosity._("normal", {
+  static const NORMAL = Verbosity._('normal', {
     Level.ERROR: _logToStderr,
     Level.WARNING: _logToStderr,
     Level.MESSAGE: _logToStdout,
@@ -147,7 +148,7 @@
   });
 
   /// Shows errors, warnings, messages, and IO event logs.
-  static const IO = Verbosity._("io", {
+  static const IO = Verbosity._('io', {
     Level.ERROR: _logToStderrWithLabel,
     Level.WARNING: _logToStderrWithLabel,
     Level.MESSAGE: _logToStdoutWithLabel,
@@ -157,7 +158,7 @@
   });
 
   /// Shows errors, warnings, messages, and version solver logs.
-  static const SOLVER = Verbosity._("solver", {
+  static const SOLVER = Verbosity._('solver', {
     Level.ERROR: _logToStderr,
     Level.WARNING: _logToStderr,
     Level.MESSAGE: _logToStdout,
@@ -167,7 +168,7 @@
   });
 
   /// Shows all logs.
-  static const ALL = Verbosity._("all", {
+  static const ALL = Verbosity._('all', {
     Level.ERROR: _logToStderrWithLabel,
     Level.WARNING: _logToStderrWithLabel,
     Level.MESSAGE: _logToStdoutWithLabel,
@@ -183,6 +184,7 @@
   /// Returns whether or not logs at [level] will be printed.
   bool isLevelVisible(Level level) => _loggers[level] != null;
 
+  @override
   String toString() => name;
 }
 
@@ -201,7 +203,7 @@
 void error(message, [error, StackTrace trace]) {
   message ??= '';
   if (error != null) {
-    message = message.isEmpty ? "$error" : "$message: $error";
+    message = message.isEmpty ? '$error' : '$message: $error';
     if (error is Error && trace == null) trace = error.stackTrace;
   }
   write(Level.ERROR, message);
@@ -230,7 +232,7 @@
 
   // Discard a trailing newline. This is useful since StringBuffers often end
   // up with an extra newline at the end from using [writeln].
-  if (lines.isNotEmpty && lines.last == "") {
+  if (lines.isNotEmpty && lines.last == '') {
     lines.removeLast();
   }
 
@@ -248,8 +250,8 @@
 String format(String string) {
   if (sparkle) {
     string = string.replaceAllMapped(RegExp(r'.'), (match) {
-      var char = "${choose(_allColors)}${match[0]}$_noColor";
-      return (withPrejudice || random.nextBool()) ? char : "$_bold$char$_none";
+      var char = '${choose(_allColors)}${match[0]}$_noColor';
+      return (withPrejudice || random.nextBool()) ? char : '$_bold$char$_none';
     });
   }
 
@@ -260,7 +262,7 @@
         _capitalizedAnsiEscape, (match) => match[0].toLowerCase());
 
     // Don't use [bold] because it's disabled under [withPrejudice].
-    string = "$_bold$string$_none";
+    string = '$_bold$string$_none';
   }
 
   return string;
@@ -271,20 +273,20 @@
 void process(
     String executable, List<String> arguments, String workingDirectory) {
   io("Spawning \"$executable ${arguments.join(' ')}\" in "
-      "${p.absolute(workingDirectory)}");
+      '${p.absolute(workingDirectory)}');
 }
 
 /// Logs the results of running [executable].
 void processResult(String executable, PubProcessResult result) {
   // Log it all as one message so that it shows up as a single unit in the logs.
   var buffer = StringBuffer();
-  buffer.writeln("Finished $executable. Exit code ${result.exitCode}.");
+  buffer.writeln('Finished $executable. Exit code ${result.exitCode}.');
 
-  dumpOutput(String name, List<String> output) {
+  void dumpOutput(String name, List<String> output) {
     if (output.isEmpty) {
-      buffer.writeln("Nothing output on $name.");
+      buffer.writeln('Nothing output on $name.');
     } else {
-      buffer.writeln("$name:");
+      buffer.writeln('$name:');
       var numLines = 0;
       for (var line in output) {
         if (++numLines > 1000) {
@@ -293,13 +295,13 @@
           break;
         }
 
-        buffer.writeln("| $line");
+        buffer.writeln('| $line');
       }
     }
   }
 
-  dumpOutput("stdout", result.stdout);
-  dumpOutput("stderr", result.stderr);
+  dumpOutput('stdout', result.stdout);
+  dumpOutput('stderr', result.stderr);
 
   io(buffer.toString().trim());
 }
@@ -317,7 +319,7 @@
   } else {
     error(getErrorMessage(exception));
   }
-  fine("Exception type: ${exception.runtimeType}");
+  fine('Exception type: ${exception.runtimeType}');
 
   if (json.enabled) {
     if (exception is UsageException) {
@@ -335,9 +337,9 @@
   }
 
   if (exception is WrappedException && exception.innerError != null) {
-    var message = "Wrapped exception: ${exception.innerError}";
+    var message = 'Wrapped exception: ${exception.innerError}';
     if (exception.innerChain != null) {
-      message = "$message\n${exception.innerChain}";
+      message = '$message\n${exception.innerChain}';
     }
     fine(message);
   }
@@ -369,7 +371,7 @@
 /// [progress]) that cancels the progress animation, although the total time
 /// will still be printed once it finishes. If [fine] is passed, the progress
 /// information will only be visible at [Level.FINE].
-Future<T> progress<T>(String message, Future<T> callback(),
+Future<T> progress<T>(String message, Future<T> Function() callback,
     {bool fine = false}) {
   _stopProgress();
 
@@ -416,7 +418,7 @@
 ///
 /// This is disabled under [withPrejudice] since all text is bold with
 /// prejudice.
-String bold(text) => (withPrejudice || sparkle) ? "$text" : "$_bold$text$_none";
+String bold(text) => (withPrejudice || sparkle) ? '$text' : '$_bold$text$_none';
 
 /// Wraps [text] in the ANSI escape codes to make it gray when on a platform
 /// that supports that.
@@ -426,9 +428,9 @@
 /// The gray marker also enables bold, so it needs to be handled specially with
 /// [withPrejudice] to avoid disabling bolding entirely.
 String gray(text) {
-  if (sparkle) return "$text";
-  if (withPrejudice) return "$_gray$text$_noColor";
-  return "$_gray$text$_none";
+  if (sparkle) return '$text';
+  if (withPrejudice) return '$_gray$text$_noColor';
+  return '$_gray$text$_none';
 }
 
 /// Wraps [text] in the ANSI escape codes to color it cyan when on a platform
@@ -535,23 +537,23 @@
   ///
   /// Always prints to stdout.
   void error(error, [stackTrace]) {
-    var errorJson = {"error": error.toString()};
+    var errorJson = {'error': error.toString()};
 
     if (stackTrace == null && error is Error) stackTrace = error.stackTrace;
     if (stackTrace != null) {
-      errorJson["stackTrace"] = Chain.forTrace(stackTrace).toString();
+      errorJson['stackTrace'] = Chain.forTrace(stackTrace).toString();
     }
 
     // If the error came from a file, include the path.
     if (error is SourceSpanException && error.span.sourceUrl != null) {
       // Normalize paths and make them absolute for backwards compatibility with
       // the protocol used by the analyzer.
-      errorJson["path"] =
+      errorJson['path'] =
           p.normalize(p.absolute(p.fromUri(error.span.sourceUrl)));
     }
 
     if (error is FileException) {
-      errorJson["path"] = p.normalize(p.absolute(error.path));
+      errorJson['path'] = p.normalize(p.absolute(error.path));
     }
 
     message(errorJson);
diff --git a/lib/src/oauth2.dart b/lib/src/oauth2.dart
index 50b7bd5..5dbc737 100644
--- a/lib/src/oauth2.dart
+++ b/lib/src/oauth2.dart
@@ -75,12 +75,12 @@
 void logout(SystemCache cache) {
   var credentialsFile = _credentialsFile(cache);
   if (entryExists(_credentialsFile(cache))) {
-    log.message("Logging out of pub.dartlang.org.");
-    log.message("Deleting $credentialsFile");
+    log.message('Logging out of pub.dartlang.org.');
+    log.message('Deleting $credentialsFile');
     _clearCredentials(cache);
   } else {
     log.message(
-        "No existing credentials file $credentialsFile. Cannot log out.");
+        'No existing credentials file $credentialsFile. Cannot log out.');
   }
 }
 
@@ -90,7 +90,7 @@
 /// This takes care of loading and saving the client's credentials, as well as
 /// prompting the user for their authorization. It will also re-authorize and
 /// re-run [fn] if a recoverable authorization error is detected.
-Future<T> withClient<T>(SystemCache cache, Future<T> fn(Client client)) {
+Future<T> withClient<T>(SystemCache cache, Future<T> Function(Client) fn) {
   return _getClient(cache).then((client) {
     return fn(client).whenComplete(() {
       client.close();
@@ -103,11 +103,11 @@
           "can't be automatically refreshed.");
       return withClient(cache, fn);
     } else if (error is AuthorizationException) {
-      var message = "OAuth2 authorization failed";
+      var message = 'OAuth2 authorization failed';
       if (error.description != null) {
-        message = "$message (${error.description})";
+        message = '$message (${error.description})';
       }
-      log.error("$message.");
+      log.error('$message.');
       _clearCredentials(cache);
       return withClient(cache, fn);
     } else {
diff --git a/lib/src/package.dart b/lib/src/package.dart
index 958f635..b52e9b6 100644
--- a/lib/src/package.dart
+++ b/lib/src/package.dart
@@ -14,8 +14,8 @@
 import 'source_registry.dart';
 import 'utils.dart';
 
-final _readmeRegexp = RegExp(r"^README($|\.)", caseSensitive: false);
-final _changelogRegexp = RegExp(r"^CHANGELOG($|\.)", caseSensitive: false);
+final _readmeRegexp = RegExp(r'^README($|\.)', caseSensitive: false);
+final _changelogRegexp = RegExp(r'^CHANGELOG($|\.)', caseSensitive: false);
 
 /// A named, versioned, unit of code and resource reuse.
 class Package {
@@ -71,7 +71,7 @@
   /// Returns a list of asset ids for all Dart executables in this package's bin
   /// directory.
   List<String> get executablePaths {
-    return ordered(listFiles(beneath: "bin", recursive: false))
+    return ordered(listFiles(beneath: 'bin', recursive: false))
         .where((executable) => p.extension(executable) == '.dart')
         .map((executable) => p.relative(executable, from: dir))
         .toList();
@@ -90,8 +90,8 @@
     if (readmes.isEmpty) return null;
 
     return p.join(dir, readmes.reduce((readme1, readme2) {
-      var extensions1 = ".".allMatches(readme1).length;
-      var extensions2 = ".".allMatches(readme2).length;
+      var extensions1 = '.'.allMatches(readme1).length;
+      var extensions2 = '.'.allMatches(readme2).length;
       var comparison = extensions1.compareTo(extensions2);
       if (comparison == 0) comparison = readme1.compareTo(readme2);
       return (comparison <= 0) ? readme1 : readme2;
@@ -158,7 +158,7 @@
       String part7]) {
     if (dir == null) {
       throw StateError("Package $name is in-memory and doesn't have paths "
-          "on disk.");
+          'on disk.');
     }
     return p.join(dir, part1, part2, part3, part4, part5, part6, part7);
   }
@@ -168,7 +168,7 @@
   String relative(String path) {
     if (dir == null) {
       throw StateError("Package $name is in-memory and doesn't have paths "
-          "on disk.");
+          'on disk.');
     }
     return p.relative(path, from: dir);
   }
@@ -230,7 +230,7 @@
       // to Git. Use [beneath] as the working dir rather than passing it as a
       // parameter so that we list a submodule using its own git logic.
       files = git.runSync(
-          ["ls-files", "--cached", "--others", "--exclude-standard"],
+          ['ls-files', '--cached', '--others', '--exclude-standard'],
           workingDir: beneath);
 
       // If we're not listing recursively, strip out paths that contain
@@ -249,7 +249,7 @@
       files = files.where((file) => file != './').map((file) {
         return Platform.isWindows
             ? "$beneath\\${file.replaceAll("/", "\\")}"
-            : "$beneath/$file";
+            : '$beneath/$file';
       }).expand((file) {
         if (fileExists(file)) return [file];
         if (!dirExists(file)) return [];
@@ -316,23 +316,25 @@
   }
 
   /// Returns a debug string for the package.
+  @override
   String toString() => '$name $version ($dir)';
 }
 
 /// The type of dependency from one package to another.
 class DependencyType {
   /// A dependency declared in `dependencies`.
-  static const direct = DependencyType._("direct");
+  static const direct = DependencyType._('direct');
 
   /// A dependency declared in `dev_dependencies`.
-  static const dev = DependencyType._("dev");
+  static const dev = DependencyType._('dev');
 
   /// No dependency exists.
-  static const none = DependencyType._("none");
+  static const none = DependencyType._('none');
 
   final String _name;
 
   const DependencyType._(this._name);
 
+  @override
   String toString() => _name;
 }
diff --git a/lib/src/package_name.dart b/lib/src/package_name.dart
index 05ce9bf..359bd7e 100644
--- a/lib/src/package_name.dart
+++ b/lib/src/package_name.dart
@@ -72,6 +72,7 @@
         source.descriptionsEqual(description, other.description);
   }
 
+  @override
   int get hashCode {
     if (source == null) return name.hashCode;
     return name.hashCode ^
@@ -82,6 +83,7 @@
   /// Returns a string representation of this package name.
   ///
   /// If [detail] is passed, it controls exactly which details are included.
+  @override
   String toString([PackageDetail detail]);
 }
 
@@ -102,21 +104,23 @@
   /// Creates a reference to a magic package (see [isMagic]).
   PackageRef.magic(String name) : super._magic(name);
 
+  @override
   String toString([PackageDetail detail]) {
     detail ??= PackageDetail.defaults;
     if (isMagic || isRoot) return name;
 
     var buffer = StringBuffer(name);
     if (detail.showSource ?? source is! HostedSource) {
-      buffer.write(" from $source");
+      buffer.write(' from $source');
       if (detail.showDescription) {
-        buffer.write(" ${source.formatDescription(description)}");
+        buffer.write(' ${source.formatDescription(description)}');
       }
     }
 
     return buffer.toString();
   }
 
+  @override
   bool operator ==(other) => other is PackageRef && samePackage(other);
 }
 
@@ -155,25 +159,28 @@
       : version = package.version,
         super._(package.name, null, package.name);
 
+  @override
   int get hashCode => super.hashCode ^ version.hashCode;
 
+  @override
   bool operator ==(other) =>
       other is PackageId && samePackage(other) && other.version == version;
 
   /// Returns a [PackageRange] that allows only [version] of this package.
   PackageRange toRange() => withConstraint(version);
 
+  @override
   String toString([PackageDetail detail]) {
     detail ??= PackageDetail.defaults;
     if (isMagic) return name;
 
     var buffer = StringBuffer(name);
-    if (detail.showVersion ?? !isRoot) buffer.write(" $version");
+    if (detail.showVersion ?? !isRoot) buffer.write(' $version');
 
     if (!isRoot && (detail.showSource ?? source is! HostedSource)) {
-      buffer.write(" from $source");
+      buffer.write(' from $source');
       if (detail.showDescription) {
-        buffer.write(" ${source.formatDescription(description)}");
+        buffer.write(' ${source.formatDescription(description)}');
       }
     }
 
@@ -215,7 +222,7 @@
   /// Returns a description of [features], or the empty string if [features] is
   /// empty.
   String get featureDescription {
-    if (features.isEmpty) return "";
+    if (features.isEmpty) return '';
 
     var enabledFeatures = <String>[];
     var disabledFeatures = <String>[];
@@ -227,36 +234,37 @@
       }
     });
 
-    var description = "";
+    var description = '';
     if (enabledFeatures.isNotEmpty) {
-      description += "with ${toSentence(enabledFeatures)}";
-      if (disabledFeatures.isNotEmpty) description += ", ";
+      description += 'with ${toSentence(enabledFeatures)}';
+      if (disabledFeatures.isNotEmpty) description += ', ';
     }
 
     if (disabledFeatures.isNotEmpty) {
-      description += "without ${toSentence(disabledFeatures)}";
+      description += 'without ${toSentence(disabledFeatures)}';
     }
     return description;
   }
 
+  @override
   String toString([PackageDetail detail]) {
     detail ??= PackageDetail.defaults;
     if (isMagic) return name;
 
     var buffer = StringBuffer(name);
     if (detail.showVersion ?? _showVersionConstraint) {
-      buffer.write(" $constraint");
+      buffer.write(' $constraint');
     }
 
     if (!isRoot && (detail.showSource ?? source is! HostedSource)) {
-      buffer.write(" from $source");
+      buffer.write(' from $source');
       if (detail.showDescription) {
-        buffer.write(" ${source.formatDescription(description)}");
+        buffer.write(' ${source.formatDescription(description)}');
       }
     }
 
     if (detail.showFeatures && features.isNotEmpty) {
-      buffer.write(" $featureDescription");
+      buffer.write(' $featureDescription');
     }
 
     return buffer.toString();
@@ -282,7 +290,7 @@
   /// constraint if possible.
   PackageRange withTerseConstraint() {
     if (constraint is! VersionRange) return this;
-    if (constraint.toString().startsWith("^")) return this;
+    if (constraint.toString().startsWith('^')) return this;
 
     var range = constraint as VersionRange;
     if (!range.includeMin) return this;
@@ -302,9 +310,11 @@
   /// [constraint] allows `id.version`.
   bool allows(PackageId id) => samePackage(id) && constraint.allows(id.version);
 
+  @override
   int get hashCode =>
       super.hashCode ^ constraint.hashCode ^ _featureEquality.hash(features);
 
+  @override
   bool operator ==(other) =>
       other is PackageRange &&
       samePackage(other) &&
@@ -315,15 +325,15 @@
 /// An enum of types of dependencies on a [Feature].
 class FeatureDependency {
   /// The feature must exist and be enabled for this dependency to be satisfied.
-  static const required = FeatureDependency._("required");
+  static const required = FeatureDependency._('required');
 
   /// The feature must be enabled if it exists, but is not required to exist for
   /// this dependency to be satisfied.
-  static const ifAvailable = FeatureDependency._("if available");
+  static const ifAvailable = FeatureDependency._('if available');
 
   /// The feature is neither required to exist nor to be enabled for this
   /// feature to be satisfied.
-  static const unused = FeatureDependency._("unused");
+  static const unused = FeatureDependency._('unused');
 
   final String _name;
 
@@ -332,6 +342,7 @@
 
   const FeatureDependency._(this._name);
 
+  @override
   String toString() => _name;
 }
 
diff --git a/lib/src/progress.dart b/lib/src/progress.dart
index 65fac8a..50f774f 100644
--- a/lib/src/progress.dart
+++ b/lib/src/progress.dart
@@ -22,7 +22,7 @@
   final String _message;
 
   /// Gets the current progress time as a parenthesized, formatted string.
-  String get _time => "(${niceDuration(_stopwatch.elapsed)})";
+  String get _time => '(${niceDuration(_stopwatch.elapsed)})';
 
   /// The length of the most recently-printed [_time] string.
   var _timeLength = 0;
@@ -46,7 +46,7 @@
         log.verbosity.isLevelVisible(log.Level.FINE)) {
       // Not animating, so just log the start and wait until the task is
       // completed.
-      log.write(level, "$_message...");
+      log.write(level, '$_message...');
       return;
     }
 
@@ -54,7 +54,7 @@
       _update();
     });
 
-    stdout.write(log.format("$_message... "));
+    stdout.write(log.format('$_message... '));
   }
 
   /// Stops the progress indicator.
@@ -64,7 +64,7 @@
     // Always log the final time as [log.fine] because for the most part normal
     // users don't care about the precise time information beyond what's shown
     // in the animation.
-    log.fine("$_message finished $_time.");
+    log.fine('$_message finished $_time.');
 
     // If we were animating, print one final update to show the user the final
     // time.
@@ -84,7 +84,7 @@
 
     // Erase the time indicator so that we don't leave a misleading
     // half-complete time indicator on the console.
-    stdout.writeln("\b" * _timeLength);
+    stdout.writeln('\b' * _timeLength);
     _timeLength = 0;
     _timer.cancel();
     _timer = null;
@@ -100,7 +100,7 @@
     // Erase the last time that was printed. Erasing just the time using `\b`
     // rather than using `\r` to erase the entire line ensures that we don't
     // spam progress lines if they're wider than the terminal width.
-    stdout.write("\b" * _timeLength);
+    stdout.write('\b' * _timeLength);
     var time = _time;
     _timeLength = time.length;
     stdout.write(log.gray(time));
diff --git a/lib/src/pubspec.dart b/lib/src/pubspec.dart
index 78e56df..6b78916 100644
--- a/lib/src/pubspec.dart
+++ b/lib/src/pubspec.dart
@@ -26,13 +26,13 @@
 /// compatibility with Google's internal Dart packages, but they may not be used
 /// when publishing a package to pub.dartlang.org.
 final _packageName =
-    RegExp("^${identifierRegExp.pattern}(\\.${identifierRegExp.pattern})*\$");
+    RegExp('^${identifierRegExp.pattern}(\\.${identifierRegExp.pattern})*\$');
 
 /// The default SDK upper bound constraint for packages that don't declare one.
 ///
 /// This provides a sane default for packages that don't have an upper bound.
 final VersionRange _defaultUpperBoundSdkConstraint =
-    VersionConstraint.parse("<2.0.0");
+    VersionConstraint.parse('<2.0.0');
 
 /// Whether or not to allow the pre-release SDK for packages that have an
 /// upper bound Dart SDK constraint of <2.0.0.
@@ -48,7 +48,7 @@
 /// to `true`.
 final String _allowPreReleaseSdkValue = () {
   var value =
-      Platform.environment["PUB_ALLOW_PRERELEASE_SDK"]?.toLowerCase() ?? 'true';
+      Platform.environment['PUB_ALLOW_PRERELEASE_SDK']?.toLowerCase() ?? 'true';
   if (!['true', 'quiet', 'false'].contains(value)) {
     warning(yellow('''
 The environment variable PUB_ALLOW_PRERELEASE_SDK is set as `$value`.
@@ -254,7 +254,7 @@
   /// `sdkConstraints["dart"]`.
   VersionConstraint get originalDartSdkConstraint {
     _ensureEnvironment();
-    return _originalDartSdkConstraint ?? sdkConstraints["dart"];
+    return _originalDartSdkConstraint ?? sdkConstraints['dart'];
   }
 
   VersionConstraint _originalDartSdkConstraint;
@@ -265,13 +265,13 @@
     if (_sdkConstraints != null) return;
 
     var sdkConstraints = _parseEnvironment(fields);
-    var parsedDartSdkConstraint = sdkConstraints["dart"];
+    var parsedDartSdkConstraint = sdkConstraints['dart'];
 
     if (parsedDartSdkConstraint is VersionRange &&
         _shouldEnableCurrentSdk(parsedDartSdkConstraint)) {
       _originalDartSdkConstraint = parsedDartSdkConstraint;
       _dartSdkWasOverridden = true;
-      sdkConstraints["dart"] = VersionRange(
+      sdkConstraints['dart'] = VersionRange(
           min: parsedDartSdkConstraint.min,
           includeMin: parsedDartSdkConstraint.includeMin,
           max: sdk.version,
@@ -316,7 +316,7 @@
     var yaml = parent['environment'];
     if (yaml == null) {
       return {
-        "dart": _includeDefaultSdkConstraint
+        'dart': _includeDefaultSdkConstraint
             ? _defaultUpperBoundSdkConstraint
             : VersionConstraint.any
       };
@@ -328,7 +328,7 @@
     }
 
     var constraints = {
-      "dart": _parseVersionConstraint(yaml.nodes['sdk'],
+      'dart': _parseVersionConstraint(yaml.nodes['sdk'],
           defaultUpperBoundConstraint: _includeDefaultSdkConstraint
               ? _defaultUpperBoundSdkConstraint
               : null)
@@ -336,10 +336,10 @@
     yaml.nodes.forEach((name, constraint) {
       if (name.value is! String) {
         _error('SDK names must be strings.', name.span);
-      } else if (name.value == "dart") {
+      } else if (name.value == 'dart') {
         _error('Use "sdk" to for Dart SDK constraints.', name.span);
       }
-      if (name.value == "sdk") return;
+      if (name.value == 'sdk') return;
 
       constraints[name.value as String] = _parseVersionConstraint(constraint);
     });
@@ -364,11 +364,11 @@
       }
 
       // It must be "none" or a valid URL.
-      if (publishTo != "none") {
+      if (publishTo != 'none') {
         _wrapFormatException('"publish_to" field', span, () {
           var url = Uri.parse(publishTo);
           if (url.scheme.isEmpty) {
-            throw FormatException("must be an absolute URL.");
+            throw FormatException('must be an absolute URL.');
           }
         });
       }
@@ -408,7 +408,7 @@
         _error('"executables" keys must be strings.', key.span);
       }
 
-      final keyPattern = RegExp(r"^[a-zA-Z0-9_-]+$");
+      final keyPattern = RegExp(r'^[a-zA-Z0-9_-]+$');
       if (!keyPattern.hasMatch(key.value)) {
         _error(
             '"executables" keys may only contain letters, '
@@ -422,7 +422,7 @@
         _error('"executables" values must be strings or null.', value.span);
       }
 
-      final valuePattern = RegExp(r"[/\\]");
+      final valuePattern = RegExp(r'[/\\]');
       if (valuePattern.hasMatch(value.value)) {
         _error('"executables" values may not contain path separators.',
             value.span);
@@ -439,7 +439,7 @@
   /// Whether the package is private and cannot be published.
   ///
   /// This is specified in the pubspec by setting "publish_to" to "none".
-  bool get isPrivate => publishTo == "none";
+  bool get isPrivate => publishTo == 'none';
 
   /// Whether or not the pubspec has no contents.
   bool get isEmpty =>
@@ -485,7 +485,7 @@
         _dependencyOverrides = dependencyOverrides == null
             ? null
             : Map.fromIterable(dependencyOverrides, key: (range) => range.name),
-        _sdkConstraints = UnmodifiableMapView({"dart": VersionConstraint.any}),
+        _sdkConstraints = UnmodifiableMapView({'dart': VersionConstraint.any}),
         _includeDefaultSdkConstraint = false,
         fields = fields == null ? YamlMap() : YamlMap.wrap(fields),
         _sources = sources;
@@ -496,7 +496,7 @@
         _version = Version.none,
         _dependencies = {},
         _devDependencies = {},
-        _sdkConstraints = {"dart": VersionConstraint.any},
+        _sdkConstraints = {'dart': VersionConstraint.any},
         _includeDefaultSdkConstraint = false,
         fields = YamlMap();
 
@@ -521,7 +521,7 @@
     throw PubspecException(
         '"name" field doesn\'t match expected name '
         '"$expectedName".',
-        this.fields.nodes["name"].span);
+        this.fields.nodes['name'].span);
   }
 
   /// Parses the pubspec stored at [filePath] whose text is [contents].
@@ -558,7 +558,7 @@
   /// This will return at most one error for each field.
   List<PubspecException> get allErrors {
     var errors = <PubspecException>[];
-    _getError(fn()) {
+    void _collectError(void Function() fn) {
       try {
         fn();
       } on PubspecException catch (e) {
@@ -566,13 +566,13 @@
       }
     }
 
-    _getError(() => name);
-    _getError(() => version);
-    _getError(() => dependencies);
-    _getError(() => devDependencies);
-    _getError(() => publishTo);
-    _getError(() => features);
-    _getError(_ensureEnvironment);
+    _collectError(() => name);
+    _collectError(() => version);
+    _collectError(() => dependencies);
+    _collectError(() => devDependencies);
+    _collectError(() => publishTo);
+    _collectError(() => features);
+    _collectError(_ensureEnvironment);
     return errors;
   }
 
@@ -709,7 +709,7 @@
             return value
                 ? FeatureDependency.required
                 : FeatureDependency.unused;
-          } else if (value is String && value == "if available") {
+          } else if (value is String && value == 'if available') {
             return FeatureDependency.ifAvailable;
           } else {
             _error('Features must be true, false, or "if available".',
@@ -735,7 +735,7 @@
   ///
   /// If [validate] is passed, it's called for each string in [node].
   List<String> _parseStringList(YamlNode node,
-      {void validate(String value, SourceSpan span)}) {
+      {void Function(String value, SourceSpan) validate}) {
     var list = _parseList(node);
     for (var element in list.nodes) {
       var value = element.value;
@@ -764,7 +764,8 @@
   ///
   /// If [targetPackage] is provided, the value is used to describe the
   /// dependency that caused the problem.
-  T _wrapFormatException<T>(String description, SourceSpan span, T fn(),
+  T _wrapFormatException<T>(
+      String description, SourceSpan span, T Function() fn,
       {String targetPackage}) {
     try {
       return fn();
diff --git a/lib/src/sdk.dart b/lib/src/sdk.dart
index 9b44fed..ececa05 100644
--- a/lib/src/sdk.dart
+++ b/lib/src/sdk.dart
@@ -43,13 +43,14 @@
   /// package with the given name.
   String packagePath(String name);
 
+  @override
   String toString() => name;
 }
 
 /// A map from SDK identifiers that appear in pubspecs to the implementations of
 /// those SDKs.
 final sdks = UnmodifiableMapView<String, Sdk>(
-    {"dart": sdk, "flutter": FlutterSdk(), "fuchsia": FuchsiaSdk()});
+    {'dart': sdk, 'flutter': FlutterSdk(), 'fuchsia': FuchsiaSdk()});
 
 /// The core Dart SDK.
 final sdk = DartSdk();
diff --git a/lib/src/sdk/dart.dart b/lib/src/sdk/dart.dart
index e0a9319..2837ca4 100644
--- a/lib/src/sdk/dart.dart
+++ b/lib/src/sdk/dart.dart
@@ -14,9 +14,13 @@
 ///
 /// Unlike other SDKs, this is always available.
 class DartSdk extends Sdk {
-  String get name => "Dart";
+  @override
+  String get name => 'Dart';
+  @override
   bool get isAvailable => true;
+  @override
   String get installMessage => null;
+  @override
   Version get firstPubVersion => Version.none;
 
   /// The path to the root directory of the SDK.
@@ -34,11 +38,12 @@
     return aboveExecutable;
   }();
 
+  @override
   final Version version = () {
     // Some of the pub integration tests require an SDK version number, but the
     // tests on the bots are not run from a built SDK so this lets us avoid
     // parsing the missing version file.
-    var sdkVersion = Platform.environment["_PUB_TEST_SDK_VERSION"] ??
+    var sdkVersion = Platform.environment['_PUB_TEST_SDK_VERSION'] ??
         Platform.version.split(' ').first;
 
     return Version.parse(sdkVersion);
@@ -46,5 +51,6 @@
 
   String get rootDirectory => _rootDirectory;
 
+  @override
   String packagePath(String name) => null;
 }
diff --git a/lib/src/sdk/flutter.dart b/lib/src/sdk/flutter.dart
index 30ce584..9ba839c 100644
--- a/lib/src/sdk/flutter.dart
+++ b/lib/src/sdk/flutter.dart
@@ -11,27 +11,33 @@
 import '../sdk.dart';
 
 class FlutterSdk extends Sdk {
-  String get name => "Flutter";
+  @override
+  String get name => 'Flutter';
+  @override
   bool get isAvailable => _isAvailable;
+  @override
   Version get firstPubVersion => Version.parse('1.19.0');
 
   static final bool _isAvailable =
-      Platform.environment.containsKey("FLUTTER_ROOT");
-  static final String _rootDirectory = Platform.environment["FLUTTER_ROOT"];
+      Platform.environment.containsKey('FLUTTER_ROOT');
+  static final String _rootDirectory = Platform.environment['FLUTTER_ROOT'];
 
+  @override
   String get installMessage =>
-      "Flutter users should run `flutter pub get` instead of `pub get`.";
+      'Flutter users should run `flutter pub get` instead of `pub get`.';
 
+  @override
   Version get version {
     if (!_isAvailable) return null;
 
     _version ??=
-        Version.parse(readTextFile(p.join(_rootDirectory, "version")).trim());
+        Version.parse(readTextFile(p.join(_rootDirectory, 'version')).trim());
     return _version;
   }
 
   Version _version;
 
+  @override
   String packagePath(String name) {
     if (!isAvailable) return null;
 
diff --git a/lib/src/sdk/fuchsia.dart b/lib/src/sdk/fuchsia.dart
index 5c52547..5041489 100644
--- a/lib/src/sdk/fuchsia.dart
+++ b/lib/src/sdk/fuchsia.dart
@@ -11,29 +11,35 @@
 import '../sdk.dart';
 
 class FuchsiaSdk extends Sdk {
-  String get name => "Fuchsia";
+  @override
+  String get name => 'Fuchsia';
+  @override
   bool get isAvailable => _isAvailable;
+  @override
   Version get firstPubVersion => Version.parse('2.0.0-dev.51.0');
 
   static final bool _isAvailable =
-      Platform.environment.containsKey("FUCHSIA_DART_SDK_ROOT");
+      Platform.environment.containsKey('FUCHSIA_DART_SDK_ROOT');
   static final String _rootDirectory =
-      Platform.environment["FUCHSIA_DART_SDK_ROOT"];
+      Platform.environment['FUCHSIA_DART_SDK_ROOT'];
 
+  @override
   String get installMessage =>
-      "Please set the FUCHSIA_DART_SDK_ROOT environment variable to point to "
-      "the root of the Fuchsia SDK for Dart.";
+      'Please set the FUCHSIA_DART_SDK_ROOT environment variable to point to '
+      'the root of the Fuchsia SDK for Dart.';
 
+  @override
   Version get version {
     if (!_isAvailable) return null;
 
     _version ??=
-        Version.parse(readTextFile(p.join(_rootDirectory, "version")).trim());
+        Version.parse(readTextFile(p.join(_rootDirectory, 'version')).trim());
     return _version;
   }
 
   Version _version;
 
+  @override
   String packagePath(String name) {
     if (!isAvailable) return null;
 
diff --git a/lib/src/solver/failure.dart b/lib/src/solver/failure.dart
index 7fff5de..3b0e293 100644
--- a/lib/src/solver/failure.dart
+++ b/lib/src/solver/failure.dart
@@ -20,6 +20,7 @@
   /// it will have one term, which will be the root package.
   final Incompatibility incompatibility;
 
+  @override
   String get message => toString();
 
   /// Returns a [PackageNotFoundException] that (transitively) caused this
@@ -41,6 +42,7 @@
 
   /// Describes how [incompatibility] was derived, and thus why version solving
   /// failed.
+  @override
   String toString() => _Writer(incompatibility).write();
 }
 
@@ -120,20 +122,20 @@
       if (!sdkConstraintCauses.contains(sdk)) continue;
       if (!sdk.isAvailable) continue;
       wroteLine = true;
-      buffer.writeln("The current ${sdk.name} SDK version is ${sdk.version}.");
+      buffer.writeln('The current ${sdk.name} SDK version is ${sdk.version}.');
     }
     if (wroteLine) buffer.writeln();
 
     if (_root.cause is ConflictCause) {
       _visit(_root, const {});
     } else {
-      _write(_root, "Because $_root, version solving failed.");
+      _write(_root, 'Because $_root, version solving failed.');
     }
 
     // Only add line numbers if the derivation actually needs to refer to a line
     // by number.
     var padding =
-        _lineNumbers.isEmpty ? 0 : "(${_lineNumbers.values.last}) ".length;
+        _lineNumbers.isEmpty ? 0 : '(${_lineNumbers.values.last}) '.length;
 
     var lastWasEmpty = false;
     for (var line in _lines) {
@@ -148,12 +150,12 @@
 
       var number = line.last;
       if (number != null) {
-        message = "($number)".padRight(padding) + message;
+        message = '($number)'.padRight(padding) + message;
       } else {
-        message = " " * padding + message;
+        message = ' ' * padding + message;
       }
 
-      buffer.writeln(wordWrap(message, prefix: " " * (padding + 2)));
+      buffer.writeln(wordWrap(message, prefix: ' ' * (padding + 2)));
     }
 
     // Iterate through [sdks] to ensure that SDKs versions are printed in a
@@ -213,10 +215,10 @@
       if (conflictLine != null && otherLine != null) {
         _write(
             incompatibility,
-            "Because " +
+            'Because ' +
                 cause.conflict.andToString(
                     cause.other, detailsForCause, conflictLine, otherLine) +
-                ", $incompatibilityString.",
+                ', $incompatibilityString.',
             numbered: numbered);
       } else if (conflictLine != null || otherLine != null) {
         Incompatibility withLine;
@@ -235,8 +237,8 @@
         _visit(withoutLine, detailsForCause);
         _write(
             incompatibility,
-            "$conjunction because ${withLine.toString(detailsForCause)} "
-            "($line), $incompatibilityString.",
+            '$conjunction because ${withLine.toString(detailsForCause)} '
+            '($line), $incompatibilityString.',
             numbered: numbered);
       } else {
         var singleLineConflict = _isSingleLine(cause.conflict.cause);
@@ -246,19 +248,19 @@
           var second = singleLineOther ? cause.other : cause.conflict;
           _visit(first, detailsForCause);
           _visit(second, detailsForCause);
-          _write(incompatibility, "Thus, $incompatibilityString.",
+          _write(incompatibility, 'Thus, $incompatibilityString.',
               numbered: numbered);
         } else {
           _visit(cause.conflict, {}, conclusion: true);
-          _lines.add(Pair("", null));
+          _lines.add(Pair('', null));
 
           _visit(cause.other, detailsForCause);
           _write(
               incompatibility,
-              "$conjunction because "
-              "${cause.conflict.toString(detailsForCause)} "
-              "(${_lineNumbers[cause.conflict]}), "
-              "$incompatibilityString.",
+              '$conjunction because '
+              '${cause.conflict.toString(detailsForCause)} '
+              '(${_lineNumbers[cause.conflict]}), '
+              '$incompatibilityString.',
               numbered: numbered);
         }
       }
@@ -273,9 +275,9 @@
       if (derivedLine != null) {
         _write(
             incompatibility,
-            "Because " +
+            'Because ' +
                 ext.andToString(derived, detailsForCause, null, derivedLine) +
-                ", $incompatibilityString.",
+                ', $incompatibilityString.',
             numbered: numbered);
       } else if (_isCollapsible(derived)) {
         var derivedCause = derived.cause as ConflictCause;
@@ -293,24 +295,24 @@
         _visit(collapsedDerived, detailsForCause);
         _write(
             incompatibility,
-            "$conjunction because "
-            "${collapsedExt.andToString(ext, detailsForCause)}, "
-            "$incompatibilityString.",
+            '$conjunction because '
+            '${collapsedExt.andToString(ext, detailsForCause)}, '
+            '$incompatibilityString.',
             numbered: numbered);
       } else {
         _visit(derived, detailsForCause);
         _write(
             incompatibility,
-            "$conjunction because ${ext.toString(detailsForCause)}, "
-            "$incompatibilityString.",
+            '$conjunction because ${ext.toString(detailsForCause)}, '
+            '$incompatibilityString.',
             numbered: numbered);
       }
     } else {
       _write(
           incompatibility,
-          "Because "
-          "${cause.conflict.andToString(cause.other, detailsForCause)}, "
-          "$incompatibilityString.",
+          'Because '
+          '${cause.conflict.andToString(cause.other, detailsForCause)}, '
+          '$incompatibilityString.',
           numbered: numbered);
     }
   }
diff --git a/lib/src/solver/incompatibility.dart b/lib/src/solver/incompatibility.dart
index a36fb53..c5ec0e2 100644
--- a/lib/src/solver/incompatibility.dart
+++ b/lib/src/solver/incompatibility.dart
@@ -97,6 +97,7 @@
   ///
   /// If [details] is passed, it controls the amount of detail that's written
   /// for packages with the given names.
+  @override
   String toString([Map<String, PackageDetail> details]) {
     if (cause == IncompatibilityCause.dependency) {
       assert(terms.length == 2);
@@ -106,43 +107,43 @@
       assert(depender.isPositive);
       assert(!dependee.isPositive);
 
-      return "${_terse(depender, details, allowEvery: true)} depends on "
-          "${_terse(dependee, details)}";
+      return '${_terse(depender, details, allowEvery: true)} depends on '
+          '${_terse(dependee, details)}';
     } else if (cause == IncompatibilityCause.useLatest) {
       assert(terms.length == 1);
 
       var forbidden = terms.last;
       assert(forbidden.isPositive);
 
-      return "the latest version of ${_terseRef(forbidden, details)} "
-          "(${VersionConstraint.any.difference(forbidden.constraint)}) "
-          "is required";
+      return 'the latest version of ${_terseRef(forbidden, details)} '
+          '(${VersionConstraint.any.difference(forbidden.constraint)}) '
+          'is required';
     } else if (cause is SdkCause) {
       assert(terms.length == 1);
       assert(terms.first.isPositive);
 
       var cause = this.cause as SdkCause;
       var buffer = StringBuffer(
-          "${_terse(terms.first, details, allowEvery: true)} requires ");
+          '${_terse(terms.first, details, allowEvery: true)} requires ');
       if (!cause.sdk.isAvailable) {
-        buffer.write("the ${cause.sdk.name} SDK");
+        buffer.write('the ${cause.sdk.name} SDK');
       } else {
-        if (cause.sdk.name != "Dart") buffer.write(cause.sdk.name + " ");
-        buffer.write("SDK version ${cause.constraint}");
+        if (cause.sdk.name != 'Dart') buffer.write(cause.sdk.name + ' ');
+        buffer.write('SDK version ${cause.constraint}');
       }
       return buffer.toString();
     } else if (cause == IncompatibilityCause.noVersions) {
       assert(terms.length == 1);
       assert(terms.first.isPositive);
-      return "no versions of ${_terseRef(terms.first, details)} "
-          "match ${terms.first.constraint}";
+      return 'no versions of ${_terseRef(terms.first, details)} '
+          'match ${terms.first.constraint}';
     } else if (cause is PackageNotFoundCause) {
       assert(terms.length == 1);
       assert(terms.first.isPositive);
 
       var cause = this.cause as PackageNotFoundCause;
       return "${_terseRef(terms.first, details)} doesn't exist "
-          "(${cause.exception.message})";
+          '(${cause.exception.message})';
     } else if (cause == IncompatibilityCause.unknownSource) {
       assert(terms.length == 1);
       assert(terms.first.isPositive);
@@ -155,18 +156,18 @@
       assert(terms.length == 1);
       assert(!terms.first.isPositive);
       assert(terms.first.package.isRoot);
-      return "${terms.first.package.name} is ${terms.first.constraint}";
+      return '${terms.first.package.name} is ${terms.first.constraint}';
     } else if (isFailure) {
-      return "version solving failed";
+      return 'version solving failed';
     }
 
     if (terms.length == 1) {
       var term = terms.single;
       if (term.constraint.isAny) {
-        return "${_terseRef(term, details)} is "
+        return '${_terseRef(term, details)} is '
             "${term.isPositive ? 'forbidden' : 'required'}";
       } else {
-        return "${_terse(term, details)} is "
+        return '${_terse(term, details)} is '
             "${term.isPositive ? 'forbidden' : 'required'}";
       }
     }
@@ -182,10 +183,10 @@
           var package2 = term2.constraint.isAny
               ? _terseRef(term2, details)
               : _terse(term2, details);
-          return "$package1 is incompatible with $package2";
+          return '$package1 is incompatible with $package2';
         } else {
-          return "either ${_terse(term1, details)} or "
-              "${_terse(term2, details)}";
+          return 'either ${_terse(term1, details)} or '
+              '${_terse(term2, details)}';
         }
       }
     }
@@ -199,7 +200,7 @@
     if (positive.isNotEmpty && negative.isNotEmpty) {
       if (positive.length == 1) {
         var positiveTerm = terms.firstWhere((term) => term.isPositive);
-        return "${_terse(positiveTerm, details, allowEvery: true)} requires "
+        return '${_terse(positiveTerm, details, allowEvery: true)} requires '
             "${negative.join(' or ')}";
       } else {
         return "if ${positive.join(' and ')} then ${negative.join(' or ')}";
@@ -233,9 +234,9 @@
     if (requiresForbidden != null) return requiresForbidden;
 
     var buffer = StringBuffer(toString(details));
-    if (thisLine != null) buffer.write(" $thisLine");
-    buffer.write(" and ${other.toString(details)}");
-    if (otherLine != null) buffer.write(" $thisLine");
+    if (thisLine != null) buffer.write(' $thisLine');
+    buffer.write(' and ${other.toString(details)}');
+    if (otherLine != null) buffer.write(' $thisLine');
     return buffer.toString();
   }
 
@@ -263,14 +264,14 @@
         .join(' or ');
 
     var buffer =
-        StringBuffer(_terse(thisPositive, details, allowEvery: true) + " ");
+        StringBuffer(_terse(thisPositive, details, allowEvery: true) + ' ');
     var isDependency = cause == IncompatibilityCause.dependency &&
         other.cause == IncompatibilityCause.dependency;
-    buffer.write(isDependency ? "depends on" : "requires");
-    buffer.write(" both $thisNegatives");
-    if (thisLine != null) buffer.write(" ($thisLine)");
-    buffer.write(" and $otherNegatives");
-    if (otherLine != null) buffer.write(" ($otherLine)");
+    buffer.write(isDependency ? 'depends on' : 'requires');
+    buffer.write(' both $thisNegatives');
+    if (thisLine != null) buffer.write(' ($thisLine)');
+    buffer.write(' and $otherNegatives');
+    if (otherLine != null) buffer.write(' ($otherLine)');
     return buffer.toString();
   }
 
@@ -322,23 +323,23 @@
     if (priorPositives.length > 1) {
       var priorString =
           priorPositives.map((term) => _terse(term, details)).join(' or ');
-      buffer.write("if $priorString then ");
+      buffer.write('if $priorString then ');
     } else {
       var verb = prior.cause == IncompatibilityCause.dependency
-          ? "depends on"
-          : "requires";
-      buffer.write("${_terse(priorPositives.first, details, allowEvery: true)} "
-          "$verb ");
+          ? 'depends on'
+          : 'requires';
+      buffer.write('${_terse(priorPositives.first, details, allowEvery: true)} '
+          '$verb ');
     }
 
     buffer.write(_terse(priorNegative, details));
-    if (priorLine != null) buffer.write(" ($priorLine)");
-    buffer.write(" which ");
+    if (priorLine != null) buffer.write(' ($priorLine)');
+    buffer.write(' which ');
 
     if (latter.cause == IncompatibilityCause.dependency) {
-      buffer.write("depends on ");
+      buffer.write('depends on ');
     } else {
-      buffer.write("requires ");
+      buffer.write('requires ');
     }
 
     buffer.write(latter.terms
@@ -346,7 +347,7 @@
         .map((term) => _terse(term, details))
         .join(' or '));
 
-    if (latterLine != null) buffer.write(" ($latterLine)");
+    if (latterLine != null) buffer.write(' ($latterLine)');
 
     return buffer.toString();
   }
@@ -385,49 +386,49 @@
     if (positives.length > 1) {
       var priorString =
           positives.map((term) => _terse(term, details)).join(' or ');
-      buffer.write("if $priorString then ");
+      buffer.write('if $priorString then ');
     } else {
       buffer.write(_terse(positives.first, details, allowEvery: true));
       buffer.write(prior.cause == IncompatibilityCause.dependency
-          ? " depends on "
-          : " requires ");
+          ? ' depends on '
+          : ' requires ');
     }
 
     if (latter.cause == IncompatibilityCause.unknownSource) {
       var package = latter.terms.first.package;
-      buffer.write("${package.name} ");
-      if (priorLine != null) buffer.write("($priorLine) ");
+      buffer.write('${package.name} ');
+      if (priorLine != null) buffer.write('($priorLine) ');
       buffer.write('from unknown source "${package.source}"');
-      if (latterLine != null) buffer.write(" ($latterLine)");
+      if (latterLine != null) buffer.write(' ($latterLine)');
       return buffer.toString();
     }
 
-    buffer.write("${_terse(latter.terms.first, details)} ");
-    if (priorLine != null) buffer.write("($priorLine) ");
+    buffer.write('${_terse(latter.terms.first, details)} ');
+    if (priorLine != null) buffer.write('($priorLine) ');
 
     if (latter.cause == IncompatibilityCause.useLatest) {
       var latest =
           VersionConstraint.any.difference(latter.terms.single.constraint);
-      buffer.write("but the latest version ($latest) is required");
+      buffer.write('but the latest version ($latest) is required');
     } else if (latter.cause is SdkCause) {
       var cause = latter.cause as SdkCause;
-      buffer.write("which requires ");
+      buffer.write('which requires ');
       if (!cause.sdk.isAvailable) {
-        buffer.write("the ${cause.sdk.name} SDK");
+        buffer.write('the ${cause.sdk.name} SDK');
       } else {
-        if (cause.sdk.name != "Dart") buffer.write(cause.sdk.name + " ");
-        buffer.write("SDK version ${cause.constraint}");
+        if (cause.sdk.name != 'Dart') buffer.write(cause.sdk.name + ' ');
+        buffer.write('SDK version ${cause.constraint}');
       }
     } else if (latter.cause == IncompatibilityCause.noVersions) {
       buffer.write("which doesn't match any versions");
     } else if (cause is PackageNotFoundCause) {
       buffer.write("which doesn't exist "
-          "(${(cause as PackageNotFoundCause).exception.message})");
+          '(${(cause as PackageNotFoundCause).exception.message})');
     } else {
-      buffer.write("which is forbidden");
+      buffer.write('which is forbidden');
     }
 
-    if (latterLine != null) buffer.write(" ($latterLine)");
+    if (latterLine != null) buffer.write(' ($latterLine)');
 
     return buffer.toString();
   }
@@ -436,7 +437,7 @@
   /// term.
   ///
   /// Otherwise, returns `null`.
-  Term _singleTermWhere(bool filter(Term term)) {
+  Term _singleTermWhere(bool Function(Term) filter) {
     Term found;
     for (var term in terms) {
       if (!filter(term)) continue;
@@ -459,7 +460,7 @@
   String _terse(Term term, Map<String, PackageDetail> details,
       {bool allowEvery = false}) {
     if (allowEvery && term.constraint.isAny) {
-      return "every version of ${_terseRef(term, details)}";
+      return 'every version of ${_terseRef(term, details)}';
     } else {
       return term.package
           .toString(details == null ? null : details[term.package.name]);
diff --git a/lib/src/solver/incompatibility_cause.dart b/lib/src/solver/incompatibility_cause.dart
index 099eda7..86bede5 100644
--- a/lib/src/solver/incompatibility_cause.dart
+++ b/lib/src/solver/incompatibility_cause.dart
@@ -12,21 +12,21 @@
 abstract class IncompatibilityCause {
   /// The incompatibility represents the requirement that the root package
   /// exists.
-  static const IncompatibilityCause root = _Cause("root");
+  static const IncompatibilityCause root = _Cause('root');
 
   /// The incompatibility represents a package's dependency.
-  static const IncompatibilityCause dependency = _Cause("dependency");
+  static const IncompatibilityCause dependency = _Cause('dependency');
 
   /// The incompatibility represents the user's request that we use the latest
   /// version of a given package.
-  static const IncompatibilityCause useLatest = _Cause("use latest");
+  static const IncompatibilityCause useLatest = _Cause('use latest');
 
   /// The incompatibility indicates that the package has no versions that match
   /// the given constraint.
-  static const IncompatibilityCause noVersions = _Cause("no versions");
+  static const IncompatibilityCause noVersions = _Cause('no versions');
 
   /// The incompatibility indicates that the package has an unknown source.
-  static const IncompatibilityCause unknownSource = _Cause("unknown source");
+  static const IncompatibilityCause unknownSource = _Cause('unknown source');
 }
 
 /// The incompatibility was derived from two existing incompatibilities during
@@ -49,6 +49,7 @@
 
   const _Cause(this._name);
 
+  @override
   String toString() => _name;
 }
 
diff --git a/lib/src/solver/package_lister.dart b/lib/src/solver/package_lister.dart
index 20437ed..516f08a 100644
--- a/lib/src/solver/package_lister.dart
+++ b/lib/src/solver/package_lister.dart
@@ -173,7 +173,7 @@
           await withDependencyType(_dependencyType, () => _source.describe(id));
     } on PubspecException catch (error) {
       // The lockfile for the pubspec couldn't be parsed,
-      log.fine("Failed to parse pubspec for $id:\n$error");
+      log.fine('Failed to parse pubspec for $id:\n$error');
       _knownInvalidVersions = _knownInvalidVersions.union(id.version);
       return [
         Incompatibility(
@@ -321,7 +321,7 @@
   ///
   /// Assumes [match] returns true for the pubspec whose version is at [index].
   Future<Pair<int, int>> _findBounds(
-      int start, bool match(Pubspec pubspec)) async {
+      int start, bool Function(Pubspec) match) async {
     var versions = await _versions;
 
     var first = start - 1;
@@ -421,27 +421,35 @@
 class _RootSource extends BoundSource {
   /// An error to throw for unused source methods.
   UnsupportedError get _unsupported =>
-      UnsupportedError("_RootSource is not a full source.");
+      UnsupportedError('_RootSource is not a full source.');
 
   /// The entrypoint package.
   final Package _package;
 
   _RootSource(this._package);
 
+  @override
   Future<List<PackageId>> getVersions(PackageRef ref) {
     assert(ref.isRoot);
     return Future.value([PackageId.root(_package)]);
   }
 
+  @override
   Future<Pubspec> describe(PackageId id) {
     assert(id.isRoot);
     return Future.value(_package.pubspec);
   }
 
+  @override
   Source get source => throw _unsupported;
+  @override
   SystemCache get systemCache => throw _unsupported;
+  @override
   Future<List<PackageId>> doGetVersions(PackageRef ref) => throw _unsupported;
+  @override
   Future<Pubspec> doDescribe(PackageId id) => throw _unsupported;
+  @override
   Future get(PackageId id, String symlink) => throw _unsupported;
+  @override
   String getDirectory(PackageId id) => throw _unsupported;
 }
diff --git a/lib/src/solver/partial_solution.dart b/lib/src/solver/partial_solution.dart
index 2e49762..980a87a 100644
--- a/lib/src/solver/partial_solution.dart
+++ b/lib/src/solver/partial_solution.dart
@@ -154,7 +154,7 @@
       if (assignedTerm.satisfies(term)) return assignment;
     }
 
-    throw StateError("[BUG] $term is not satisfied.");
+    throw StateError('[BUG] $term is not satisfied.');
   }
 
   /// Returns whether [this] satisfies [other].
diff --git a/lib/src/solver/report.dart b/lib/src/solver/report.dart
index 24d4ded..2495bfe 100644
--- a/lib/src/solver/report.dart
+++ b/lib/src/solver/report.dart
@@ -69,23 +69,23 @@
 
     if (dryRun) {
       if (numChanged == 0) {
-        log.message("No dependencies would change.");
+        log.message('No dependencies would change.');
       } else if (numChanged == 1) {
-        log.message("Would change $numChanged dependency.");
+        log.message('Would change $numChanged dependency.');
       } else {
-        log.message("Would change $numChanged dependencies.");
+        log.message('Would change $numChanged dependencies.');
       }
     } else {
       if (numChanged == 0) {
         if (_type == SolveType.GET) {
-          log.message("Got dependencies!");
+          log.message('Got dependencies!');
         } else {
-          log.message("No dependencies changed.");
+          log.message('No dependencies changed.');
         }
       } else if (numChanged == 1) {
-        log.message("Changed $numChanged dependency!");
+        log.message('Changed $numChanged dependency!');
       } else {
-        log.message("Changed $numChanged dependencies!");
+        log.message('Changed $numChanged dependencies!');
       }
     }
   }
@@ -105,7 +105,7 @@
     var removed = _previousLockFile.packages.keys.toSet();
     removed.removeAll(names);
     if (removed.isNotEmpty) {
-      _output.writeln("These packages are no longer being depended on:");
+      _output.writeln('These packages are no longer being depended on:');
       for (var name in ordered(removed)) {
         _reportPackage(name, alwaysShow: true);
       }
@@ -119,7 +119,7 @@
     _output.clear();
 
     if (_root.dependencyOverrides.isNotEmpty) {
-      _output.writeln("Warning: You are using these overridden dependencies:");
+      _output.writeln('Warning: You are using these overridden dependencies:');
 
       for (var name in ordered(_root.dependencyOverrides.keys)) {
         _reportPackage(name, alwaysShow: true, highlightOverride: false);
@@ -138,7 +138,7 @@
       {bool alwaysShow = false, bool highlightOverride = true}) {
     var newId = _dependencies[name];
     var oldId = _previousLockFile.packages[name];
-    var id = newId != null ? newId : oldId;
+    var id = newId ?? oldId;
 
     var isOverridden = _root.dependencyOverrides.containsKey(id.name);
 
@@ -159,25 +159,25 @@
     //     * Any other change between the old and new package.
     String icon;
     if (isOverridden) {
-      icon = log.magenta("! ");
+      icon = log.magenta('! ');
     } else if (newId == null) {
-      icon = log.red("- ");
+      icon = log.red('- ');
       addedOrRemoved = true;
     } else if (oldId == null) {
-      icon = log.green("+ ");
+      icon = log.green('+ ');
       addedOrRemoved = true;
     } else if (!oldId.samePackage(newId)) {
-      icon = log.cyan("* ");
+      icon = log.cyan('* ');
       changed = true;
     } else if (oldId.version < newId.version) {
-      icon = log.green("> ");
+      icon = log.green('> ');
       changed = true;
     } else if (oldId.version > newId.version) {
-      icon = log.cyan("< ");
+      icon = log.cyan('< ');
       changed = true;
     } else {
       // Unchanged.
-      icon = "  ";
+      icon = '  ';
     }
 
     if (_type == SolveType.GET && !(alwaysShow || changed || addedOrRemoved)) {
@@ -186,14 +186,14 @@
 
     _output.write(icon);
     _output.write(log.bold(id.name));
-    _output.write(" ");
+    _output.write(' ');
     _writeId(id);
 
     // If the package was upgraded, show what it was upgraded from.
     if (changed) {
-      _output.write(" (was ");
+      _output.write(' (was ');
       _writeId(oldId);
-      _output.write(")");
+      _output.write(')');
     }
 
     // Highlight overridden packages.
@@ -222,12 +222,12 @@
       // If there are newer stable versions, only show those.
       String message;
       if (newerStable) {
-        message = "(${maxAll(versions, Version.prioritize)} available)";
+        message = '(${maxAll(versions, Version.prioritize)} available)';
       } else if (newerUnstable) {
-        message = "(${maxAll(versions)} available)";
+        message = '(${maxAll(versions)} available)';
       }
 
-      if (message != null) _output.write(" ${log.cyan(message)}");
+      if (message != null) _output.write(' ${log.cyan(message)}');
     }
 
     _output.writeln();
@@ -239,7 +239,7 @@
 
     if (id.source != _sources.defaultSource) {
       var description = id.source.formatDescription(id.description);
-      _output.write(" from ${id.source} $description");
+      _output.write(' from ${id.source} $description');
     }
   }
 }
diff --git a/lib/src/solver/result.dart b/lib/src/solver/result.dart
index 348b77c..94da92e 100644
--- a/lib/src/solver/result.dart
+++ b/lib/src/solver/result.dart
@@ -100,6 +100,7 @@
         .summarize(dryRun: dryRun);
   }
 
+  @override
   String toString() => 'Took $attemptedSolutions tries to resolve to\n'
       '- ${packages.join("\n- ")}';
 }
diff --git a/lib/src/solver/set_relation.dart b/lib/src/solver/set_relation.dart
index 944176e..2d88eb9 100644
--- a/lib/src/solver/set_relation.dart
+++ b/lib/src/solver/set_relation.dart
@@ -6,21 +6,22 @@
 class SetRelation {
   /// The second set contains all elements of the first, as well as possibly
   /// more.
-  static const subset = SetRelation._("subset");
+  static const subset = SetRelation._('subset');
 
   /// Neither set contains any elements of the other.
-  static const disjoint = SetRelation._("disjoint");
+  static const disjoint = SetRelation._('disjoint');
 
   /// The sets have elements in common, but the first is not a superset of the
   /// second.
   ///
   /// This is also used when the first set is a superset of the first, but in
   /// practice we don't need to distinguish that from overlapping sets.
-  static const overlapping = SetRelation._("overlapping");
+  static const overlapping = SetRelation._('overlapping');
 
   final String _name;
 
   const SetRelation._(this._name);
 
+  @override
   String toString() => _name;
 }
diff --git a/lib/src/solver/term.dart b/lib/src/solver/term.dart
index f7fd752..a32a1cc 100644
--- a/lib/src/solver/term.dart
+++ b/lib/src/solver/term.dart
@@ -160,5 +160,6 @@
           ? null
           : Term(package.withConstraint(constraint), isPositive);
 
+  @override
   String toString() => "${isPositive ? '' : 'not '}$package";
 }
diff --git a/lib/src/solver/type.dart b/lib/src/solver/type.dart
index 7949ca1..c899e31 100644
--- a/lib/src/solver/type.dart
+++ b/lib/src/solver/type.dart
@@ -6,19 +6,20 @@
 class SolveType {
   /// As few changes to the lockfile as possible to be consistent with the
   /// pubspec.
-  static const GET = SolveType._("get");
+  static const GET = SolveType._('get');
 
   /// Upgrade all packages or specific packages to the highest versions
   /// possible, regardless of the lockfile.
-  static const UPGRADE = SolveType._("upgrade");
+  static const UPGRADE = SolveType._('upgrade');
 
   /// Downgrade all packages or specific packages to the lowest versions
   /// possible, regardless of the lockfile.
-  static const DOWNGRADE = SolveType._("downgrade");
+  static const DOWNGRADE = SolveType._('downgrade');
 
   final String _name;
 
   const SolveType._(this._name);
 
+  @override
   String toString() => _name;
 }
diff --git a/lib/src/solver/version_solver.dart b/lib/src/solver/version_solver.dart
index 11c36de..675310c 100644
--- a/lib/src/solver/version_solver.dart
+++ b/lib/src/solver/version_solver.dart
@@ -184,7 +184,7 @@
     if (unsatisfied == null) return #conflict;
 
     _log("derived: ${unsatisfied.isPositive ? 'not ' : ''}"
-        "${unsatisfied.package}");
+        '${unsatisfied.package}');
     _solution.derive(
         unsatisfied.package, !unsatisfied.isPositive, incompatibility);
     return unsatisfied.package.name;
@@ -274,10 +274,12 @@
       // true (that is, we know for sure no solution will satisfy the
       // incompatibility) while also approximating the intuitive notion of the
       // "root cause" of the conflict.
-      var newTerms = <Term>[]
-        ..addAll(incompatibility.terms.where((term) => term != mostRecentTerm))
-        ..addAll(mostRecentSatisfier.cause.terms
-            .where((term) => term.package != mostRecentSatisfier.package));
+      var newTerms = <Term>[
+        for (var term in incompatibility.terms)
+          if (term != mostRecentTerm) term,
+        for (var term in mostRecentSatisfier.cause.terms)
+          if (term.package != mostRecentSatisfier.package) term,
+      ];
 
       // The [mostRecentSatisfier] may not satisfy [mostRecentTerm] on its own
       // if there are a collection of constraints on [mostRecentTerm] that
@@ -297,12 +299,12 @@
           newTerms, ConflictCause(incompatibility, mostRecentSatisfier.cause));
       newIncompatibility = true;
 
-      var partially = difference == null ? "" : " partially";
+      var partially = difference == null ? '' : ' partially';
       var bang = log.red('!');
       _log('$bang $mostRecentTerm is$partially satisfied by '
           '$mostRecentSatisfier');
       _log('$bang which is caused by "${mostRecentSatisfier.cause}"');
-      _log("$bang thus: $incompatibility");
+      _log('$bang thus: $incompatibility');
     }
 
     throw SolveFailure(reformatRanges(_packageListers, incompatibility));
@@ -395,7 +397,7 @@
 
     if (!conflict) {
       _solution.decide(version);
-      _log("selecting $version");
+      _log('selecting $version');
     }
 
     return package.name;
@@ -403,7 +405,7 @@
 
   /// Adds [incompatibility] to [_incompatibilities].
   void _addIncompatibility(Incompatibility incompatibility) {
-    _log("fact: $incompatibility");
+    _log('fact: $incompatibility');
 
     for (var term in incompatibility.terms) {
       _incompatibilities
diff --git a/lib/src/source.dart b/lib/src/source.dart
index 6641619..fed9fe4 100644
--- a/lib/src/source.dart
+++ b/lib/src/source.dart
@@ -134,6 +134,7 @@
   int hashDescription(description);
 
   /// Returns the source's name.
+  @override
   String toString() => name;
 }
 
@@ -158,10 +159,10 @@
   /// Sources should not override this. Instead, they implement [doGetVersions].
   Future<List<PackageId>> getVersions(PackageRef ref) {
     if (ref.isRoot) {
-      throw ArgumentError("Cannot get versions for the root package.");
+      throw ArgumentError('Cannot get versions for the root package.');
     }
     if (ref.source != source) {
-      throw ArgumentError("Package $ref does not use source ${source.name}.");
+      throw ArgumentError('Package $ref does not use source ${source.name}.');
     }
 
     return doGetVersions(ref);
@@ -195,9 +196,9 @@
   ///
   /// Sources should not override this. Instead, they implement [doDescribe].
   Future<Pubspec> describe(PackageId id) async {
-    if (id.isRoot) throw ArgumentError("Cannot describe the root package.");
+    if (id.isRoot) throw ArgumentError('Cannot describe the root package.');
     if (id.source != source) {
-      throw ArgumentError("Package $id does not use source ${source.name}.");
+      throw ArgumentError('Package $id does not use source ${source.name}.');
     }
 
     var pubspec = _pubspecs[id];
@@ -207,7 +208,7 @@
     pubspec = await doDescribe(id);
     if (pubspec.version != id.version) {
       throw PackageNotFoundException(
-          "the pubspec for $id has version ${pubspec.version}");
+          'the pubspec for $id has version ${pubspec.version}');
     }
 
     _pubspecs[id] = pubspec;
diff --git a/lib/src/source/cached.dart b/lib/src/source/cached.dart
index 06c6451..1fe99c3 100644
--- a/lib/src/source/cached.dart
+++ b/lib/src/source/cached.dart
@@ -29,9 +29,10 @@
   /// If [id] is already in the system cache, just loads it from there.
   ///
   /// Otherwise, defers to the subclass.
+  @override
   Future<Pubspec> doDescribe(PackageId id) async {
     var packageDir = getDirectory(id);
-    if (fileExists(path.join(packageDir, "pubspec.yaml"))) {
+    if (fileExists(path.join(packageDir, 'pubspec.yaml'))) {
       return Pubspec.load(packageDir, systemCache.sources,
           expectedName: id.name);
     }
@@ -46,6 +47,7 @@
   /// the system cache.
   Future<Pubspec> describeUncached(PackageId id);
 
+  @override
   Future get(PackageId id, String symlink) {
     return downloadToSystemCache(id).then((pkg) {
       createPackageSymlink(id.name, pkg.dir, symlink);
diff --git a/lib/src/source/git.dart b/lib/src/source/git.dart
index 4fe56d4..f85e41f 100644
--- a/lib/src/source/git.dart
+++ b/lib/src/source/git.dart
@@ -21,8 +21,10 @@
 
 /// A package source that gets packages from Git repos.
 class GitSource extends Source {
-  final name = "git";
+  @override
+  final name = 'git';
 
+  @override
   BoundGitSource bind(SystemCache systemCache) =>
       BoundGitSource(this, systemCache);
 
@@ -37,31 +39,32 @@
 
   /// Given a valid git package description, returns the URL of the repository
   /// it pulls from.
-  String urlFromDescription(description) => description["url"];
+  String urlFromDescription(description) => description['url'];
 
+  @override
   PackageRef parseRef(String name, description, {String containingPath}) {
     // TODO(rnystrom): Handle git URLs that are relative file paths (#8570).
     if (description is String) description = {'url': description};
 
     if (description is! Map) {
-      throw FormatException("The description must be a Git URL or a map "
+      throw FormatException('The description must be a Git URL or a map '
           "with a 'url' key.");
     }
 
-    if (description["url"] is! String) {
+    if (description['url'] is! String) {
       throw FormatException("The 'url' field of the description must be a "
-          "string.");
+          'string.');
     }
 
-    _validateUrl(description["url"]);
+    _validateUrl(description['url']);
 
-    var ref = description["ref"];
+    var ref = description['ref'];
     if (ref != null && ref is! String) {
       throw FormatException("The 'ref' field of the description must be a "
-          "string.");
+          'string.');
     }
 
-    var path = description["path"];
+    var path = description['path'];
     if (path != null) {
       if (path is! String) {
         throw FormatException(
@@ -72,42 +75,43 @@
       } else if (!p.url.isWithin('.', path)) {
         throw FormatException(
             "The 'path' field of the description must not reach outside the "
-            "repository.");
+            'repository.');
       }
 
       _validateUrl(path);
     }
 
     return PackageRef(name, this,
-        {"url": description["url"], "ref": ref ?? "HEAD", "path": path ?? "."});
+        {'url': description['url'], 'ref': ref ?? 'HEAD', 'path': path ?? '.'});
   }
 
+  @override
   PackageId parseId(String name, Version version, description,
       {String containingPath}) {
     if (description is! Map) {
       throw FormatException("The description must be a map with a 'url' "
-          "key.");
+          'key.');
     }
 
-    if (description["url"] is! String) {
+    if (description['url'] is! String) {
       throw FormatException("The 'url' field of the description must be a "
-          "string.");
+          'string.');
     }
 
-    _validateUrl(description["url"]);
+    _validateUrl(description['url']);
 
-    var ref = description["ref"];
+    var ref = description['ref'];
     if (ref != null && ref is! String) {
       throw FormatException("The 'ref' field of the description must be a "
-          "string.");
+          'string.');
     }
 
-    if (description["resolved-ref"] is! String) {
+    if (description['resolved-ref'] is! String) {
       throw FormatException("The 'resolved-ref' field of the description "
-          "must be a string.");
+          'must be a string.');
     }
 
-    var path = description["path"];
+    var path = description['path'];
     if (path != null) {
       if (path is! String) {
         throw FormatException(
@@ -121,10 +125,10 @@
     }
 
     return PackageId(name, this, version, {
-      "url": description["url"],
-      "ref": ref ?? "HEAD",
-      "resolved-ref": description["resolved-ref"],
-      "path": path ?? "."
+      'url': description['url'],
+      'ref': ref ?? 'HEAD',
+      'resolved-ref': description['resolved-ref'],
+      'path': path ?? '.'
     });
   }
 
@@ -132,7 +136,7 @@
   void _validateUrl(String url) {
     // If the URL contains an @, it's probably an SSH hostname, which we don't
     // know how to validate.
-    if (url.contains("@")) return;
+    if (url.contains('@')) return;
 
     // Otherwise, we use Dart's URL parser to validate the URL.
     Uri.parse(url);
@@ -142,11 +146,12 @@
   ///
   /// This helps distinguish different git commits with the same pubspec
   /// version.
+  @override
   String formatDescription(description) {
     if (description is Map && description.containsKey('resolved-ref')) {
       var result = "${description['url']} at "
           "${description['resolved-ref'].substring(0, 6)}";
-      if (description["path"] != ".") result += " in ${description["path"]}";
+      if (description['path'] != '.') result += " in ${description["path"]}";
       return result;
     } else {
       return super.formatDescription(description);
@@ -155,6 +160,7 @@
 
   /// Two Git descriptions are equal if both their URLs and their refs are
   /// equal.
+  @override
   bool descriptionsEqual(description1, description2) {
     // TODO(nweiz): Do we really want to throw an error if you have two
     // dependencies on some repo, one of which specifies a ref and one of which
@@ -171,6 +177,7 @@
     return true;
   }
 
+  @override
   int hashDescription(description) {
     // Don't include the resolved ref in the hash code because we ignore it in
     // [descriptionsEqual] if only one description defines it.
@@ -182,8 +189,10 @@
 
 /// The [BoundSource] for [GitSource].
 class BoundGitSource extends CachedSource {
+  @override
   final GitSource source;
 
+  @override
   final SystemCache systemCache;
 
   /// A map from revision cache locations to futures that will complete once
@@ -210,6 +219,7 @@
     });
   }
 
+  @override
   Future<List<PackageId>> doGetVersions(PackageRef ref) async {
     await _ensureRepoCache(ref);
     var path = _repoCachePath(ref);
@@ -229,6 +239,7 @@
 
   /// Since we don't have an easy way to read from a remote Git repo, this
   /// just installs [id] into the system cache, then describes it from there.
+  @override
   Future<Pubspec> describeUncached(PackageId id) => _describeUncached(
       id.toRef(), id.description['resolved-ref'], id.description['path']);
 
@@ -244,18 +255,18 @@
     var pubspecPath = p.normalize(p.join(p.fromUri(path), 'pubspec.yaml'));
 
     // Git doesn't recognize backslashes in paths, even on Windows.
-    if (Platform.isWindows) pubspecPath = pubspecPath.replaceAll("\\", "/");
+    if (Platform.isWindows) pubspecPath = pubspecPath.replaceAll('\\', '/');
 
     List<String> lines;
     try {
       lines = await git
-          .run(["show", "$revision:$pubspecPath"], workingDir: repoPath);
+          .run(['show', '$revision:$pubspecPath'], workingDir: repoPath);
     } on git.GitException catch (_) {
       fail('Could not find a file named "$pubspecPath" in '
           '${ref.description['url']} $revision.');
     }
 
-    return Pubspec.parse(lines.join("\n"), systemCache.sources,
+    return Pubspec.parse(lines.join('\n'), systemCache.sources,
         expectedName: ref.name);
   }
 
@@ -271,11 +282,12 @@
   /// `<package name>-<url hash>`. These are used to check out the repository
   /// itself; each of the commit-specific directories are clones of a directory
   /// in `cache/`.
+  @override
   Future<Package> downloadToSystemCache(PackageId id) async {
     var ref = id.toRef();
     if (!git.isInstalled) {
       fail("Cannot get ${id.name} from Git (${ref.description['url']}).\n"
-          "Please ensure Git is correctly installed.");
+          'Please ensure Git is correctly installed.');
     }
 
     ensureDir(p.join(systemCacheRoot, 'cache'));
@@ -297,9 +309,11 @@
   }
 
   /// Returns the path to the revision-specific cache of [id].
+  @override
   String getDirectory(PackageId id) =>
       p.join(_revisionCachePath(id), id.description['path']);
 
+  @override
   List<Package> getCachedPackages() {
     // TODO(keertip): Implement getCachedPackages().
     throw UnimplementedError(
@@ -308,6 +322,7 @@
 
   /// Resets all cached packages back to the pristine state of the Git
   /// repository at the revision they are pinned to.
+  @override
   Future<Pair<List<PackageId>, List<PackageId>>> repairCachedPackages() async {
     if (!dirExists(systemCacheRoot)) return Pair([], []);
 
@@ -315,7 +330,7 @@
     var failures = <PackageId>[];
 
     var packages = listDir(systemCacheRoot)
-        .where((entry) => dirExists(p.join(entry, ".git")))
+        .where((entry) => dirExists(p.join(entry, '.git')))
         .expand((revisionCachePath) {
           return _readPackageList(revisionCachePath).map((relative) {
             // If we've already failed to load another package from this
@@ -326,7 +341,7 @@
             try {
               return Package.load(null, packageDir, systemCache.sources);
             } catch (error, stackTrace) {
-              log.error("Failed to load package", error, stackTrace);
+              log.error('Failed to load package', error, stackTrace);
               var name = p.basename(revisionCachePath).split('-').first;
               failures.add(PackageId(name, source, Version.none, '???'));
               tryDeleteEntry(revisionCachePath);
@@ -348,21 +363,21 @@
 
       var id = PackageId(package.name, source, package.version, null);
 
-      log.message("Resetting Git repository for "
-          "${log.bold(package.name)} ${package.version}...");
+      log.message('Resetting Git repository for '
+          '${log.bold(package.name)} ${package.version}...');
 
       try {
         // Remove all untracked files.
         await git
-            .run(["clean", "-d", "--force", "-x"], workingDir: package.dir);
+            .run(['clean', '-d', '--force', '-x'], workingDir: package.dir);
 
         // Discard all changes to tracked files.
-        await git.run(["reset", "--hard", "HEAD"], workingDir: package.dir);
+        await git.run(['reset', '--hard', 'HEAD'], workingDir: package.dir);
 
         successes.add(id);
       } on git.GitException catch (error, stackTrace) {
-        log.error("Failed to reset ${log.bold(package.name)} "
-            "${package.version}. Error:\n$error");
+        log.error('Failed to reset ${log.bold(package.name)} '
+            '${package.version}. Error:\n$error');
         log.fine(stackTrace);
         failures.add(id);
 
@@ -431,7 +446,7 @@
   Future _updateRepoCache(PackageRef ref) async {
     var path = _repoCachePath(ref);
     if (_updatedRepos.contains(path)) return Future.value();
-    await git.run(["fetch"], workingDir: path);
+    await git.run(['fetch'], workingDir: path);
     _updatedRepos.add(path);
   }
 
@@ -479,7 +494,7 @@
     // version of pub where pubspecs were only allowed at the root of the
     // repository.
     if (!fileExists(path)) return ['.'];
-    return readTextFile(path).split("\n");
+    return readTextFile(path).split('\n');
   }
 
   /// Writes a package list indicating that [packages] exist in
@@ -498,7 +513,7 @@
   /// This assumes that the canonical clone already exists.
   Future<String> _firstRevision(String path, String reference) async {
     var lines = await git
-        .run(["rev-list", "--max-count=1", reference], workingDir: path);
+        .run(['rev-list', '--max-count=1', reference], workingDir: path);
     return lines.first;
   }
 
@@ -518,10 +533,10 @@
       // Git on Windows does not seem to automatically create the destination
       // directory.
       ensureDir(to);
-      var args = ["clone", from, to];
+      var args = ['clone', from, to];
 
-      if (mirror) args.insert(1, "--mirror");
-      if (shallow) args.insertAll(1, ["--depth", "1"]);
+      if (mirror) args.insert(1, '--mirror');
+      if (shallow) args.insertAll(1, ['--depth', '1']);
 
       return git.run(args);
     }).then((result) => null);
@@ -530,7 +545,7 @@
   /// Checks out the reference [ref] in [repoPath].
   Future _checkOut(String repoPath, String ref) {
     return git
-        .run(["checkout", ref], workingDir: repoPath).then((result) => null);
+        .run(['checkout', ref], workingDir: repoPath).then((result) => null);
   }
 
   String _revisionCachePath(PackageId id) => p.join(
diff --git a/lib/src/source/hosted.dart b/lib/src/source/hosted.dart
index c12628a..e89244d 100644
--- a/lib/src/source/hosted.dart
+++ b/lib/src/source/hosted.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import "dart:convert";
+import 'dart:convert';
 import 'dart:io' as io;
 
 import 'package:http/http.dart' as http;
@@ -26,9 +26,12 @@
 /// A package source that gets packages from a package hosting site that uses
 /// the same API as pub.dartlang.org.
 class HostedSource extends Source {
-  final name = "hosted";
+  @override
+  final name = 'hosted';
+  @override
   final hasMultipleVersions = true;
 
+  @override
   BoundHostedSource bind(SystemCache systemCache, {bool isOffline = false}) =>
       isOffline
           ? _OfflineHostedSource(this, systemCache)
@@ -79,7 +82,7 @@
 
   /// Returns the description for a hosted package named [name] with the
   /// given package server [url].
-  _descriptionFor(String name, [url]) {
+  dynamic _descriptionFor(String name, [url]) {
     if (url == null) return name;
 
     if (url is! String && url is! Uri) {
@@ -89,12 +92,15 @@
     return {'name': name, 'url': url.toString()};
   }
 
+  @override
   String formatDescription(description) =>
-      "on ${_parseDescription(description).last}";
+      'on ${_parseDescription(description).last}';
 
+  @override
   bool descriptionsEqual(description1, description2) =>
       _parseDescription(description1) == _parseDescription(description2);
 
+  @override
   int hashDescription(description) => _parseDescription(description).hashCode;
 
   /// Ensures that [description] is a valid hosted package description.
@@ -102,11 +108,13 @@
   /// There are two valid formats. A plain string refers to a package with the
   /// given name from the default host, while a map with keys "name" and "url"
   /// refers to a package with the given name from the host at the given URL.
+  @override
   PackageRef parseRef(String name, description, {String containingPath}) {
     _parseDescription(description);
     return PackageRef(name, this, description);
   }
 
+  @override
   PackageId parseId(String name, Version version, description,
       {String containingPath}) {
     _parseDescription(description);
@@ -123,37 +131,40 @@
     }
 
     if (description is! Map) {
-      throw FormatException("The description must be a package name or map.");
+      throw FormatException('The description must be a package name or map.');
     }
 
-    if (!description.containsKey("name")) {
+    if (!description.containsKey('name')) {
       throw FormatException("The description map must contain a 'name' key.");
     }
 
-    var name = description["name"];
+    var name = description['name'];
     if (name is! String) {
       throw FormatException("The 'name' key must have a string value.");
     }
 
-    return Pair<String, String>(name, description["url"] ?? defaultUrl);
+    return Pair<String, String>(name, description['url'] ?? defaultUrl);
   }
 }
 
 /// The [BoundSource] for [HostedSource].
 class BoundHostedSource extends CachedSource {
+  @override
   final HostedSource source;
 
+  @override
   final SystemCache systemCache;
 
   BoundHostedSource(this.source, this.systemCache);
 
   /// Downloads a list of all versions of a package that are available from the
   /// site.
+  @override
   Future<List<PackageId>> doGetVersions(PackageRef ref) async {
     var url = _makeUrl(
-        ref.description, (server, package) => "$server/api/packages/$package");
+        ref.description, (server, package) => '$server/api/packages/$package');
 
-    log.io("Get versions from $url.");
+    log.io('Get versions from $url.');
 
     String body;
     try {
@@ -179,7 +190,8 @@
   /// converts that to a Uri given [pattern].
   ///
   /// Ensures the package name is properly URL encoded.
-  Uri _makeUrl(description, String pattern(String server, String package)) {
+  Uri _makeUrl(
+      description, String Function(String server, String package) pattern) {
     var parsed = source._parseDescription(description);
     var server = parsed.last;
     var package = Uri.encodeComponent(parsed.first);
@@ -188,14 +200,15 @@
 
   /// Downloads and parses the pubspec for a specific version of a package that
   /// is available from the site.
+  @override
   Future<Pubspec> describeUncached(PackageId id) async {
     // Request it from the server.
     var url = _makeVersionUrl(
         id,
         (server, package, version) =>
-            "$server/api/packages/$package/versions/$version");
+            '$server/api/packages/$package/versions/$version');
 
-    log.io("Describe package at $url.");
+    log.io('Describe package at $url.');
     Map<String, dynamic> version;
     try {
       version = jsonDecode(await httpClient.read(url, headers: pubApiHeaders));
@@ -209,6 +222,7 @@
   }
 
   /// Downloads the package identified by [id] to the system cache.
+  @override
   Future<Package> downloadToSystemCache(PackageId id) async {
     if (!isInSystemCache(id)) {
       var packageDir = getDirectory(id);
@@ -225,14 +239,16 @@
   ///
   /// Each of these subdirectories then contains a subdirectory for each
   /// package downloaded from that site.
+  @override
   String getDirectory(PackageId id) {
     var parsed = source._parseDescription(id.description);
     var dir = _urlToDirectory(parsed.last);
-    return p.join(systemCacheRoot, dir, "${parsed.first}-${id.version}");
+    return p.join(systemCacheRoot, dir, '${parsed.first}-${id.version}');
   }
 
   /// Re-downloads all packages that have been previously downloaded into the
   /// system cache from any server.
+  @override
   Future<Pair<List<PackageId>, List<PackageId>>> repairCachedPackages() async {
     if (!dirExists(systemCacheRoot)) return Pair([], []);
 
@@ -247,7 +263,7 @@
         try {
           packages.add(Package.load(null, entry, systemCache.sources));
         } catch (error, stackTrace) {
-          log.error("Failed to load package", error, stackTrace);
+          log.error('Failed to load package', error, stackTrace);
           failures.add(_idForBasename(p.basename(entry)));
           tryDeleteEntry(entry);
         }
@@ -263,10 +279,10 @@
           successes.add(id);
         } catch (error, stackTrace) {
           failures.add(id);
-          var message = "Failed to repair ${log.bold(package.name)} "
-              "${package.version}";
-          if (url != source.defaultUrl) message += " from $url";
-          log.error("$message. Error:\n$error");
+          var message = 'Failed to repair ${log.bold(package.name)} '
+              '${package.version}';
+          if (url != source.defaultUrl) message += ' from $url';
+          log.error('$message. Error:\n$error');
           log.fine(stackTrace);
 
           tryDeleteEntry(package.dir);
@@ -294,6 +310,7 @@
 
   /// Gets all of the packages that have been downloaded into the system cache
   /// from the default server.
+  @override
   List<Package> getCachedPackages() {
     var cacheDir = p.join(systemCacheRoot, _urlToDirectory(source.defaultUrl));
     if (!dirExists(cacheDir)) return [];
@@ -303,9 +320,9 @@
           try {
             return Package.load(null, entry, systemCache.sources);
           } catch (error, stackTrace) {
-            log.fine("Failed to load package from $entry:\n"
-                "$error\n"
-                "${Chain.forTrace(stackTrace)}");
+            log.fine('Failed to load package from $entry:\n'
+                '$error\n'
+                '${Chain.forTrace(stackTrace)}');
             return null;
           }
         })
@@ -317,13 +334,13 @@
   /// into [destPath].
   Future _download(
       String server, String package, Version version, String destPath) async {
-    var url = Uri.parse("$server/packages/$package/versions/$version.tar.gz");
-    log.io("Get package from $url.");
+    var url = Uri.parse('$server/packages/$package/versions/$version.tar.gz');
+    log.io('Get package from $url.');
     log.message('Downloading ${log.bold(package)} $version...');
 
     // Download and extract the archive to a temp directory.
     var tempDir = systemCache.createTempDir();
-    var response = await httpClient.send(http.Request("GET", url));
+    var response = await httpClient.send(http.Request('GET', url));
     await extractTarGz(response.stream, tempDir);
 
     // Remove the existing directory if it exists. This will happen if
@@ -345,21 +362,21 @@
     if (error is PubHttpException) {
       if (error.response.statusCode == 404) {
         throw PackageNotFoundException(
-            "could not find package $package at $url",
+            'could not find package $package at $url',
             innerError: error,
             innerTrace: stackTrace);
       }
 
       fail(
-          "${error.response.statusCode} ${error.response.reasonPhrase} trying "
-          "to find package $package at $url.",
+          '${error.response.statusCode} ${error.response.reasonPhrase} trying '
+          'to find package $package at $url.',
           error,
           stackTrace);
     } else if (error is io.SocketException) {
-      fail("Got socket error trying to find package $package at $url.", error,
+      fail('Got socket error trying to find package $package at $url.', error,
           stackTrace);
     } else if (error is io.TlsException) {
-      fail("Got TLS error trying to find package $package at $url.", error,
+      fail('Got TLS error trying to find package $package at $url.', error,
           stackTrace);
     } else {
       // Otherwise re-throw the original exception.
@@ -383,14 +400,14 @@
   String _urlToDirectory(String url) {
     // Normalize all loopback URLs to "localhost".
     url = url.replaceAllMapped(
-        RegExp(r"^(https?://)(127\.0\.0\.1|\[::1\]|localhost)?"), (match) {
+        RegExp(r'^(https?://)(127\.0\.0\.1|\[::1\]|localhost)?'), (match) {
       // Don't include the scheme for HTTPS URLs. This makes the directory names
       // nice for the default and most recommended scheme. We also don't include
       // it for localhost URLs, since they're always known to be HTTP.
       var localhost = match[2] == null ? '' : 'localhost';
       var scheme =
           match[1] == 'https://' || localhost.isNotEmpty ? '' : match[1];
-      return "$scheme$localhost";
+      return '$scheme$localhost';
     });
     return replace(
         url, RegExp(r'[<>:"\\/|?*%]'), (match) => '%${match[0].codeUnitAt(0)}');
@@ -408,16 +425,16 @@
     var chars = '<>:"\\/|?*%';
     for (var i = 0; i < chars.length; i++) {
       var c = chars.substring(i, i + 1);
-      url = url.replaceAll("%${c.codeUnitAt(0)}", c);
+      url = url.replaceAll('%${c.codeUnitAt(0)}', c);
     }
 
     // If the URL has an explicit scheme, use that.
-    if (url.contains("://")) return url;
+    if (url.contains('://')) return url;
 
     // Otherwise, default to http for localhost and https for everything else.
     var scheme =
-        isLoopback(url.replaceAll(RegExp(":.*"), "")) ? "http" : "https";
-    return "$scheme://$url";
+        isLoopback(url.replaceAll(RegExp(':.*'), '')) ? 'http' : 'https';
+    return '$scheme://$url';
   }
 
   /// Returns the server URL for [description].
@@ -429,7 +446,7 @@
   ///
   /// Ensures the package name is properly URL encoded.
   Uri _makeVersionUrl(PackageId id,
-      String pattern(String server, String package, String version)) {
+      String Function(String server, String package, String version) pattern) {
     var parsed = source._parseDescription(id.description);
     var server = parsed.last;
     var package = Uri.encodeComponent(parsed.first);
@@ -448,11 +465,12 @@
       : super(source, systemCache);
 
   /// Gets the list of all versions of [ref] that are in the system cache.
+  @override
   Future<List<PackageId>> doGetVersions(PackageRef ref) async {
     var parsed = source._parseDescription(ref.description);
     var server = parsed.last;
-    log.io("Finding versions of ${ref.name} in "
-        "$systemCacheRoot/${_urlToDirectory(server)}");
+    log.io('Finding versions of ${ref.name} in '
+        '$systemCacheRoot/${_urlToDirectory(server)}');
 
     var dir = p.join(systemCacheRoot, _urlToDirectory(server));
 
@@ -460,10 +478,10 @@
     if (dirExists(dir)) {
       versions = listDir(dir)
           .map((entry) {
-            var components = p.basename(entry).split("-");
+            var components = p.basename(entry).split('-');
             if (components.first != ref.name) return null;
             return source.idFor(
-                ref.name, Version.parse(components.skip(1).join("-")),
+                ref.name, Version.parse(components.skip(1).join('-')),
                 url: _serverFor(ref.description));
           })
           .where((id) => id != null)
@@ -475,21 +493,23 @@
     // If there are no versions in the cache, report a clearer error.
     if (versions.isEmpty) {
       throw PackageNotFoundException(
-          "could not find package ${ref.name} in cache");
+          'could not find package ${ref.name} in cache');
     }
 
     return versions;
   }
 
+  @override
   Future _download(
       String server, String package, Version version, String destPath) {
     // Since HostedSource is cached, this will only be called for uncached
     // packages.
-    throw UnsupportedError("Cannot download packages when offline.");
+    throw UnsupportedError('Cannot download packages when offline.');
   }
 
+  @override
   Future<Pubspec> describeUncached(PackageId id) {
     throw PackageNotFoundException(
-        "${id.name} ${id.version} is not available in your system cache");
+        '${id.name} ${id.version} is not available in your system cache');
   }
 }
diff --git a/lib/src/source/path.dart b/lib/src/source/path.dart
index 55a89e9..ab9742c 100644
--- a/lib/src/source/path.dart
+++ b/lib/src/source/path.dart
@@ -17,8 +17,10 @@
 
 /// A package [Source] that gets packages from a given local file path.
 class PathSource extends Source {
+  @override
   final name = 'path';
 
+  @override
   BoundSource bind(SystemCache systemCache) =>
       BoundPathSource(this, systemCache);
 
@@ -27,39 +29,42 @@
   ///
   /// This returned path may be relative or absolute and it is up to the caller
   /// to know how to interpret a relative path.
-  String pathFromDescription(description) => description["path"];
+  String pathFromDescription(description) => description['path'];
 
   /// Returns a reference to a path package named [name] at [path].
   PackageRef refFor(String name, String path) {
     return PackageRef(
-        name, this, {"path": path, "relative": p.isRelative(path)});
+        name, this, {'path': path, 'relative': p.isRelative(path)});
   }
 
   /// Returns an ID for a path package with the given [name] and [version] at
   /// [path].
   PackageId idFor(String name, Version version, String path) {
     return PackageId(
-        name, this, version, {"path": path, "relative": p.isRelative(path)});
+        name, this, version, {'path': path, 'relative': p.isRelative(path)});
   }
 
+  @override
   bool descriptionsEqual(description1, description2) {
     // Compare real paths after normalizing and resolving symlinks.
-    var path1 = canonicalize(description1["path"]);
-    var path2 = canonicalize(description2["path"]);
+    var path1 = canonicalize(description1['path']);
+    var path2 = canonicalize(description2['path']);
     return path1 == path2;
   }
 
+  @override
   int hashDescription(description) =>
-      canonicalize(description["path"]).hashCode;
+      canonicalize(description['path']).hashCode;
 
   /// Parses a path dependency.
   ///
   /// This takes in a path string and returns a map. The "path" key will be the
   /// original path but resolved relative to the containing path. The
   /// "relative" key will be `true` if the original path was relative.
+  @override
   PackageRef parseRef(String name, description, {String containingPath}) {
     if (description is! String) {
-      throw FormatException("The description must be a path string.");
+      throw FormatException('The description must be a path string.');
     }
 
     // Resolve the path relative to the containing file path, and remember
@@ -78,27 +83,28 @@
     }
 
     return PackageRef(
-        name, this, {"path": description, "relative": isRelative});
+        name, this, {'path': description, 'relative': isRelative});
   }
 
+  @override
   PackageId parseId(String name, Version version, description,
       {String containingPath}) {
     if (description is! Map) {
-      throw FormatException("The description must be a map.");
+      throw FormatException('The description must be a map.');
     }
 
-    if (description["path"] is! String) {
+    if (description['path'] is! String) {
       throw FormatException("The 'path' field of the description must "
-          "be a string.");
+          'be a string.');
     }
 
-    if (description["relative"] is! bool) {
+    if (description['relative'] is! bool) {
       throw FormatException("The 'relative' field of the description "
-          "must be a boolean.");
+          'must be a boolean.');
     }
 
     // Resolve the path relative to the containing file path.
-    if (description["relative"]) {
+    if (description['relative']) {
       // Relative paths coming from lockfiles that are not on the local file
       // system aren't allowed.
       if (containingPath == null) {
@@ -107,8 +113,8 @@
       }
 
       description = Map.from(description);
-      description["path"] =
-          p.normalize(p.join(p.dirname(containingPath), description["path"]));
+      description['path'] =
+          p.normalize(p.join(p.dirname(containingPath), description['path']));
     }
 
     return PackageId(name, this, version, description);
@@ -118,32 +124,37 @@
   ///
   /// For the descriptions where `relative` attribute is `true`, tries to make
   /// `path` relative to the specified [containingPath].
+  @override
   dynamic serializeDescription(String containingPath, description) {
-    if (description["relative"]) {
+    if (description['relative']) {
       return {
-        "path": p.relative(description['path'], from: containingPath),
-        "relative": true
+        'path': p.relative(description['path'], from: containingPath),
+        'relative': true
       };
     }
     return description;
   }
 
   /// Converts a parsed relative path to its original relative form.
+  @override
   String formatDescription(description) {
-    var sourcePath = description["path"];
-    if (description["relative"]) sourcePath = p.relative(description['path']);
+    var sourcePath = description['path'];
+    if (description['relative']) sourcePath = p.relative(description['path']);
     return sourcePath;
   }
 }
 
 /// The [BoundSource] for [PathSource].
 class BoundPathSource extends BoundSource {
+  @override
   final PathSource source;
 
+  @override
   final SystemCache systemCache;
 
   BoundPathSource(this.source, this.systemCache);
 
+  @override
   Future<List<PackageId>> doGetVersions(PackageRef ref) async {
     // There's only one package ID for a given path. We just need to find the
     // version.
@@ -153,6 +164,7 @@
     return [id];
   }
 
+  @override
   Future<Pubspec> doDescribe(PackageId id) async => _loadPubspec(id.toRef());
 
   Pubspec _loadPubspec(PackageRef ref) {
@@ -160,15 +172,17 @@
     return Pubspec.load(dir, systemCache.sources, expectedName: ref.name);
   }
 
+  @override
   Future get(PackageId id, String symlink) {
     return Future.sync(() {
       var dir = _validatePath(id.name, id.description);
       createPackageSymlink(id.name, dir, symlink,
-          relative: id.description["relative"]);
+          relative: id.description['relative']);
     });
   }
 
-  String getDirectory(PackageId id) => id.description["path"];
+  @override
+  String getDirectory(PackageId id) => id.description['path'];
 
   /// Ensures that [description] is a valid path description and returns a
   /// normalized path to the package.
@@ -177,7 +191,7 @@
   /// existing directory. Throws an [ApplicationException] if the path is
   /// invalid.
   String _validatePath(String name, description) {
-    var dir = description["path"];
+    var dir = description['path'];
 
     if (dirExists(dir)) return dir;
 
diff --git a/lib/src/source/sdk.dart b/lib/src/source/sdk.dart
index 5f8de1c..38ae7ec 100644
--- a/lib/src/source/sdk.dart
+++ b/lib/src/source/sdk.dart
@@ -17,8 +17,10 @@
 
 /// A package [Source] that gets packages from a hard-coded SDK.
 class SdkSource extends Source {
+  @override
   final name = 'sdk';
 
+  @override
   BoundSource bind(SystemCache systemCache) =>
       BoundSdkSource(this, systemCache);
 
@@ -31,37 +33,44 @@
       PackageId(name, this, version, sdk);
 
   /// Parses an SDK dependency.
+  @override
   PackageRef parseRef(String name, description, {String containingPath}) {
     if (description is! String) {
-      throw FormatException("The description must be an SDK name.");
+      throw FormatException('The description must be an SDK name.');
     }
 
     return PackageRef(name, this, description);
   }
 
+  @override
   PackageId parseId(String name, Version version, description,
       {String containingPath}) {
     if (description is! String) {
-      throw FormatException("The description must be an SDK name.");
+      throw FormatException('The description must be an SDK name.');
     }
 
     return PackageId(name, this, version, description);
   }
 
+  @override
   bool descriptionsEqual(description1, description2) =>
       description1 == description2;
 
+  @override
   int hashDescription(description) => description.hashCode;
 }
 
 /// The [BoundSource] for [SdkSource].
 class BoundSdkSource extends BoundSource {
+  @override
   final SdkSource source;
 
+  @override
   final SystemCache systemCache;
 
   BoundSdkSource(this.source, this.systemCache);
 
+  @override
   Future<List<PackageId>> doGetVersions(PackageRef ref) async {
     var pubspec = _loadPubspec(ref);
     var id = PackageId(ref.name, source, pubspec.version, ref.description);
@@ -69,6 +78,7 @@
     return [id];
   }
 
+  @override
   Future<Pubspec> doDescribe(PackageId id) async => _loadPubspec(id);
 
   /// Loads the pubspec for the Flutter package named [name].
@@ -79,6 +89,7 @@
       Pubspec.load(_verifiedPackagePath(package), systemCache.sources,
           expectedName: package.name);
 
+  @override
   Future get(PackageId id, String symlink) async {
     createPackageSymlink(id.name, _verifiedPackagePath(id), symlink);
   }
@@ -93,7 +104,7 @@
     if (sdk == null) {
       throw PackageNotFoundException('unknown SDK "$identifier"');
     } else if (!sdk.isAvailable) {
-      throw PackageNotFoundException("the ${sdk.name} SDK is not available",
+      throw PackageNotFoundException('the ${sdk.name} SDK is not available',
           missingSdk: sdk);
     }
 
@@ -104,6 +115,7 @@
         'could not find package ${package.name} in the ${sdk.name} SDK');
   }
 
+  @override
   String getDirectory(PackageId id) {
     try {
       return _verifiedPackagePath(id);
@@ -111,7 +123,7 @@
       // [PackageNotFoundException]s are uncapitalized and unpunctuated because
       // they're used within other sentences by the version solver, but
       // [ApplicationException]s should be full sentences.
-      throw ApplicationException(capitalize(error.message) + ".");
+      throw ApplicationException(capitalize(error.message) + '.');
     }
   }
 }
diff --git a/lib/src/source/unknown.dart b/lib/src/source/unknown.dart
index 1619bc6..ac43447 100644
--- a/lib/src/source/unknown.dart
+++ b/lib/src/source/unknown.dart
@@ -18,49 +18,63 @@
 ///
 /// [null object]: http://en.wikipedia.org/wiki/Null_Object_pattern
 class UnknownSource extends Source {
+  @override
   final String name;
 
   UnknownSource(this.name);
 
+  @override
   BoundSource bind(SystemCache systemCache) =>
       _BoundUnknownSource(this, systemCache);
 
   /// Two unknown sources are the same if their names are the same.
+  @override
   bool operator ==(other) => other is UnknownSource && other.name == name;
 
+  @override
   int get hashCode => name.hashCode;
 
+  @override
   bool descriptionsEqual(description1, description2) =>
       description1 == description2;
 
+  @override
   int hashDescription(description) => description.hashCode;
 
+  @override
   PackageRef parseRef(String name, description, {String containingPath}) =>
       PackageRef(name, this, description);
 
+  @override
   PackageId parseId(String name, Version version, description,
           {String containingPath}) =>
       PackageId(name, this, version, description);
 }
 
 class _BoundUnknownSource extends BoundSource {
+  @override
   final UnknownSource source;
 
+  @override
   final SystemCache systemCache;
 
   _BoundUnknownSource(this.source, this.systemCache);
 
+  @override
   Future<List<PackageId>> doGetVersions(PackageRef ref) =>
       throw UnsupportedError(
           "Cannot get package versions from unknown source '${source.name}'.");
 
+  @override
   Future<Pubspec> doDescribe(PackageId id) => throw UnsupportedError(
       "Cannot describe a package from unknown source '${source.name}'.");
 
+  @override
   Future get(PackageId id, String symlink) =>
       throw UnsupportedError("Cannot get an unknown source '${source.name}'.");
 
   /// Returns the directory where this package can be found locally.
+  @override
   String getDirectory(PackageId id) => throw UnsupportedError(
       "Cannot find a package from an unknown source '${source.name}'.");
 }
diff --git a/lib/src/source_registry.dart b/lib/src/source_registry.dart
index 65a20b7..fef54bd 100644
--- a/lib/src/source_registry.dart
+++ b/lib/src/source_registry.dart
@@ -15,10 +15,10 @@
   ///
   /// This is initialized with the three built-in sources.
   final _sources = {
-    "git": GitSource(),
-    "hosted": HostedSource(),
-    "path": PathSource(),
-    "sdk": SdkSource()
+    'git': GitSource(),
+    'hosted': HostedSource(),
+    'path': PathSource(),
+    'sdk': SdkSource()
   };
 
   /// The default source, which is used when no source is specified.
@@ -35,16 +35,16 @@
   }
 
   /// The built-in [GitSource].
-  GitSource get git => _sources["git"] as GitSource;
+  GitSource get git => _sources['git'] as GitSource;
 
   /// The built-in [HostedSource].
-  HostedSource get hosted => _sources["hosted"] as HostedSource;
+  HostedSource get hosted => _sources['hosted'] as HostedSource;
 
   /// The built-in [PathSource].
-  PathSource get path => _sources["path"] as PathSource;
+  PathSource get path => _sources['path'] as PathSource;
 
   /// The built-in [SdkSource].
-  SdkSource get sdk => _sources["sdk"] as SdkSource;
+  SdkSource get sdk => _sources['sdk'] as SdkSource;
 
   SourceRegistry() {
     _default = hosted;
diff --git a/lib/src/system_cache.dart b/lib/src/system_cache.dart
index b901733..57f7fe0 100644
--- a/lib/src/system_cache.dart
+++ b/lib/src/system_cache.dart
@@ -72,7 +72,7 @@
   /// If [isOffline] is `true`, then the offline hosted source will be used.
   /// Defaults to `false`.
   SystemCache({String rootDir, bool isOffline = false})
-      : rootDir = rootDir == null ? SystemCache.defaultDir : rootDir {
+      : rootDir = rootDir ?? SystemCache.defaultDir {
     for (var source in sources.all) {
       if (source is HostedSource) {
         _boundSources[source] = source.bind(this, isOffline: isOffline);
@@ -91,7 +91,7 @@
   /// Throws an [ArgumentError] if [id] has an invalid source.
   Package load(PackageId id) {
     if (id.source is UnknownSource) {
-      throw ArgumentError("Unknown source ${id.source}.");
+      throw ArgumentError('Unknown source ${id.source}.');
     }
 
     return Package.load(id.name, source(id.source).getDirectory(id), sources);
@@ -102,7 +102,7 @@
     var source = this.source(id.source);
 
     if (source is CachedSource) return source.isInSystemCache(id);
-    throw ArgumentError("Package $id is not cacheable.");
+    throw ArgumentError('Package $id is not cacheable.');
   }
 
   /// Create a new temporary directory within the system cache.
diff --git a/lib/src/transcript.dart b/lib/src/transcript.dart
index fe75c0e..b494086 100644
--- a/lib/src/transcript.dart
+++ b/lib/src/transcript.dart
@@ -60,7 +60,7 @@
   /// where excess entries where dropped, invokes [onGap] with the number of
   /// dropped entries. If no more than [max] entries were added, does not
   /// invoke [onGap].
-  void forEach(void onEntry(T entry), [void Function(int) onGap]) {
+  void forEach(void Function(T) onEntry, [void Function(int) onGap]) {
     if (_oldest.isNotEmpty) {
       _oldest.forEach(onEntry);
       if (onGap != null) onGap(discarded);
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index 0465d58..1401282 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -4,64 +4,64 @@
 
 /// Generic utility functions. Stuff that should possibly be in core.
 import 'dart:async';
-import "dart:convert";
+import 'dart:convert';
 import 'dart:io';
 import 'dart:math' as math;
 
-import "package:crypto/crypto.dart" as crypto;
+import 'package:crypto/crypto.dart' as crypto;
 import 'package:meta/meta.dart';
 import 'package:pub_semver/pub_semver.dart';
-import "package:stack_trace/stack_trace.dart";
+import 'package:stack_trace/stack_trace.dart';
 
 import 'exceptions.dart';
 import 'io.dart';
 import 'log.dart' as log;
 
 /// Whether Pub is running its own tests under Travis.CI.
-final isTravis = Platform.environment["TRAVIS_REPO_SLUG"] == "dart-lang/pub";
+final isTravis = Platform.environment['TRAVIS_REPO_SLUG'] == 'dart-lang/pub';
 
 /// A regular expression matching a Dart identifier.
 ///
 /// This also matches a package name, since they must be Dart identifiers.
-final identifierRegExp = RegExp(r"[a-zA-Z_]\w*");
+final identifierRegExp = RegExp(r'[a-zA-Z_]\w*');
 
 /// Like [identifierRegExp], but anchored so that it only matches strings that
 /// are *just* Dart identifiers.
-final onlyIdentifierRegExp = RegExp("^${identifierRegExp.pattern}\$");
+final onlyIdentifierRegExp = RegExp('^${identifierRegExp.pattern}\$');
 
 /// Dart reserved words, from the Dart spec.
 const reservedWords = [
-  "assert",
-  "break",
-  "case",
-  "catch",
-  "class",
-  "const",
-  "continue",
-  "default",
-  "do",
-  "else",
-  "extends",
-  "false",
-  "final",
-  "finally",
-  "for",
-  "if",
-  "in",
-  "is",
-  "new",
-  "null",
-  "return",
-  "super",
-  "switch",
-  "this",
-  "throw",
-  "true",
-  "try",
-  "var",
-  "void",
-  "while",
-  "with"
+  'assert',
+  'break',
+  'case',
+  'catch',
+  'class',
+  'const',
+  'continue',
+  'default',
+  'do',
+  'else',
+  'extends',
+  'false',
+  'final',
+  'finally',
+  'for',
+  'if',
+  'in',
+  'is',
+  'new',
+  'null',
+  'return',
+  'super',
+  'switch',
+  'this',
+  'throw',
+  'true',
+  'try',
+  'var',
+  'void',
+  'while',
+  'with'
 ];
 
 /// An cryptographically secure instance of [math.Random].
@@ -86,13 +86,16 @@
 
   Pair(this.first, this.last);
 
+  @override
   String toString() => '($first, $last)';
 
+  @override
   bool operator ==(other) {
     if (other is! Pair) return false;
     return other.first == first && other.last == last;
   }
 
+  @override
   int get hashCode => first.hashCode ^ last.hashCode;
 }
 
@@ -103,8 +106,9 @@
 /// [Chain]. By default, this chain will contain only the local stack trace, but
 /// if [captureStackChains] is passed, it will contain the full stack chain for
 /// the error.
-Future captureErrors(Future callback(), {bool captureStackChains = false}) {
-  var completer = Completer();
+Future<T> captureErrors<T>(Future<T> Function() callback,
+    {bool captureStackChains = false}) {
+  var completer = Completer<T>();
   var wrappedCallback = () {
     Future.sync(callback).then(completer.complete).catchError((e, stackTrace) {
       // [stackTrace] can be null if we're running without [captureStackChains],
@@ -155,7 +159,7 @@
 /// completes.
 ///
 /// The stream will be passed through unchanged.
-StreamTransformer<T, T> onDoneTransformer<T>(void onDone()) {
+StreamTransformer<T, T> onDoneTransformer<T>(void Function() onDone) {
   return StreamTransformer<T, T>.fromHandlers(handleDone: (sink) {
     onDone();
     sink.close();
@@ -178,10 +182,10 @@
 /// If [iter] does not have one item, name will be pluralized by adding "s" or
 /// using [plural], if given.
 String namedSequence(String name, Iterable iter, [String plural]) {
-  if (iter.length == 1) return "$name ${iter.single}";
+  if (iter.length == 1) return '$name ${iter.single}';
 
-  plural ??= "${name}s";
-  return "$plural ${toSentence(iter)}";
+  plural ??= '${name}s';
+  return '$plural ${toSentence(iter)}';
 }
 
 /// Returns a sentence fragment listing the elements of [iter].
@@ -191,7 +195,7 @@
 String toSentence(Iterable iter, {String conjunction}) {
   if (iter.length == 1) return iter.first.toString();
   conjunction ??= 'and';
-  return iter.take(iter.length - 1).join(", ") + " $conjunction ${iter.last}";
+  return iter.take(iter.length - 1).join(', ') + ' $conjunction ${iter.last}';
 }
 
 /// Returns [name] if [number] is 1, or the plural of [name] otherwise.
@@ -216,8 +220,8 @@
   // escaped characters. We could do all of the replaces at once with a regexp
   // but string literal for regex that matches all regex metacharacters would
   // be a bit hard to read.
-  for (var metacharacter in r"\^$.*+?()[]{}|".split("")) {
-    string = string.replaceAll(metacharacter, "\\$metacharacter");
+  for (var metacharacter in r'\^$.*+?()[]{}|'.split('')) {
+    string = string.replaceAll(metacharacter, '\\$metacharacter');
   }
 
   return string;
@@ -231,7 +235,7 @@
   if (host == 'localhost') return true;
 
   // IPv6 hosts in URLs are surrounded by square brackets.
-  if (host.startsWith("[") && host.endsWith("]")) {
+  if (host.startsWith('[') && host.endsWith(']')) {
     host = host.substring(1, host.length - 1);
   }
 
@@ -261,8 +265,8 @@
 /// and only if that path's basename is in [files].
 Set<String> createFileFilter(Iterable<String> files) {
   return files.expand<String>((file) {
-    var result = ["/$file"];
-    if (Platform.isWindows) result.add("\\$file");
+    var result = ['/$file'];
+    if (Platform.isWindows) result.add('\\$file');
     return result;
   }).toSet();
 }
@@ -274,9 +278,9 @@
 /// and only if one of that path's components is in [dirs].
 Set<String> createDirectoryFilter(Iterable<String> dirs) {
   return dirs.expand<String>((dir) {
-    var result = ["/$dir/"];
+    var result = ['/$dir/'];
     if (Platform.isWindows) {
-      result..add("/$dir\\")..add("\\$dir/")..add("\\$dir\\");
+      result..add('/$dir\\')..add('\\$dir/')..add('\\$dir\\');
     }
     return result;
   }).toSet();
@@ -285,8 +289,7 @@
 /// Returns the maximum value in [iter] by [compare].
 ///
 /// [compare] defaults to [Comparable.compare].
-T maxAll<T extends Comparable>(Iterable<T> iter,
-    [int compare(T element1, T element2)]) {
+T maxAll<T extends Comparable>(Iterable<T> iter, [int Function(T, T) compare]) {
   compare ??= Comparable.compare;
   return iter
       .reduce((max, element) => compare(element, max) > 0 ? element : max);
@@ -294,7 +297,7 @@
 
 /// Like [minBy], but with an asynchronous [orderBy] callback.
 Future<S> minByAsync<S, T>(
-    Iterable<S> values, Future<T> orderBy(S element)) async {
+    Iterable<S> values, Future<T> Function(S) orderBy) async {
   S minValue;
   T minOrderBy;
   for (var element in values) {
@@ -312,14 +315,14 @@
 Iterable<T> slice<T>(Iterable<T> values, int start, int end) {
   if (end <= start) {
     throw RangeError.range(
-        end, start + 1, null, "end", "must be greater than start");
+        end, start + 1, null, 'end', 'must be greater than start');
   }
   return values.skip(start).take(end - start);
 }
 
 /// Like [Iterable.fold], but for an asynchronous [combine] function.
 Future<S> foldAsync<S, T>(Iterable<T> values, S initialValue,
-        Future<S> combine(S previous, T element)) =>
+        Future<S> Function(S previous, T element) combine) =>
     values.fold(
         Future.value(initialValue),
         (previousFuture, element) =>
@@ -327,7 +330,7 @@
 
 /// Replace each instance of [matcher] in [source] with the return value of
 /// [fn].
-String replace(String source, Pattern matcher, String fn(Match match)) {
+String replace(String source, Pattern matcher, String Function(Match) fn) {
   var buffer = StringBuffer();
   var start = 0;
   for (var match in matcher.allMatches(source)) {
@@ -362,19 +365,19 @@
   }, onError: (e, [StackTrace stackTrace]) {
     completer.completeError(e, stackTrace);
   }, onDone: () {
-    completer.completeError(StateError("No elements"), Chain.current());
+    completer.completeError(StateError('No elements'), Chain.current());
   }, cancelOnError: true);
   return completer.future;
 }
 
 /// A regular expression matching a trailing CR character.
-final _trailingCR = RegExp(r"\r$");
+final _trailingCR = RegExp(r'\r$');
 
 // TODO(nweiz): Use `text.split(new RegExp("\r\n?|\n\r?"))` when issue 9360 is
 // fixed.
 /// Splits [text] on its line breaks in a Windows-line-break-friendly way.
 List<String> splitLines(String text) =>
-    text.split("\n").map((line) => line.replaceFirst(_trailingCR, "")).toList();
+    text.split('\n').map((line) => line.replaceFirst(_trailingCR, '')).toList();
 
 /// Converts a stream of arbitrarily chunked strings into a line-by-line stream.
 ///
@@ -423,11 +426,11 @@
 /// into a [Map] from parameter names to values.
 Map<String, String> queryToMap(String queryList) {
   var map = <String, String>{};
-  for (var pair in queryList.split("&")) {
-    var split = split1(pair, "=");
+  for (var pair in queryList.split('&')) {
+    var split = split1(pair, '=');
     if (split.isEmpty) continue;
     var key = _urlDecode(split[0]);
-    var value = split.length > 1 ? _urlDecode(split[1]) : "";
+    var value = split.length > 1 ? _urlDecode(split[1]) : '';
     map[key] = value;
   }
   return map;
@@ -436,7 +439,7 @@
 /// Returns a human-friendly representation of [duration].
 String niceDuration(Duration duration) {
   var hasMinutes = duration.inMinutes > 0;
-  var result = hasMinutes ? "${duration.inMinutes}:" : "";
+  var result = hasMinutes ? '${duration.inMinutes}:' : '';
 
   var s = duration.inSeconds % 60;
   var ms = duration.inMilliseconds % 1000;
@@ -448,14 +451,14 @@
       : (ms ~/ 100).toString();
 
   return "$result${hasMinutes ? _padLeft(s.toString(), 2, '0') : s}"
-      ".${msString}s";
+      '.${msString}s';
 }
 
 /// Decodes a URL-encoded string.
 ///
 /// Unlike [Uri.decodeComponent], this includes replacing `+` with ` `.
 String _urlDecode(String encoded) =>
-    Uri.decodeComponent(encoded.replaceAll("+", " "));
+    Uri.decodeComponent(encoded.replaceAll('+', ' '));
 
 /// Whether "special" strings such as Unicode characters or color escapes are
 /// safe to use.
@@ -484,7 +487,7 @@
     return lines.map((line) => '$prefix$line').join('\n');
   }
 
-  var firstLine = "$firstPrefix${lines.first}";
+  var firstLine = '$firstPrefix${lines.first}';
   lines = lines.skip(1).map((line) => '$prefix$line').toList();
   lines.insert(0, firstLine);
   return lines.join('\n');
@@ -503,14 +506,14 @@
 ///
 /// This pattern does not strictly follow the plain scalar grammar of YAML,
 /// which means some strings may be unnecessarily quoted, but it's much simpler.
-final _unquotableYamlString = RegExp(r"^[a-zA-Z_-][a-zA-Z_0-9-]*$");
+final _unquotableYamlString = RegExp(r'^[a-zA-Z_-][a-zA-Z_0-9-]*$');
 
 /// Converts [data], which is a parsed YAML object, to a pretty-printed string,
 /// using indentation for maps.
 String yamlToString(data) {
   var buffer = StringBuffer();
 
-  _stringify(bool isMapValue, String indent, data) {
+  void _stringify(bool isMapValue, String indent, data) {
     // TODO(nweiz): Serialize using the YAML library once it supports
     // serialization.
 
@@ -612,12 +615,12 @@
   // If there is no limit, don't wrap.
   if (_lineLength == null) return text;
 
-  prefix ??= "";
-  return text.split("\n").map((originalLine) {
+  prefix ??= '';
+  return text.split('\n').map((originalLine) {
     var buffer = StringBuffer();
     var lengthSoFar = 0;
     var firstLine = true;
-    for (var word in originalLine.split(" ")) {
+    for (var word in originalLine.split(' ')) {
       var wordLength = _withoutColors(word).length;
       if (wordLength > _lineLength) {
         if (lengthSoFar != 0) buffer.writeln();
@@ -635,12 +638,12 @@
         lengthSoFar = wordLength + prefix.length;
         firstLine = false;
       } else {
-        buffer.write(" $word");
+        buffer.write(' $word');
         lengthSoFar += 1 + wordLength;
       }
     }
     return buffer.toString();
-  }).join("\n");
+  }).join('\n');
 }
 
 /// A regular expression matching terminal color codes.
diff --git a/lib/src/validator.dart b/lib/src/validator.dart
index 745fd21..5a516cd 100644
--- a/lib/src/validator.dart
+++ b/lib/src/validator.dart
@@ -86,11 +86,11 @@
         .intersect(allowedSdks);
     if (newSdkConstraint.isEmpty) newSdkConstraint = allowedSdks;
 
-    errors.add("$message\n"
-        "Make sure your SDK constraint excludes old versions:\n"
-        "\n"
-        "environment:\n"
-        "  sdk: \"$newSdkConstraint\"");
+    errors.add('$message\n'
+        'Make sure your SDK constraint excludes old versions:\n'
+        '\n'
+        'environment:\n'
+        '  sdk: \"$newSdkConstraint\"');
   }
 
   /// Returns whether [version1] and [version2] are pre-releases of the same version.
@@ -138,19 +138,19 @@
           validators.expand((validator) => validator.warnings).toList();
 
       if (errors.isNotEmpty) {
-        log.error("Missing requirements:");
+        log.error('Missing requirements:');
         for (var error in errors) {
           log.error("* ${error.split('\n').join('\n  ')}");
         }
-        log.error("");
+        log.error('');
       }
 
       if (warnings.isNotEmpty) {
-        log.warning("Suggestions:");
+        log.warning('Suggestions:');
         for (var warning in warnings) {
           log.warning("* ${warning.split('\n').join('\n  ')}");
         }
-        log.warning("");
+        log.warning('');
       }
 
       return Pair<List<String>, List<String>>(errors, warnings);
diff --git a/lib/src/validator/changelog.dart b/lib/src/validator/changelog.dart
index accf289..e259e47 100644
--- a/lib/src/validator/changelog.dart
+++ b/lib/src/validator/changelog.dart
@@ -13,6 +13,7 @@
 class ChangelogValidator extends Validator {
   ChangelogValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() {
     return Future.sync(() {
       final changelog = entrypoint.root.changelogPath;
@@ -29,9 +30,9 @@
         // utf8.decode doesn't allow invalid UTF-8.
         contents = utf8.decode(bytes);
       } on FormatException catch (_) {
-        warnings.add("$changelog contains invalid UTF-8.\n"
-            "This will cause it to be displayed incorrectly on "
-            "the Pub site (https://pub.dev).");
+        warnings.add('$changelog contains invalid UTF-8.\n'
+            'This will cause it to be displayed incorrectly on '
+            'the Pub site (https://pub.dev).');
       }
 
       if (contents == null) {
@@ -43,8 +44,8 @@
 
       if (!contents.contains(version)) {
         warnings.add("$changelog doesn't mention current version ($version).\n"
-            "Consider updating it with notes on this version prior to "
-            "publication.");
+            'Consider updating it with notes on this version prior to '
+            'publication.');
       }
     });
   }
diff --git a/lib/src/validator/compiled_dartdoc.dart b/lib/src/validator/compiled_dartdoc.dart
index 8b22453..077997b 100644
--- a/lib/src/validator/compiled_dartdoc.dart
+++ b/lib/src/validator/compiled_dartdoc.dart
@@ -15,26 +15,27 @@
 class CompiledDartdocValidator extends Validator {
   CompiledDartdocValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() {
     return Future.sync(() {
       for (var entry in entrypoint.root.listFiles(useGitIgnore: true)) {
-        if (path.basename(entry) != "nav.json") continue;
+        if (path.basename(entry) != 'nav.json') continue;
         var dir = path.dirname(entry);
 
         // Look for tell-tale Dartdoc output files all in the same directory.
         var files = [
           entry,
-          path.join(dir, "index.html"),
-          path.join(dir, "styles.css"),
-          path.join(dir, "dart-logo-small.png"),
-          path.join(dir, "client-live-nav.js")
+          path.join(dir, 'index.html'),
+          path.join(dir, 'styles.css'),
+          path.join(dir, 'dart-logo-small.png'),
+          path.join(dir, 'client-live-nav.js')
         ];
 
         if (files.every(fileExists)) {
-          warnings.add("Avoid putting generated documentation in "
-              "${path.relative(dir)}.\n"
-              "Generated documentation bloats the package with redundant "
-              "data.");
+          warnings.add('Avoid putting generated documentation in '
+              '${path.relative(dir)}.\n'
+              'Generated documentation bloats the package with redundant '
+              'data.');
         }
       }
     });
diff --git a/lib/src/validator/dependency.dart b/lib/src/validator/dependency.dart
index bf17f87..ba5da98 100644
--- a/lib/src/validator/dependency.dart
+++ b/lib/src/validator/dependency.dart
@@ -18,10 +18,10 @@
 import '../validator.dart';
 
 /// The first Dart SDK version that supported caret constraints.
-final _firstCaretVersion = Version.parse("1.8.0-dev.3.0");
+final _firstCaretVersion = Version.parse('1.8.0-dev.3.0');
 
 /// The first Dart SDK version that supported Git path dependencies.
-final _firstGitPathVersion = Version.parse("2.0.0-dev.1.0");
+final _firstGitPathVersion = Version.parse('2.0.0-dev.1.0');
 
 /// A validator that validates a package's dependencies.
 class DependencyValidator extends Validator {
@@ -33,6 +33,7 @@
 
   DependencyValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() async {
     await _validateDependencies(entrypoint.root.pubspec.dependencies.values);
 
@@ -54,7 +55,7 @@
       // analyzer support for telling the user that a given import requires a
       // given feature. When we do this, verify that packages with features have
       // an SDK constraint that's at least >=2.0.0-dev.11.0.
-      errors.add("Packages with package features may not be published yet.");
+      errors.add('Packages with package features may not be published yet.');
     }
   }
 
@@ -62,7 +63,7 @@
   Future _validateDependencies(Iterable<PackageRange> dependencies) async {
     for (var dependency in dependencies) {
       var constraint = dependency.constraint;
-      if (dependency.name == "flutter") {
+      if (dependency.name == 'flutter') {
         _warnAboutFlutterSdk(dependency);
       } else if (dependency.source is SdkSource) {
         _warnAboutSdkSource(dependency);
@@ -85,7 +86,7 @@
           _warnAboutNoConstraintUpperBound(dependency);
         }
 
-        _hasCaretDep = _hasCaretDep || constraint.toString().startsWith("^");
+        _hasCaretDep = _hasCaretDep || constraint.toString().startsWith('^');
       }
 
       _hasFeatures = _hasFeatures || dependency.features.isNotEmpty;
@@ -137,7 +138,7 @@
     String constraint;
     var primary = Version.primary(versions);
     if (primary != null) {
-      constraint = "^$primary";
+      constraint = '^$primary';
     } else {
       constraint = dep.constraint.toString();
       if (!dep.constraint.isAny && dep.constraint is! Version) {
@@ -169,7 +170,7 @@
           'dependencies:\n'
           '  ${dep.name}: ^${locked.version}\n';
     }
-    warnings.add("$message\n"
+    warnings.add('$message\n'
         'Without a constraint, you\'re promising to support ${log.bold("all")} '
         'future versions of "${dep.name}".');
   }
@@ -195,7 +196,7 @@
     if (locked != null) {
       String constraint;
       if (locked.version == (dep.constraint as VersionRange).max) {
-        constraint = "^${locked.version}";
+        constraint = '^${locked.version}';
       } else {
         constraint = '">=${locked.version} ${dep.constraint}"';
       }
@@ -205,7 +206,7 @@
           'dependencies:\n'
           '  ${dep.name}: $constraint\n';
     }
-    warnings.add("$message\n"
+    warnings.add('$message\n'
         'Without a constraint, you\'re promising to support ${log.bold("all")} '
         'previous versions of "${dep.name}".');
   }
@@ -214,7 +215,7 @@
   void _warnAboutNoConstraintUpperBound(PackageRange dep) {
     String constraint;
     if ((dep.constraint as VersionRange).includeMin) {
-      constraint = "^${(dep.constraint as VersionRange).min}";
+      constraint = '^${(dep.constraint as VersionRange).min}';
     } else {
       constraint = '"${dep.constraint} '
           '<${(dep.constraint as VersionRange).min.nextBreaking}"';
diff --git a/lib/src/validator/dependency_override.dart b/lib/src/validator/dependency_override.dart
index 6e76baa..24e4e84 100644
--- a/lib/src/validator/dependency_override.dart
+++ b/lib/src/validator/dependency_override.dart
@@ -14,6 +14,7 @@
 class DependencyOverrideValidator extends Validator {
   DependencyOverrideValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() {
     var overridden = MapKeySet(entrypoint.root.dependencyOverrides);
     var dev = MapKeySet(entrypoint.root.devDependencies);
diff --git a/lib/src/validator/deprecated_fields.dart b/lib/src/validator/deprecated_fields.dart
index c911926..a62a546 100644
--- a/lib/src/validator/deprecated_fields.dart
+++ b/lib/src/validator/deprecated_fields.dart
@@ -12,6 +12,7 @@
 class DeprecatedFieldsValidator extends Validator {
   DeprecatedFieldsValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() async {
     if (entrypoint.root.pubspec.fields.containsKey('transformers')) {
       warnings.add('Your pubpsec.yaml includes a "transformers" section which'
diff --git a/lib/src/validator/directory.dart b/lib/src/validator/directory.dart
index 6f82b33..409e243 100644
--- a/lib/src/validator/directory.dart
+++ b/lib/src/validator/directory.dart
@@ -15,13 +15,14 @@
   DirectoryValidator(Entrypoint entrypoint) : super(entrypoint);
 
   static final _pluralNames = [
-    "benchmarks",
-    "docs",
-    "examples",
-    "tests",
-    "tools"
+    'benchmarks',
+    'docs',
+    'examples',
+    'tests',
+    'tools'
   ];
 
+  @override
   Future validate() {
     return Future.sync(() {
       for (var dir in listDir(entrypoint.root.dir)) {
@@ -39,7 +40,7 @@
               'tools.');
         }
 
-        if (dir.contains(RegExp(r"^samples?$"))) {
+        if (dir.contains(RegExp(r'^samples?$'))) {
           warnings.add('Rename the top-level "$dir" directory to "example".\n'
               'This allows Pub to find your examples and create "packages" '
               'directories for them.\n');
diff --git a/lib/src/validator/executable.dart b/lib/src/validator/executable.dart
index c62fdf7..4ce3748 100644
--- a/lib/src/validator/executable.dart
+++ b/lib/src/validator/executable.dart
@@ -14,14 +14,15 @@
 class ExecutableValidator extends Validator {
   ExecutableValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() async {
     var binFiles = entrypoint.root
-        .listFiles(beneath: "bin", recursive: false, useGitIgnore: true)
+        .listFiles(beneath: 'bin', recursive: false, useGitIgnore: true)
         .map(entrypoint.root.relative)
         .toList();
 
     entrypoint.root.pubspec.executables.forEach((executable, script) {
-      var scriptPath = p.join("bin", "$script.dart");
+      var scriptPath = p.join('bin', '$script.dart');
       if (binFiles.contains(scriptPath)) return;
 
       warnings.add('Your pubspec.yaml lists an executable "$executable" that '
diff --git a/lib/src/validator/flutter_plugin_format.dart b/lib/src/validator/flutter_plugin_format.dart
index 07d39d1..a183277 100644
--- a/lib/src/validator/flutter_plugin_format.dart
+++ b/lib/src/validator/flutter_plugin_format.dart
@@ -21,6 +21,7 @@
 class FlutterPluginFormatValidator extends Validator {
   FlutterPluginFormatValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() async {
     final pubspec = entrypoint.root.pubspec;
 
diff --git a/lib/src/validator/license.dart b/lib/src/validator/license.dart
index a77e20f..4f012fc 100644
--- a/lib/src/validator/license.dart
+++ b/lib/src/validator/license.dart
@@ -13,10 +13,11 @@
 class LicenseValidator extends Validator {
   LicenseValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() {
     return Future.sync(() {
       var licenseLike =
-          RegExp(r"^(([a-zA-Z0-9]+[-_])?(LICENSE|COPYING)|UNLICENSE)(\..*)?$");
+          RegExp(r'^(([a-zA-Z0-9]+[-_])?(LICENSE|COPYING)|UNLICENSE)(\..*)?$');
       if (entrypoint.root
           .listFiles(recursive: false, useGitIgnore: true)
           .map(path.basename)
@@ -25,9 +26,9 @@
       }
 
       errors.add(
-          "You must have a COPYING, LICENSE or UNLICENSE file in the root directory.\n"
-          "An open-source license helps ensure people can legally use your "
-          "code.");
+          'You must have a COPYING, LICENSE or UNLICENSE file in the root directory.\n'
+          'An open-source license helps ensure people can legally use your '
+          'code.');
     });
   }
 }
diff --git a/lib/src/validator/name.dart b/lib/src/validator/name.dart
index a1c291b..decb146 100644
--- a/lib/src/validator/name.dart
+++ b/lib/src/validator/name.dart
@@ -15,6 +15,7 @@
 class NameValidator extends Validator {
   NameValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() {
     return Future.sync(() {
       _checkName(entrypoint.root.name);
@@ -34,31 +35,31 @@
   /// Returns a list of all libraries in the current package as paths relative
   /// to the package's root directory.
   List<String> get _libraries {
-    var libDir = entrypoint.root.path("lib");
+    var libDir = entrypoint.root.path('lib');
     return entrypoint.root
-        .listFiles(beneath: "lib")
+        .listFiles(beneath: 'lib')
         .map((file) => path.relative(file, from: path.dirname(libDir)))
         .where((file) =>
-            !path.split(file).contains("src") &&
+            !path.split(file).contains('src') &&
             path.extension(file) == '.dart')
         .toList();
   }
 
   void _checkName(String name) {
     final description = 'Package name "$name"';
-    if (name == "") {
-      errors.add("$description may not be empty.");
-    } else if (!RegExp(r"^[a-zA-Z0-9_]*$").hasMatch(name)) {
-      errors.add("$description may only contain letters, numbers, and "
-          "underscores.\n"
-          "Using a valid Dart identifier makes the name usable in Dart code.");
-    } else if (!RegExp(r"^[a-zA-Z_]").hasMatch(name)) {
-      errors.add("$description must begin with a letter or underscore.\n"
-          "Using a valid Dart identifier makes the name usable in Dart code.");
+    if (name == '') {
+      errors.add('$description may not be empty.');
+    } else if (!RegExp(r'^[a-zA-Z0-9_]*$').hasMatch(name)) {
+      errors.add('$description may only contain letters, numbers, and '
+          'underscores.\n'
+          'Using a valid Dart identifier makes the name usable in Dart code.');
+    } else if (!RegExp(r'^[a-zA-Z_]').hasMatch(name)) {
+      errors.add('$description must begin with a letter or underscore.\n'
+          'Using a valid Dart identifier makes the name usable in Dart code.');
     } else if (reservedWords.contains(name.toLowerCase())) {
-      errors.add("$description may not be a reserved word in Dart.\n"
-          "Using a valid Dart identifier makes the name usable in Dart code.");
-    } else if (RegExp(r"[A-Z]").hasMatch(name)) {
+      errors.add('$description may not be a reserved word in Dart.\n'
+          'Using a valid Dart identifier makes the name usable in Dart code.');
+    } else if (RegExp(r'[A-Z]').hasMatch(name)) {
       warnings.add('$description should be lower-case. Maybe use '
           '"${_unCamelCase(name)}"?');
     }
@@ -67,10 +68,10 @@
   String _unCamelCase(String source) {
     var builder = StringBuffer();
     var lastMatchEnd = 0;
-    for (var match in RegExp(r"[a-z]([A-Z])").allMatches(source)) {
+    for (var match in RegExp(r'[a-z]([A-Z])').allMatches(source)) {
       builder
         ..write(source.substring(lastMatchEnd, match.start + 1))
-        ..write("_")
+        ..write('_')
         ..write(match.group(1).toLowerCase());
       lastMatchEnd = match.end;
     }
diff --git a/lib/src/validator/pubspec.dart b/lib/src/validator/pubspec.dart
index 232556d..19bf22b 100644
--- a/lib/src/validator/pubspec.dart
+++ b/lib/src/validator/pubspec.dart
@@ -16,10 +16,11 @@
 class PubspecValidator extends Validator {
   PubspecValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() async {
     var files = entrypoint.root.listFiles(recursive: false, useGitIgnore: true);
-    if (!files.any((file) => p.basename(file) == "pubspec.yaml")) {
-      errors.add("The pubspec is hidden, probably by .gitignore.");
+    if (!files.any((file) => p.basename(file) == 'pubspec.yaml')) {
+      errors.add('The pubspec is hidden, probably by .gitignore.');
     }
   }
 }
diff --git a/lib/src/validator/pubspec_field.dart b/lib/src/validator/pubspec_field.dart
index d225a45..84827fc 100644
--- a/lib/src/validator/pubspec_field.dart
+++ b/lib/src/validator/pubspec_field.dart
@@ -12,6 +12,7 @@
 class PubspecFieldValidator extends Validator {
   PubspecFieldValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() {
     _validateFieldIsString('description');
     _validateFieldIsString('homepage');
diff --git a/lib/src/validator/readme.dart b/lib/src/validator/readme.dart
index 6278802..716df0d 100644
--- a/lib/src/validator/readme.dart
+++ b/lib/src/validator/readme.dart
@@ -13,12 +13,13 @@
 class ReadmeValidator extends Validator {
   ReadmeValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() {
     return Future.sync(() {
       var readme = entrypoint.root.readmePath;
       if (readme == null) {
         warnings
-            .add("Please add a README.md file that describes your package.");
+            .add('Please add a README.md file that describes your package.');
         return;
       }
 
@@ -27,9 +28,9 @@
         // utf8.decode doesn't allow invalid UTF-8.
         utf8.decode(bytes);
       } on FormatException catch (_) {
-        warnings.add("$readme contains invalid UTF-8.\n"
-            "This will cause it to be displayed incorrectly on "
-            "the Pub site (https://pub.dev).");
+        warnings.add('$readme contains invalid UTF-8.\n'
+            'This will cause it to be displayed incorrectly on '
+            'the Pub site (https://pub.dev).');
       }
     });
   }
diff --git a/lib/src/validator/sdk_constraint.dart b/lib/src/validator/sdk_constraint.dart
index 93cc58f..7465a37 100644
--- a/lib/src/validator/sdk_constraint.dart
+++ b/lib/src/validator/sdk_constraint.dart
@@ -15,10 +15,11 @@
 class SdkConstraintValidator extends Validator {
   SdkConstraintValidator(Entrypoint entrypoint) : super(entrypoint);
 
+  @override
   Future validate() async {
     var dartConstraint = entrypoint.root.pubspec.originalDartSdkConstraint;
     if (dartConstraint is VersionRange) {
-      if (dartConstraint.toString().startsWith("^")) {
+      if (dartConstraint.toString().startsWith('^')) {
         var dartConstraintWithoutCaret = VersionRange(
             min: dartConstraint.min,
             max: dartConstraint.max,
@@ -27,10 +28,10 @@
         errors.add(
             "^ version constraints aren't allowed for SDK constraints since "
             "older versions of pub don't support them.\n"
-            "Expand it manually instead:\n"
-            "\n"
-            "environment:\n"
-            "  sdk: \"$dartConstraintWithoutCaret\"");
+            'Expand it manually instead:\n'
+            '\n'
+            'environment:\n'
+            '  sdk: \"$dartConstraintWithoutCaret\"');
       }
 
       if (dartConstraint.max == null) {
diff --git a/lib/src/validator/size.dart b/lib/src/validator/size.dart
index de3bdcd..8f258a9 100644
--- a/lib/src/validator/size.dart
+++ b/lib/src/validator/size.dart
@@ -18,6 +18,7 @@
 
   SizeValidator(Entrypoint entrypoint, this.packageSize) : super(entrypoint);
 
+  @override
   Future validate() {
     return packageSize.then((size) {
       if (size <= _MAX_SIZE) return;
@@ -25,15 +26,15 @@
       // Current implementation of Package.listFiles skips hidden files
       var ignoreExists = fileExists(entrypoint.root.path('.gitignore'));
 
-      var error = StringBuffer("Your package is $sizeInMb MB. Hosted "
-          "packages must be smaller than 100 MB.");
+      var error = StringBuffer('Your package is $sizeInMb MB. Hosted '
+          'packages must be smaller than 100 MB.');
 
       if (ignoreExists && !entrypoint.root.inGitRepo) {
-        error.write(" Your .gitignore has no effect since your project "
-            "does not appear to be in version control.");
+        error.write(' Your .gitignore has no effect since your project '
+            'does not appear to be in version control.');
       } else if (!ignoreExists && entrypoint.root.inGitRepo) {
-        error.write(" Consider adding a .gitignore to avoid including "
-            "temporary files.");
+        error.write(' Consider adding a .gitignore to avoid including '
+            'temporary files.');
       }
 
       errors.add(error.toString());
diff --git a/lib/src/validator/strict_dependencies.dart b/lib/src/validator/strict_dependencies.dart
index 5a64cc4..a4cf449 100644
--- a/lib/src/validator/strict_dependencies.dart
+++ b/lib/src/validator/strict_dependencies.dart
@@ -69,6 +69,7 @@
     }
   }
 
+  @override
   Future validate() async {
     var dependencies = entrypoint.root.dependencies.keys.toSet()
       ..add(entrypoint.root.name);
diff --git a/test/ascii_tree_test.dart b/test/ascii_tree_test.dart
index 1be1c3f..6c2d9be 100644
--- a/test/ascii_tree_test.dart
+++ b/test/ascii_tree_test.dart
@@ -5,24 +5,24 @@
 import 'package:pub/src/ascii_tree.dart' as tree;
 import 'package:test/test.dart';
 
-main() {
+void main() {
   group('tree.fromFiles', () {
     test('no files', () {
-      expect(tree.fromFiles([]), equals(""));
+      expect(tree.fromFiles([]), equals(''));
     });
 
     test('up to ten files in one directory are shown', () {
       var files = [
-        "dir/a.dart",
-        "dir/b.dart",
-        "dir/c.dart",
-        "dir/d.dart",
-        "dir/e.dart",
-        "dir/f.dart",
-        "dir/g.dart",
-        "dir/h.dart",
-        "dir/i.dart",
-        "dir/j.dart"
+        'dir/a.dart',
+        'dir/b.dart',
+        'dir/c.dart',
+        'dir/d.dart',
+        'dir/e.dart',
+        'dir/f.dart',
+        'dir/g.dart',
+        'dir/h.dart',
+        'dir/i.dart',
+        'dir/j.dart'
       ];
       expect(tree.fromFiles(files), equals("""
 '-- dir
@@ -41,17 +41,17 @@
 
     test('files are elided if there are more than ten', () {
       var files = [
-        "dir/a.dart",
-        "dir/b.dart",
-        "dir/c.dart",
-        "dir/d.dart",
-        "dir/e.dart",
-        "dir/f.dart",
-        "dir/g.dart",
-        "dir/h.dart",
-        "dir/i.dart",
-        "dir/j.dart",
-        "dir/k.dart"
+        'dir/a.dart',
+        'dir/b.dart',
+        'dir/c.dart',
+        'dir/d.dart',
+        'dir/e.dart',
+        'dir/f.dart',
+        'dir/g.dart',
+        'dir/h.dart',
+        'dir/i.dart',
+        'dir/j.dart',
+        'dir/k.dart'
       ];
       expect(tree.fromFiles(files), equals("""
 '-- dir
@@ -67,17 +67,17 @@
 
     test('files are not elided at the top level', () {
       var files = [
-        "a.dart",
-        "b.dart",
-        "c.dart",
-        "d.dart",
-        "e.dart",
-        "f.dart",
-        "g.dart",
-        "h.dart",
-        "i.dart",
-        "j.dart",
-        "k.dart"
+        'a.dart',
+        'b.dart',
+        'c.dart',
+        'd.dart',
+        'e.dart',
+        'f.dart',
+        'g.dart',
+        'h.dart',
+        'i.dart',
+        'j.dart',
+        'k.dart'
       ];
       expect(tree.fromFiles(files), equals("""
 |-- a.dart
@@ -96,27 +96,27 @@
 
     test('a complex example', () {
       var files = [
-        "TODO",
-        "example/console_example.dart",
-        "example/main.dart",
-        "example/web copy/web_example.dart",
-        "test/absolute_test.dart",
-        "test/basename_test.dart",
-        "test/dirname_test.dart",
-        "test/extension_test.dart",
-        "test/is_absolute_test.dart",
-        "test/is_relative_test.dart",
-        "test/join_test.dart",
-        "test/normalize_test.dart",
-        "test/relative_test.dart",
-        "test/split_test.dart",
-        ".gitignore",
-        "README.md",
-        "lib/path.dart",
-        "pubspec.yaml",
-        "test/all_test.dart",
-        "test/path_posix_test.dart",
-        "test/path_windows_test.dart"
+        'TODO',
+        'example/console_example.dart',
+        'example/main.dart',
+        'example/web copy/web_example.dart',
+        'test/absolute_test.dart',
+        'test/basename_test.dart',
+        'test/dirname_test.dart',
+        'test/extension_test.dart',
+        'test/is_absolute_test.dart',
+        'test/is_relative_test.dart',
+        'test/join_test.dart',
+        'test/normalize_test.dart',
+        'test/relative_test.dart',
+        'test/split_test.dart',
+        '.gitignore',
+        'README.md',
+        'lib/path.dart',
+        'pubspec.yaml',
+        'test/all_test.dart',
+        'test/path_posix_test.dart',
+        'test/path_windows_test.dart'
       ];
 
       expect(tree.fromFiles(files), equals("""
@@ -145,32 +145,32 @@
 
   group('treeFromMap', () {
     test('empty map', () {
-      expect(tree.fromMap({}), equals(""));
+      expect(tree.fromMap({}), equals(''));
     });
 
     test('a complex example', () {
       var map = {
-        ".gitignore": <String, Map>{},
-        "README.md": <String, Map>{},
-        "TODO": <String, Map>{},
-        "example": {
-          "console_example.dart": <String, Map>{},
-          "main.dart": <String, Map>{},
-          "web copy": {"web_example.dart": <String, Map>{}},
+        '.gitignore': <String, Map>{},
+        'README.md': <String, Map>{},
+        'TODO': <String, Map>{},
+        'example': {
+          'console_example.dart': <String, Map>{},
+          'main.dart': <String, Map>{},
+          'web copy': {'web_example.dart': <String, Map>{}},
         },
-        "lib": {"path.dart": <String, Map>{}},
-        "pubspec.yaml": <String, Map>{},
-        "test": {
-          "absolute_test.dart": <String, Map>{},
-          "basename_test.dart": <String, Map>{},
-          "dirname_test.dart": <String, Map>{},
-          "extension_test.dart": <String, Map>{},
-          "is_absolute_test.dart": <String, Map>{},
-          "is_relative_test.dart": <String, Map>{},
-          "join_test.dart": <String, Map>{},
-          "normalize_test.dart": <String, Map>{},
-          "relative_test.dart": <String, Map>{},
-          "split_test.dart": <String, Map>{}
+        'lib': {'path.dart': <String, Map>{}},
+        'pubspec.yaml': <String, Map>{},
+        'test': {
+          'absolute_test.dart': <String, Map>{},
+          'basename_test.dart': <String, Map>{},
+          'dirname_test.dart': <String, Map>{},
+          'extension_test.dart': <String, Map>{},
+          'is_absolute_test.dart': <String, Map>{},
+          'is_relative_test.dart': <String, Map>{},
+          'join_test.dart': <String, Map>{},
+          'normalize_test.dart': <String, Map>{},
+          'relative_test.dart': <String, Map>{},
+          'split_test.dart': <String, Map>{}
         }
       };
 
diff --git a/test/cache/add/adds_latest_matching_version_test.dart b/test/cache/add/adds_latest_matching_version_test.dart
index b398b44..0e78b12 100644
--- a/test/cache/add/adds_latest_matching_version_test.dart
+++ b/test/cache/add/adds_latest_matching_version_test.dart
@@ -9,33 +9,33 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       'adds the latest version of the package matching the '
       'version constraint', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.2");
-      builder.serve("foo", "1.2.3");
-      builder.serve("foo", "2.0.0-dev");
-      builder.serve("foo", "2.0.0");
+      builder.serve('foo', '1.2.2');
+      builder.serve('foo', '1.2.3');
+      builder.serve('foo', '2.0.0-dev');
+      builder.serve('foo', '2.0.0');
     });
 
     await runPub(
-        args: ["cache", "add", "foo", "-v", ">=1.0.0 <2.0.0"],
+        args: ['cache', 'add', 'foo', '-v', '>=1.0.0 <2.0.0'],
         output: 'Downloading foo 1.2.3...',
         silent: allOf([
-          contains("X-Pub-OS: ${Platform.operatingSystem}"),
-          contains("X-Pub-Command: cache add"),
-          contains("X-Pub-Session-ID:"),
-          contains("X-Pub-Environment: test-environment"),
-          isNot(contains("X-Pub-Reason")),
+          contains('X-Pub-OS: ${Platform.operatingSystem}'),
+          contains('X-Pub-Command: cache add'),
+          contains('X-Pub-Session-ID:'),
+          contains('X-Pub-Environment: test-environment'),
+          isNot(contains('X-Pub-Reason')),
         ]));
 
-    await d.cacheDir({"foo": "1.2.3"}).validate();
+    await d.cacheDir({'foo': '1.2.3'}).validate();
     await d.hostedCache([
-      d.nothing("foo-1.2.2"),
-      d.nothing("foo-2.0.0-dev"),
-      d.nothing("foo-2.0.0")
+      d.nothing('foo-1.2.2'),
+      d.nothing('foo-2.0.0-dev'),
+      d.nothing('foo-2.0.0')
     ]).validate();
   });
 }
diff --git a/test/cache/add/adds_latest_version_test.dart b/test/cache/add/adds_latest_version_test.dart
index 981ed9f..6e196f6 100644
--- a/test/cache/add/adds_latest_version_test.dart
+++ b/test/cache/add/adds_latest_version_test.dart
@@ -7,17 +7,17 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('adds the latest stable version of the package', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.2");
-      builder.serve("foo", "1.2.3");
-      builder.serve("foo", "1.2.4-dev");
+      builder.serve('foo', '1.2.2');
+      builder.serve('foo', '1.2.3');
+      builder.serve('foo', '1.2.4-dev');
     });
 
     await runPub(
-        args: ["cache", "add", "foo"], output: 'Downloading foo 1.2.3...');
+        args: ['cache', 'add', 'foo'], output: 'Downloading foo 1.2.3...');
 
-    await d.cacheDir({"foo": "1.2.3"}).validate();
+    await d.cacheDir({'foo': '1.2.3'}).validate();
   });
 }
diff --git a/test/cache/add/all_adds_all_matching_versions_test.dart b/test/cache/add/all_adds_all_matching_versions_test.dart
index 24e828e..9dfb3c7 100644
--- a/test/cache/add/all_adds_all_matching_versions_test.dart
+++ b/test/cache/add/all_adds_all_matching_versions_test.dart
@@ -7,24 +7,24 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('"--all" adds all matching versions of the package', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.2");
-      builder.serve("foo", "1.2.3-dev");
-      builder.serve("foo", "1.2.3");
-      builder.serve("foo", "2.0.0");
+      builder.serve('foo', '1.2.2');
+      builder.serve('foo', '1.2.3-dev');
+      builder.serve('foo', '1.2.3');
+      builder.serve('foo', '2.0.0');
     });
 
     await runPub(
-        args: ["cache", "add", "foo", "-v", ">=1.0.0 <2.0.0", "--all"],
+        args: ['cache', 'add', 'foo', '-v', '>=1.0.0 <2.0.0', '--all'],
         output: '''
           Downloading foo 1.2.2...
           Downloading foo 1.2.3-dev...
           Downloading foo 1.2.3...''');
 
-    await d.cacheDir({"foo": "1.2.2"}).validate();
-    await d.cacheDir({"foo": "1.2.3-dev"}).validate();
-    await d.cacheDir({"foo": "1.2.3"}).validate();
+    await d.cacheDir({'foo': '1.2.2'}).validate();
+    await d.cacheDir({'foo': '1.2.3-dev'}).validate();
+    await d.cacheDir({'foo': '1.2.3'}).validate();
   });
 }
diff --git a/test/cache/add/all_with_some_versions_present_test.dart b/test/cache/add/all_with_some_versions_present_test.dart
index b51e67c..861ac4c 100644
--- a/test/cache/add/all_with_some_versions_present_test.dart
+++ b/test/cache/add/all_with_some_versions_present_test.dart
@@ -7,34 +7,34 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('"--all" adds all non-installed versions of the package', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.1");
-      builder.serve("foo", "1.2.2");
-      builder.serve("foo", "1.2.3");
-      builder.serve("foo", "2.0.0");
+      builder.serve('foo', '1.2.1');
+      builder.serve('foo', '1.2.2');
+      builder.serve('foo', '1.2.3');
+      builder.serve('foo', '2.0.0');
     });
 
     // Install a couple of versions first.
     await runPub(
-        args: ["cache", "add", "foo", "-v", "1.2.1"],
+        args: ['cache', 'add', 'foo', '-v', '1.2.1'],
         output: 'Downloading foo 1.2.1...');
 
     await runPub(
-        args: ["cache", "add", "foo", "-v", "1.2.3"],
+        args: ['cache', 'add', 'foo', '-v', '1.2.3'],
         output: 'Downloading foo 1.2.3...');
 
     // They should show up as already installed now.
-    await runPub(args: ["cache", "add", "foo", "--all"], output: '''
+    await runPub(args: ['cache', 'add', 'foo', '--all'], output: '''
           Already cached foo 1.2.1.
           Downloading foo 1.2.2...
           Already cached foo 1.2.3.
           Downloading foo 2.0.0...''');
 
-    await d.cacheDir({"foo": "1.2.1"}).validate();
-    await d.cacheDir({"foo": "1.2.2"}).validate();
-    await d.cacheDir({"foo": "1.2.3"}).validate();
-    await d.cacheDir({"foo": "2.0.0"}).validate();
+    await d.cacheDir({'foo': '1.2.1'}).validate();
+    await d.cacheDir({'foo': '1.2.2'}).validate();
+    await d.cacheDir({'foo': '1.2.3'}).validate();
+    await d.cacheDir({'foo': '2.0.0'}).validate();
   });
 }
diff --git a/test/cache/add/already_cached_test.dart b/test/cache/add/already_cached_test.dart
index dfd1dd6..ac244dc 100644
--- a/test/cache/add/already_cached_test.dart
+++ b/test/cache/add/already_cached_test.dart
@@ -7,20 +7,20 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('does nothing if the package is already cached', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.3");
+      builder.serve('foo', '1.2.3');
     });
 
     // Run once to put it in the cache.
     await runPub(
-        args: ["cache", "add", "foo"], output: 'Downloading foo 1.2.3...');
+        args: ['cache', 'add', 'foo'], output: 'Downloading foo 1.2.3...');
 
     // Should be in the cache now.
     await runPub(
-        args: ["cache", "add", "foo"], output: 'Already cached foo 1.2.3.');
+        args: ['cache', 'add', 'foo'], output: 'Already cached foo 1.2.3.');
 
-    await d.cacheDir({"foo": "1.2.3"}).validate();
+    await d.cacheDir({'foo': '1.2.3'}).validate();
   });
 }
diff --git a/test/cache/add/bad_version_test.dart b/test/cache/add/bad_version_test.dart
index c30484a..1ed1a8f 100644
--- a/test/cache/add/bad_version_test.dart
+++ b/test/cache/add/bad_version_test.dart
@@ -8,9 +8,9 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if the version constraint cannot be parsed', () {
-    return runPub(args: ["cache", "add", "foo", "-v", "1.0"], error: """
+    return runPub(args: ['cache', 'add', 'foo', '-v', '1.0'], error: '''
             Could not parse version "1.0". Unknown text at "1.0".
             
             Usage: pub cache add <package> [--version <constraint>] [--all]
@@ -20,6 +20,6 @@
 
             Run "pub help" to see global options.
             See https://dart.dev/tools/pub/cmd/pub-cache for detailed documentation.
-            """, exitCode: exit_codes.USAGE);
+            ''', exitCode: exit_codes.USAGE);
   });
 }
diff --git a/test/cache/add/missing_package_arg_test.dart b/test/cache/add/missing_package_arg_test.dart
index ba3ee21..26c9389 100644
--- a/test/cache/add/missing_package_arg_test.dart
+++ b/test/cache/add/missing_package_arg_test.dart
@@ -8,9 +8,9 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if no package was given', () {
-    return runPub(args: ["cache", "add"], error: """
+    return runPub(args: ['cache', 'add'], error: '''
             No package to add given.
             
             Usage: pub cache add <package> [--version <constraint>] [--all]
@@ -20,6 +20,6 @@
 
             Run "pub help" to see global options.
             See https://dart.dev/tools/pub/cmd/pub-cache for detailed documentation.
-            """, exitCode: exit_codes.USAGE);
+            ''', exitCode: exit_codes.USAGE);
   });
 }
diff --git a/test/cache/add/no_matching_version_test.dart b/test/cache/add/no_matching_version_test.dart
index 89ed989..4b4455c 100644
--- a/test/cache/add/no_matching_version_test.dart
+++ b/test/cache/add/no_matching_version_test.dart
@@ -6,15 +6,15 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if no version matches the version constraint', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.2");
-      builder.serve("foo", "1.2.3");
+      builder.serve('foo', '1.2.2');
+      builder.serve('foo', '1.2.3');
     });
 
     await runPub(
-        args: ["cache", "add", "foo", "-v", ">2.0.0"],
+        args: ['cache', 'add', 'foo', '-v', '>2.0.0'],
         error: 'Package foo has no versions that match >2.0.0.',
         exitCode: 1);
   });
diff --git a/test/cache/add/package_not_found_test.dart b/test/cache/add/package_not_found_test.dart
index 188c19b..e92e036 100644
--- a/test/cache/add/package_not_found_test.dart
+++ b/test/cache/add/package_not_found_test.dart
@@ -8,14 +8,14 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if the package cound not be found on the source', () async {
     await serveNoPackages();
 
     await runPub(
-        args: ["cache", "add", "foo"],
+        args: ['cache', 'add', 'foo'],
         error: RegExp(r"Package doesn't exist \(could not find package foo at "
-            r"http://.*\)\."),
+            r'http://.*\)\.'),
         exitCode: exit_codes.UNAVAILABLE);
   });
 }
diff --git a/test/cache/add/unexpected_arguments_test.dart b/test/cache/add/unexpected_arguments_test.dart
index 5869209..542db71 100644
--- a/test/cache/add/unexpected_arguments_test.dart
+++ b/test/cache/add/unexpected_arguments_test.dart
@@ -8,9 +8,9 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if there are extra arguments', () {
-    return runPub(args: ["cache", "add", "foo", "bar", "baz"], error: """
+    return runPub(args: ['cache', 'add', 'foo', 'bar', 'baz'], error: '''
             Unexpected arguments "bar" and "baz".
             
             Usage: pub cache add <package> [--version <constraint>] [--all]
@@ -20,6 +20,6 @@
 
             Run "pub help" to see global options.
             See https://dart.dev/tools/pub/cmd/pub-cache for detailed documentation.
-            """, exitCode: exit_codes.USAGE);
+            ''', exitCode: exit_codes.USAGE);
   });
 }
diff --git a/test/cache/list_test.dart b/test/cache/list_test.dart
index 0738cc7..c255506 100644
--- a/test/cache/list_test.dart
+++ b/test/cache/list_test.dart
@@ -9,10 +9,10 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
-  hostedDir(package) {
+void main() {
+  String hostedDir(package) {
     return path.join(
-        d.sandbox, cachePath, "hosted", "pub.dartlang.org", package);
+        d.sandbox, cachePath, 'hosted', 'pub.dartlang.org', package);
   }
 
   test('running pub cache list when there is no cache', () async {
@@ -25,7 +25,7 @@
       d.dir('hosted', [d.dir('pub.dartlang.org', [])])
     ]).create();
 
-    await runPub(args: ['cache', 'list'], outputJson: {"packages": {}});
+    await runPub(args: ['cache', 'list'], outputJson: {'packages': {}});
   });
 
   test('running pub cache list', () async {
@@ -33,8 +33,8 @@
     await d.dir(cachePath, [
       d.dir('hosted', [
         d.dir('pub.dartlang.org', [
-          d.dir("foo-1.2.3", [d.libPubspec("foo", "1.2.3"), d.libDir("foo")]),
-          d.dir("bar-2.0.0", [d.libPubspec("bar", "2.0.0"), d.libDir("bar")])
+          d.dir('foo-1.2.3', [d.libPubspec('foo', '1.2.3'), d.libDir('foo')]),
+          d.dir('bar-2.0.0', [d.libPubspec('bar', '2.0.0'), d.libDir('bar')])
         ])
       ])
     ]).create();
@@ -43,12 +43,12 @@
       'cache',
       'list'
     ], outputJson: {
-      "packages": {
-        "bar": {
-          "2.0.0": {"location": hostedDir('bar-2.0.0')}
+      'packages': {
+        'bar': {
+          '2.0.0': {'location': hostedDir('bar-2.0.0')}
         },
-        "foo": {
-          "1.2.3": {"location": hostedDir('foo-1.2.3')}
+        'foo': {
+          '1.2.3': {'location': hostedDir('foo-1.2.3')}
         }
       }
     });
@@ -59,11 +59,11 @@
     await d.dir(cachePath, [
       d.dir('hosted', [
         d.dir('pub.dartlang.org', [
-          d.dir("foo-1.2.3", [
-            d.libPubspec("foo", "1.2.3", deps: {
-              "bar": {"bad": "bar"}
+          d.dir('foo-1.2.3', [
+            d.libPubspec('foo', '1.2.3', deps: {
+              'bar': {'bad': 'bar'}
             }),
-            d.libDir("foo")
+            d.libDir('foo')
           ])
         ])
       ])
@@ -73,9 +73,9 @@
       'cache',
       'list'
     ], outputJson: {
-      "packages": {
-        "foo": {
-          "1.2.3": {"location": hostedDir('foo-1.2.3')}
+      'packages': {
+        'foo': {
+          '1.2.3': {'location': hostedDir('foo-1.2.3')}
         }
       }
     });
diff --git a/test/cache/repair/empty_cache_test.dart b/test/cache/repair/empty_cache_test.dart
index 2393622..13d68cc 100644
--- a/test/cache/repair/empty_cache_test.dart
+++ b/test/cache/repair/empty_cache_test.dart
@@ -6,11 +6,11 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('does nothing if the cache is empty', () {
     // Repair them.
     return runPub(
-        args: ["cache", "repair"],
-        output: "No packages in cache, so nothing to repair.");
+        args: ['cache', 'repair'],
+        output: 'No packages in cache, so nothing to repair.');
   });
 }
diff --git a/test/cache/repair/git_test.dart b/test/cache/repair/git_test.dart
index bc5593e..1f54e3f 100644
--- a/test/cache/repair/git_test.dart
+++ b/test/cache/repair/git_test.dart
@@ -11,7 +11,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   group('root-level packages', () {
     setUp(() async {
       // Create two cached revisions of foo.
@@ -19,7 +19,7 @@
           'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
       await d.appDir({
-        "foo": {"git": "../foo.git"}
+        'foo': {'git': '../foo.git'}
       }).create();
       await pubGet();
 
@@ -31,18 +31,18 @@
 
     test('reinstalls previously cached git packages', () async {
       // Find the cached foo packages for each revision.
-      var gitCacheDir = path.join(d.sandbox, cachePath, "git");
+      var gitCacheDir = path.join(d.sandbox, cachePath, 'git');
       var fooDirs = listDir(gitCacheDir)
-          .where((dir) => path.basename(dir).startsWith("foo-"))
+          .where((dir) => path.basename(dir).startsWith('foo-'))
           .toList();
 
       // Delete "foo.dart" from them.
       for (var dir in fooDirs) {
-        deleteEntry(path.join(dir, "lib", "foo.dart"));
+        deleteEntry(path.join(dir, 'lib', 'foo.dart'));
       }
 
       // Repair them.
-      await runPub(args: ["cache", "repair"], output: '''
+      await runPub(args: ['cache', 'repair'], output: '''
           Resetting Git repository for foo 1.0.0...
           Resetting Git repository for foo 1.0.1...
           Reinstalled 2 packages.''');
@@ -51,25 +51,25 @@
       var fooLibs = fooDirs.map((dir) {
         var fooDirName = path.basename(dir);
         return d.dir(fooDirName, [
-          d.dir("lib", [d.file("foo.dart", 'main() => "foo";')])
+          d.dir('lib', [d.file('foo.dart', 'main() => "foo";')])
         ]);
       }).toList();
 
-      await d.dir(cachePath, [d.dir("git", fooLibs)]).validate();
+      await d.dir(cachePath, [d.dir('git', fooLibs)]).validate();
     });
 
     test('deletes packages without pubspecs', () async {
-      var gitCacheDir = path.join(d.sandbox, cachePath, "git");
+      var gitCacheDir = path.join(d.sandbox, cachePath, 'git');
       var fooDirs = listDir(gitCacheDir)
-          .where((dir) => path.basename(dir).startsWith("foo-"))
+          .where((dir) => path.basename(dir).startsWith('foo-'))
           .toList();
 
       for (var dir in fooDirs) {
-        deleteEntry(path.join(dir, "pubspec.yaml"));
+        deleteEntry(path.join(dir, 'pubspec.yaml'));
       }
 
       await runPub(
-          args: ["cache", "repair"],
+          args: ['cache', 'repair'],
           error: allOf([
             contains('Failed to load package:'),
             contains('Could not find a file named "pubspec.yaml" in '),
@@ -83,22 +83,22 @@
           exitCode: exit_codes.UNAVAILABLE);
 
       await d.dir(cachePath, [
-        d.dir("git", fooDirs.map((dir) => d.nothing(path.basename(dir))))
+        d.dir('git', fooDirs.map((dir) => d.nothing(path.basename(dir))))
       ]).validate();
     });
 
     test('deletes packages with invalid pubspecs', () async {
-      var gitCacheDir = path.join(d.sandbox, cachePath, "git");
+      var gitCacheDir = path.join(d.sandbox, cachePath, 'git');
       var fooDirs = listDir(gitCacheDir)
-          .where((dir) => path.basename(dir).startsWith("foo-"))
+          .where((dir) => path.basename(dir).startsWith('foo-'))
           .toList();
 
       for (var dir in fooDirs) {
-        writeTextFile(path.join(dir, "pubspec.yaml"), "{");
+        writeTextFile(path.join(dir, 'pubspec.yaml'), '{');
       }
 
       await runPub(
-          args: ["cache", "repair"],
+          args: ['cache', 'repair'],
           error: allOf([
             contains('Failed to load package:'),
             contains('Error on line 1, column 2 of '),
@@ -112,7 +112,7 @@
           exitCode: exit_codes.UNAVAILABLE);
 
       await d.dir(cachePath, [
-        d.dir("git", fooDirs.map((dir) => d.nothing(path.basename(dir))))
+        d.dir('git', fooDirs.map((dir) => d.nothing(path.basename(dir))))
       ]).validate();
     });
   });
@@ -125,8 +125,8 @@
       ]).create();
 
       await d.appDir({
-        "sub": {
-          "git": {"url": "../foo.git", "path": "subdir"}
+        'sub': {
+          'git': {'url': '../foo.git', 'path': 'subdir'}
         }
       }).create();
       await pubGet();
@@ -140,18 +140,18 @@
 
     test('reinstalls previously cached git packages', () async {
       // Find the cached foo packages for each revision.
-      var gitCacheDir = path.join(d.sandbox, cachePath, "git");
+      var gitCacheDir = path.join(d.sandbox, cachePath, 'git');
       var fooDirs = listDir(gitCacheDir)
-          .where((dir) => path.basename(dir).startsWith("foo-"))
+          .where((dir) => path.basename(dir).startsWith('foo-'))
           .toList();
 
       // Delete "sub.dart" from them.
       for (var dir in fooDirs) {
-        deleteEntry(path.join(dir, "subdir/lib/sub.dart"));
+        deleteEntry(path.join(dir, 'subdir/lib/sub.dart'));
       }
 
       // Repair them.
-      await runPub(args: ["cache", "repair"], output: '''
+      await runPub(args: ['cache', 'repair'], output: '''
           Resetting Git repository for sub 1.0.0...
           Resetting Git repository for sub 1.0.1...
           Reinstalled 2 packages.''');
@@ -160,27 +160,27 @@
       var fooLibs = fooDirs.map((dir) {
         var fooDirName = path.basename(dir);
         return d.dir(fooDirName, [
-          d.dir("subdir", [
-            d.dir("lib", [d.file("sub.dart", 'main() => "sub";')])
+          d.dir('subdir', [
+            d.dir('lib', [d.file('sub.dart', 'main() => "sub";')])
           ])
         ]);
       }).toList();
 
-      await d.dir(cachePath, [d.dir("git", fooLibs)]).validate();
+      await d.dir(cachePath, [d.dir('git', fooLibs)]).validate();
     });
 
     test('deletes packages without pubspecs', () async {
-      var gitCacheDir = path.join(d.sandbox, cachePath, "git");
+      var gitCacheDir = path.join(d.sandbox, cachePath, 'git');
       var fooDirs = listDir(gitCacheDir)
-          .where((dir) => path.basename(dir).startsWith("foo-"))
+          .where((dir) => path.basename(dir).startsWith('foo-'))
           .toList();
 
       for (var dir in fooDirs) {
-        deleteEntry(path.join(dir, "subdir", "pubspec.yaml"));
+        deleteEntry(path.join(dir, 'subdir', 'pubspec.yaml'));
       }
 
       await runPub(
-          args: ["cache", "repair"],
+          args: ['cache', 'repair'],
           error: allOf([
             contains('Failed to load package:'),
             contains('Could not find a file named "pubspec.yaml" in '),
@@ -195,7 +195,7 @@
           exitCode: exit_codes.UNAVAILABLE);
 
       await d.dir(cachePath, [
-        d.dir("git", fooDirs.map((dir) => d.nothing(path.basename(dir))))
+        d.dir('git', fooDirs.map((dir) => d.nothing(path.basename(dir))))
       ]).validate();
     });
   });
diff --git a/test/cache/repair/handles_corrupted_binstub_test.dart b/test/cache/repair/handles_corrupted_binstub_test.dart
index 4e3b3d3..9991ec1 100644
--- a/test/cache/repair/handles_corrupted_binstub_test.dart
+++ b/test/cache/repair/handles_corrupted_binstub_test.dart
@@ -7,22 +7,22 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('handles a corrupted binstub script', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("script.dart", "main(args) => print('ok');")])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.dir(cachePath, [
       d.dir('bin', [d.file(binStubName('script'), 'junk')])
     ]).create();
 
     await runPub(
-        args: ["cache", "repair"],
+        args: ['cache', 'repair'],
         error: contains('Error reading binstub for "script":'));
   });
 }
diff --git a/test/cache/repair/handles_corrupted_global_lockfile_test.dart b/test/cache/repair/handles_corrupted_global_lockfile_test.dart
index f45c22a..7819b0f 100644
--- a/test/cache/repair/handles_corrupted_global_lockfile_test.dart
+++ b/test/cache/repair/handles_corrupted_global_lockfile_test.dart
@@ -9,14 +9,14 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('handles a corrupted global lockfile', () async {
     await d.dir(cachePath, [
       d.dir('global_packages/foo', [d.file('pubspec.lock', 'junk')])
     ]).create();
 
     await runPub(
-        args: ["cache", "repair"],
+        args: ['cache', 'repair'],
         error: contains('Failed to reactivate foo:'),
         output: contains('Failed to reactivate 1 package:\n'
             '- foo'),
diff --git a/test/cache/repair/handles_failure_test.dart b/test/cache/repair/handles_failure_test.dart
index d750365..653ae2e 100644
--- a/test/cache/repair/handles_failure_test.dart
+++ b/test/cache/repair/handles_failure_test.dart
@@ -9,41 +9,41 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('handles failure to reinstall some packages', () async {
     // Only serve two packages so repairing will have a failure.
     await servePackages((builder) {
-      builder.serve("foo", "1.2.3");
-      builder.serve("foo", "1.2.5");
+      builder.serve('foo', '1.2.3');
+      builder.serve('foo', '1.2.5');
     });
 
     // Set up a cache with some packages.
     await d.dir(cachePath, [
       d.dir('hosted', [
         d.dir('localhost%58${globalServer.port}', [
-          d.dir("foo-1.2.3",
-              [d.libPubspec("foo", "1.2.3"), d.file("broken.txt")]),
-          d.dir("foo-1.2.4",
-              [d.libPubspec("foo", "1.2.4"), d.file("broken.txt")]),
+          d.dir('foo-1.2.3',
+              [d.libPubspec('foo', '1.2.3'), d.file('broken.txt')]),
+          d.dir('foo-1.2.4',
+              [d.libPubspec('foo', '1.2.4'), d.file('broken.txt')]),
           d.dir(
-              "foo-1.2.5", [d.libPubspec("foo", "1.2.5"), d.file("broken.txt")])
+              'foo-1.2.5', [d.libPubspec('foo', '1.2.5'), d.file('broken.txt')])
         ])
       ])
     ]).create();
 
     // Repair them.
-    var pub = await startPub(args: ["cache", "repair"]);
+    var pub = await startPub(args: ['cache', 'repair']);
 
-    expect(pub.stdout, emits("Downloading foo 1.2.3..."));
-    expect(pub.stdout, emits("Downloading foo 1.2.4..."));
-    expect(pub.stdout, emits("Downloading foo 1.2.5..."));
+    expect(pub.stdout, emits('Downloading foo 1.2.3...'));
+    expect(pub.stdout, emits('Downloading foo 1.2.4...'));
+    expect(pub.stdout, emits('Downloading foo 1.2.5...'));
 
-    expect(pub.stderr, emits(startsWith("Failed to repair foo 1.2.4. Error:")));
-    expect(pub.stderr, emits("HTTP error 404: Not Found"));
+    expect(pub.stderr, emits(startsWith('Failed to repair foo 1.2.4. Error:')));
+    expect(pub.stderr, emits('HTTP error 404: Not Found'));
 
-    expect(pub.stdout, emits("Reinstalled 2 packages."));
-    expect(pub.stdout, emits("Failed to reinstall 1 package:"));
-    expect(pub.stdout, emits("- foo 1.2.4"));
+    expect(pub.stdout, emits('Reinstalled 2 packages.'));
+    expect(pub.stdout, emits('Failed to reinstall 1 package:'));
+    expect(pub.stdout, emits('- foo 1.2.4'));
 
     await pub.shouldExit(exit_codes.UNAVAILABLE);
   });
diff --git a/test/cache/repair/handles_orphaned_binstub_test.dart b/test/cache/repair/handles_orphaned_binstub_test.dart
index 49589fd..9c4e74a 100644
--- a/test/cache/repair/handles_orphaned_binstub_test.dart
+++ b/test/cache/repair/handles_orphaned_binstub_test.dart
@@ -7,7 +7,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-const _ORPHANED_BINSTUB = """
+const _ORPHANED_BINSTUB = '''
 #!/usr/bin/env sh
 # This file was created by pub v0.1.2-3.
 # Package: foo
@@ -15,16 +15,16 @@
 # Executable: foo-script
 # Script: script
 dart "/path/to/.pub-cache/global_packages/foo/bin/script.dart.snapshot" "\$@"
-""";
+''';
 
-main() {
+void main() {
   test('handles an orphaned binstub script', () async {
     await d.dir(cachePath, [
       d.dir('bin', [d.file(binStubName('script'), _ORPHANED_BINSTUB)])
     ]).create();
 
     await runPub(
-        args: ["cache", "repair"],
+        args: ['cache', 'repair'],
         error: allOf([
           contains('Binstubs exist for non-activated packages:'),
           contains('From foo: foo-script')
diff --git a/test/cache/repair/hosted.dart b/test/cache/repair/hosted.dart
index c0f166c..de98d17 100644
--- a/test/cache/repair/hosted.dart
+++ b/test/cache/repair/hosted.dart
@@ -10,14 +10,14 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   setUp(() {
     return servePackages((builder) {
-      builder.serve("foo", "1.2.3");
-      builder.serve("foo", "1.2.4");
-      builder.serve("foo", "1.2.5");
-      builder.serve("bar", "1.2.3");
-      builder.serve("bar", "1.2.4");
+      builder.serve('foo', '1.2.3');
+      builder.serve('foo', '1.2.4');
+      builder.serve('foo', '1.2.5');
+      builder.serve('bar', '1.2.3');
+      builder.serve('bar', '1.2.4');
     });
   });
 
@@ -26,37 +26,37 @@
     await d.dir(cachePath, [
       d.dir('hosted', [
         d.dir('localhost%58${globalServer.port}', [
-          d.dir("foo-1.2.3",
-              [d.libPubspec("foo", "1.2.3"), d.file("broken.txt")]),
-          d.dir("foo-1.2.5",
-              [d.libPubspec("foo", "1.2.5"), d.file("broken.txt")]),
+          d.dir('foo-1.2.3',
+              [d.libPubspec('foo', '1.2.3'), d.file('broken.txt')]),
+          d.dir('foo-1.2.5',
+              [d.libPubspec('foo', '1.2.5'), d.file('broken.txt')]),
           d.dir(
-              "bar-1.2.4", [d.libPubspec("bar", "1.2.4"), d.file("broken.txt")])
+              'bar-1.2.4', [d.libPubspec('bar', '1.2.4'), d.file('broken.txt')])
         ])
       ])
     ]).create();
 
     // Repair them.
     await runPub(
-        args: ["cache", "repair"],
+        args: ['cache', 'repair'],
         output: '''
           Downloading bar 1.2.4...
           Downloading foo 1.2.3...
           Downloading foo 1.2.5...
           Reinstalled 3 packages.''',
         silent: allOf([
-          contains("X-Pub-OS: ${Platform.operatingSystem}"),
-          contains("X-Pub-Command: cache repair"),
-          contains("X-Pub-Session-ID:"),
-          contains("X-Pub-Environment: test-environment"),
-          isNot(contains("X-Pub-Reason")),
+          contains('X-Pub-OS: ${Platform.operatingSystem}'),
+          contains('X-Pub-Command: cache repair'),
+          contains('X-Pub-Session-ID:'),
+          contains('X-Pub-Environment: test-environment'),
+          isNot(contains('X-Pub-Reason')),
         ]));
 
     // The broken versions should have been replaced.
     await d.hostedCache([
-      d.dir("bar-1.2.4", [d.nothing("broken.txt")]),
-      d.dir("foo-1.2.3", [d.nothing("broken.txt")]),
-      d.dir("foo-1.2.5", [d.nothing("broken.txt")])
+      d.dir('bar-1.2.4', [d.nothing('broken.txt')]),
+      d.dir('foo-1.2.3', [d.nothing('broken.txt')]),
+      d.dir('foo-1.2.5', [d.nothing('broken.txt')])
     ]).validate();
   });
 
@@ -65,15 +65,15 @@
     await d.dir(cachePath, [
       d.dir('hosted', [
         d.dir('localhost%58${globalServer.port}', [
-          d.dir("bar-1.2.4", [d.file("broken.txt")]),
-          d.dir("foo-1.2.3", [d.file("broken.txt")]),
-          d.dir("foo-1.2.5", [d.file("broken.txt")]),
+          d.dir('bar-1.2.4', [d.file('broken.txt')]),
+          d.dir('foo-1.2.3', [d.file('broken.txt')]),
+          d.dir('foo-1.2.5', [d.file('broken.txt')]),
         ])
       ])
     ]).create();
 
     await runPub(
-        args: ["cache", "repair"],
+        args: ['cache', 'repair'],
         error: allOf([
           contains('Failed to load package:'),
           contains('Could not find a file named "pubspec.yaml" in '),
@@ -90,9 +90,9 @@
         exitCode: exit_codes.UNAVAILABLE);
 
     await d.hostedCache([
-      d.nothing("bar-1.2.4"),
-      d.nothing("foo-1.2.3"),
-      d.nothing("foo-1.2.5"),
+      d.nothing('bar-1.2.4'),
+      d.nothing('foo-1.2.3'),
+      d.nothing('foo-1.2.5'),
     ]).validate();
   });
 
@@ -101,15 +101,15 @@
     await d.dir(cachePath, [
       d.dir('hosted', [
         d.dir('localhost%58${globalServer.port}', [
-          d.dir("bar-1.2.4", [d.file("pubspec.yaml", "{")]),
-          d.dir("foo-1.2.3", [d.file("pubspec.yaml", "{")]),
-          d.dir("foo-1.2.5", [d.file("pubspec.yaml", "{")]),
+          d.dir('bar-1.2.4', [d.file('pubspec.yaml', '{')]),
+          d.dir('foo-1.2.3', [d.file('pubspec.yaml', '{')]),
+          d.dir('foo-1.2.5', [d.file('pubspec.yaml', '{')]),
         ])
       ])
     ]).create();
 
     await runPub(
-        args: ["cache", "repair"],
+        args: ['cache', 'repair'],
         error: allOf([
           contains('Failed to load package:'),
           contains('Error on line 1, column 2 of '),
@@ -126,9 +126,9 @@
         exitCode: exit_codes.UNAVAILABLE);
 
     await d.hostedCache([
-      d.nothing("bar-1.2.4"),
-      d.nothing("foo-1.2.3"),
-      d.nothing("foo-1.2.5"),
+      d.nothing('bar-1.2.4'),
+      d.nothing('foo-1.2.3'),
+      d.nothing('foo-1.2.5'),
     ]).validate();
   });
 }
diff --git a/test/cache/repair/recompiles_snapshots_test.dart b/test/cache/repair/recompiles_snapshots_test.dart
index 74c332a..225ee3d 100644
--- a/test/cache/repair/recompiles_snapshots_test.dart
+++ b/test/cache/repair/recompiles_snapshots_test.dart
@@ -7,21 +7,21 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('recompiles activated executable snapshots', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("script.dart", "main(args) => print('ok');")])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.dir(cachePath, [
       d.dir('global_packages/foo/bin', [d.file('script.dart.snapshot', 'junk')])
     ]).create();
 
-    await runPub(args: ["cache", "repair"], output: '''
+    await runPub(args: ['cache', 'repair'], output: '''
           Downloading foo 1.0.0...
           Reinstalled 1 package.
           Reactivating foo 1.0.0...
@@ -29,8 +29,8 @@
           Precompiled foo:script.
           Reactivated 1 package.''');
 
-    var pub = await pubRun(global: true, args: ["foo:script"]);
-    expect(pub.stdout, emits("ok"));
+    var pub = await pubRun(global: true, args: ['foo:script']);
+    expect(pub.stdout, emits('ok'));
     await pub.shouldExit();
   });
 }
diff --git a/test/cache/repair/updates_binstubs_test.dart b/test/cache/repair/updates_binstubs_test.dart
index 9791262..20ad027 100644
--- a/test/cache/repair/updates_binstubs_test.dart
+++ b/test/cache/repair/updates_binstubs_test.dart
@@ -7,7 +7,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-const _OUTDATED_BINSTUB = """
+const _OUTDATED_BINSTUB = '''
 #!/usr/bin/env sh
 # This file was created by pub v0.1.2-3.
 # Package: foo
@@ -15,27 +15,27 @@
 # Executable: foo-script
 # Script: script
 dart "/path/to/.pub-cache/global_packages/foo/bin/script.dart.snapshot" "\$@"
-""";
+''';
 
-main() {
+void main() {
   test('updates an outdated binstub script', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "executables": {"foo-script": "script"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'executables': {'foo-script': 'script'}
       }, contents: [
         d.dir(
-            "bin", [d.file("script.dart", "main(args) => print('ok \$args');")])
+            'bin', [d.file('script.dart', "main(args) => print('ok \$args');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.dir(cachePath, [
       d.dir('bin', [d.file(binStubName('foo-script'), _OUTDATED_BINSTUB)])
     ]).create();
 
     // Repair them.
-    await runPub(args: ["cache", "repair"], output: '''
+    await runPub(args: ['cache', 'repair'], output: '''
           Downloading foo 1.0.0...
           Reinstalled 1 package.
           Reactivating foo 1.0.0...
diff --git a/test/dependency_override_test.dart b/test/dependency_override_test.dart
index 965101a..511cf31 100644
--- a/test/dependency_override_test.dart
+++ b/test/dependency_override_test.dart
@@ -9,118 +9,118 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
-    test("chooses best version matching override constraint", () async {
+    test('chooses best version matching override constraint', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.0.0");
-        builder.serve("foo", "2.0.0");
-        builder.serve("foo", "3.0.0");
+        builder.serve('foo', '1.0.0');
+        builder.serve('foo', '2.0.0');
+        builder.serve('foo', '3.0.0');
       });
 
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dependencies": {"foo": ">2.0.0"},
-          "dependency_overrides": {"foo": "<3.0.0"}
+          'name': 'myapp',
+          'dependencies': {'foo': '>2.0.0'},
+          'dependency_overrides': {'foo': '<3.0.0'}
         })
       ]).create();
 
       await pubCommand(command);
 
-      await d.appPackagesFile({"foo": "2.0.0"}).validate();
+      await d.appPackagesFile({'foo': '2.0.0'}).validate();
     });
 
-    test("treats override as implicit dependency", () async {
+    test('treats override as implicit dependency', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.0.0");
+        builder.serve('foo', '1.0.0');
       });
 
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dependency_overrides": {"foo": "any"}
+          'name': 'myapp',
+          'dependency_overrides': {'foo': 'any'}
         })
       ]).create();
 
       await pubCommand(command);
 
-      await d.appPackagesFile({"foo": "1.0.0"}).validate();
+      await d.appPackagesFile({'foo': '1.0.0'}).validate();
     });
 
-    test("ignores other constraints on overridden package", () async {
+    test('ignores other constraints on overridden package', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.0.0");
-        builder.serve("foo", "2.0.0");
-        builder.serve("foo", "3.0.0");
-        builder.serve("bar", "1.0.0", pubspec: {
-          "dependencies": {"foo": "5.0.0-nonexistent"}
+        builder.serve('foo', '1.0.0');
+        builder.serve('foo', '2.0.0');
+        builder.serve('foo', '3.0.0');
+        builder.serve('bar', '1.0.0', pubspec: {
+          'dependencies': {'foo': '5.0.0-nonexistent'}
         });
       });
 
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dependencies": {"bar": "any"},
-          "dependency_overrides": {"foo": "<3.0.0"}
+          'name': 'myapp',
+          'dependencies': {'bar': 'any'},
+          'dependency_overrides': {'foo': '<3.0.0'}
         })
       ]).create();
 
       await pubCommand(command);
 
-      await d.appPackagesFile({"foo": "2.0.0", "bar": "1.0.0"}).validate();
+      await d.appPackagesFile({'foo': '2.0.0', 'bar': '1.0.0'}).validate();
     });
 
-    test("ignores SDK constraints", () async {
+    test('ignores SDK constraints', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.0.0", pubspec: {
-          "environment": {"sdk": "5.6.7-fblthp"}
+        builder.serve('foo', '1.0.0', pubspec: {
+          'environment': {'sdk': '5.6.7-fblthp'}
         });
       });
 
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dependency_overrides": {"foo": "any"}
+          'name': 'myapp',
+          'dependency_overrides': {'foo': 'any'}
         })
       ]).create();
 
       await pubCommand(command);
 
-      await d.appPackagesFile({"foo": "1.0.0"}).validate();
+      await d.appPackagesFile({'foo': '1.0.0'}).validate();
     });
 
-    test("warns about overridden dependencies", () async {
+    test('warns about overridden dependencies', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.0.0");
-        builder.serve("bar", "1.0.0");
+        builder.serve('foo', '1.0.0');
+        builder.serve('bar', '1.0.0');
       });
 
       await d
-          .dir("baz", [d.libDir("baz"), d.libPubspec("baz", "0.0.1")]).create();
+          .dir('baz', [d.libDir('baz'), d.libPubspec('baz', '0.0.1')]).create();
 
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dependency_overrides": {
-            "foo": "any",
-            "bar": "any",
-            "baz": {"path": "../baz"}
+          'name': 'myapp',
+          'dependency_overrides': {
+            'foo': 'any',
+            'bar': 'any',
+            'baz': {'path': '../baz'}
           }
         })
       ]).create();
 
-      var bazPath = path.join("..", "baz");
+      var bazPath = path.join('..', 'baz');
 
       await runPub(
           args: [command.name],
           output: command.success,
-          error: """
+          error: '''
           Warning: You are using these overridden dependencies:
           ! bar 1.0.0
           ! baz 0.0.1 from path $bazPath
           ! foo 1.0.0
-          """);
+          ''');
     });
   });
 }
diff --git a/test/deps/executables_test.dart b/test/deps/executables_test.dart
index 5d65842..933189f 100644
--- a/test/deps/executables_test.dart
+++ b/test/deps/executables_test.dart
@@ -9,28 +9,30 @@
 
 const _validMain = 'main() {}';
 
-main() {
-  _testExecutablesOutput(output, {bool dev = true}) => () async {
+void main() {
+  Future<void> Function() _testExecutablesOutput(output, {bool dev = true}) =>
+      () async {
         await pubGet();
         await runPub(
-            args: ['deps', '--executables']
-              ..addAll(dev ? ['--dev'] : ['--no-dev']),
+            args: ['deps', '--executables', if (dev) '--dev' else '--no-dev'],
             output: output);
       };
 
-  _testAllDepsOutput(output) => _testExecutablesOutput(output);
-  _testNonDevDepsOutput(output) => _testExecutablesOutput(output, dev: false);
+  Future<void> Function() _testAllDepsOutput(output) =>
+      _testExecutablesOutput(output);
+  Future<void> Function() _testNonDevDepsOutput(output) =>
+      _testExecutablesOutput(output, dev: false);
 
-  group("lists nothing when no executables found", () {
+  group('lists nothing when no executables found', () {
     setUp(() async {
       await d.dir(appPath, [d.appPubspec()]).create();
     });
 
-    test("all dependencies", _testAllDepsOutput('\n'));
-    test("non-dev dependencies", _testNonDevDepsOutput('\n'));
+    test('all dependencies', _testAllDepsOutput('\n'));
+    test('non-dev dependencies', _testNonDevDepsOutput('\n'));
   });
 
-  group("skips non-Dart executables", () {
+  group('skips non-Dart executables', () {
     setUp(() async {
       await d.dir(appPath, [
         d.appPubspec(),
@@ -38,11 +40,11 @@
       ]).create();
     });
 
-    test("all dependencies", _testAllDepsOutput('\n'));
-    test("non-dev dependencies", _testNonDevDepsOutput('\n'));
+    test('all dependencies', _testAllDepsOutput('\n'));
+    test('non-dev dependencies', _testNonDevDepsOutput('\n'));
   });
 
-  group("skips Dart executables which are not parsable", () {
+  group('skips Dart executables which are not parsable', () {
     setUp(() async {
       await d.dir(appPath, [
         d.appPubspec(),
@@ -50,11 +52,11 @@
       ]).create();
     });
 
-    test("all dependencies", _testAllDepsOutput('\n'));
-    test("non-dev dependencies", _testNonDevDepsOutput('\n'));
+    test('all dependencies', _testAllDepsOutput('\n'));
+    test('non-dev dependencies', _testNonDevDepsOutput('\n'));
   });
 
-  group("skips Dart executables without entrypoints", () {
+  group('skips Dart executables without entrypoints', () {
     setUp(() async {
       await d.dir(appPath, [
         d.appPubspec(),
@@ -63,11 +65,11 @@
       ]).create();
     });
 
-    test("all dependencies", _testAllDepsOutput('\n'));
-    test("non-dev dependencies", _testNonDevDepsOutput('\n'));
+    test('all dependencies', _testAllDepsOutput('\n'));
+    test('non-dev dependencies', _testNonDevDepsOutput('\n'));
   });
 
-  group("lists valid Dart executables with entrypoints", () {
+  group('lists valid Dart executables with entrypoints', () {
     setUp(() async {
       await d.dir(appPath, [
         d.appPubspec(),
@@ -76,11 +78,11 @@
       ]).create();
     });
 
-    test("all dependencies", _testAllDepsOutput('myapp: bar, foo'));
-    test("non-dev dependencies", _testNonDevDepsOutput('myapp: bar, foo'));
+    test('all dependencies', _testAllDepsOutput('myapp: bar, foo'));
+    test('non-dev dependencies', _testNonDevDepsOutput('myapp: bar, foo'));
   });
 
-  group("skips executables in sub directories", () {
+  group('skips executables in sub directories', () {
     setUp(() async {
       await d.dir(appPath, [
         d.appPubspec(),
@@ -91,11 +93,11 @@
       ]).create();
     });
 
-    test("all dependencies", _testAllDepsOutput('myapp:foo'));
-    test("non-dev dependencies", _testNonDevDepsOutput('myapp:foo'));
+    test('all dependencies', _testAllDepsOutput('myapp:foo'));
+    test('non-dev dependencies', _testNonDevDepsOutput('myapp:foo'));
   });
 
-  group("lists executables from a dependency", () {
+  group('lists executables from a dependency', () {
     setUp(() async {
       await d.dir('foo', [
         d.libPubspec('foo', '1.0.0'),
@@ -109,11 +111,11 @@
       ]).create();
     });
 
-    test("all dependencies", _testAllDepsOutput('foo:bar'));
-    test("non-dev dependencies", _testNonDevDepsOutput('foo:bar'));
+    test('all dependencies', _testAllDepsOutput('foo:bar'));
+    test('non-dev dependencies', _testNonDevDepsOutput('foo:bar'));
   });
 
-  group("lists executables only from immediate dependencies", () {
+  group('lists executables only from immediate dependencies', () {
     setUp(() async {
       await d.dir(appPath, [
         d.appPubspec({
@@ -134,11 +136,11 @@
       ]).create();
     });
 
-    test("all dependencies", _testAllDepsOutput('foo:bar'));
-    test("non-dev dependencies", _testNonDevDepsOutput('foo:bar'));
+    test('all dependencies', _testAllDepsOutput('foo:bar'));
+    test('non-dev dependencies', _testNonDevDepsOutput('foo:bar'));
   });
 
-  group("applies formatting before printing executables", () {
+  group('applies formatting before printing executables', () {
     setUp(() async {
       await d.dir(appPath, [
         d.appPubspec({
@@ -160,17 +162,17 @@
       ]).create();
     });
 
-    test("all dependencies", _testAllDepsOutput('''
+    test('all dependencies', _testAllDepsOutput('''
         myapp
         foo: foo, baz
         bar:qux'''));
-    test("non-dev dependencies", _testNonDevDepsOutput('''
+    test('non-dev dependencies', _testNonDevDepsOutput('''
         myapp
         foo: foo, baz
         bar:qux'''));
   });
 
-  group("dev dependencies", () {
+  group('dev dependencies', () {
     setUp(() async {
       await d.dir('foo', [
         d.libPubspec('foo', '1.0.0'),
@@ -187,11 +189,11 @@
       ]).create();
     });
 
-    test("are listed if --dev flag is set", _testAllDepsOutput('foo:bar'));
-    test("are skipped if --no-dev flag is set", _testNonDevDepsOutput('\n'));
+    test('are listed if --dev flag is set', _testAllDepsOutput('foo:bar'));
+    test('are skipped if --no-dev flag is set', _testNonDevDepsOutput('\n'));
   });
 
-  group("overriden dependencies executables", () {
+  group('overriden dependencies executables', () {
     setUp(() async {
       await d.dir('foo-1.0', [
         d.libPubspec('foo', '1.0.0'),
diff --git a/test/deps_test.dart b/test/deps_test.dart
index 65e2c37..d1ab44d 100644
--- a/test/deps_test.dart
+++ b/test/deps_test.dart
@@ -8,43 +8,43 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   setUp(() async {
     await servePackages((builder) {
-      builder.serve("normal", "1.2.3",
-          deps: {"transitive": "any", "circular_a": "any"});
-      builder.serve("transitive", "1.2.3", deps: {"shared": "any"});
-      builder.serve("shared", "1.2.3", deps: {"other": "any"});
-      builder.serve("dev_only", "1.2.3");
-      builder.serve("unittest", "1.2.3",
-          deps: {"shared": "any", "dev_only": "any"});
-      builder.serve("other", "1.0.0", deps: {"myapp": "any"});
-      builder.serve("overridden", "1.0.0");
-      builder.serve("overridden", "2.0.0");
-      builder.serve("override_only", "1.2.3");
-      builder.serve("circular_a", "1.2.3", deps: {"circular_b": "any"});
-      builder.serve("circular_b", "1.2.3", deps: {"circular_a": "any"});
+      builder.serve('normal', '1.2.3',
+          deps: {'transitive': 'any', 'circular_a': 'any'});
+      builder.serve('transitive', '1.2.3', deps: {'shared': 'any'});
+      builder.serve('shared', '1.2.3', deps: {'other': 'any'});
+      builder.serve('dev_only', '1.2.3');
+      builder.serve('unittest', '1.2.3',
+          deps: {'shared': 'any', 'dev_only': 'any'});
+      builder.serve('other', '1.0.0', deps: {'myapp': 'any'});
+      builder.serve('overridden', '1.0.0');
+      builder.serve('overridden', '2.0.0');
+      builder.serve('override_only', '1.2.3');
+      builder.serve('circular_a', '1.2.3', deps: {'circular_b': 'any'});
+      builder.serve('circular_b', '1.2.3', deps: {'circular_a': 'any'});
     });
 
-    await d.dir("from_path",
-        [d.libDir("from_path"), d.libPubspec("from_path", "1.2.3")]).create();
+    await d.dir('from_path',
+        [d.libDir('from_path'), d.libPubspec('from_path', '1.2.3')]).create();
 
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dependencies": {
-          "normal": "any",
-          "overridden": "1.0.0",
-          "from_path": {"path": "../from_path"}
+        'name': 'myapp',
+        'dependencies': {
+          'normal': 'any',
+          'overridden': '1.0.0',
+          'from_path': {'path': '../from_path'}
         },
-        "dev_dependencies": {"unittest": "any"},
-        "dependency_overrides": {"overridden": "2.0.0", "override_only": "any"}
+        'dev_dependencies': {'unittest': 'any'},
+        'dependency_overrides': {'overridden': '2.0.0', 'override_only': 'any'}
       })
     ]).create();
   });
 
-  group("lists all dependencies", () {
-    test("in compact form", () async {
+  group('lists all dependencies', () {
+    test('in compact form', () async {
       await pubGet();
       await runPub(args: ['deps', '-s', 'compact'], output: '''
           Dart SDK 0.1.2+3
@@ -72,7 +72,7 @@
           ''');
     });
 
-    test("in list form", () async {
+    test('in list form', () async {
       await pubGet();
       await runPub(args: ['deps', '--style', 'list'], output: '''
           Dart SDK 0.1.2+3
@@ -109,7 +109,7 @@
           ''');
     });
 
-    test("in tree form", () async {
+    test('in tree form', () async {
       await pubGet();
       await runPub(args: ['deps'], output: '''
           Dart SDK 0.1.2+3
@@ -131,29 +131,29 @@
           ''');
     });
 
-    test("with the Flutter SDK, if applicable", () async {
+    test('with the Flutter SDK, if applicable', () async {
       await pubGet();
 
       await d.dir('flutter', [d.file('version', '4.3.2+1')]).create();
       await runPub(
           args: ['deps'],
           output: contains('Flutter SDK 4.3.2+1'),
-          environment: {"FLUTTER_ROOT": p.join(d.sandbox, 'flutter')});
+          environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')});
     });
 
-    test("with the Fuchsia SDK, if applicable", () async {
+    test('with the Fuchsia SDK, if applicable', () async {
       await pubGet();
 
       await d.dir('fuchsia', [d.file('version', '4.3.2+1')]).create();
       await runPub(
           args: ['deps'],
           output: contains('Fuchsia SDK 4.3.2+1'),
-          environment: {"FUCHSIA_DART_SDK_ROOT": p.join(d.sandbox, 'fuchsia')});
+          environment: {'FUCHSIA_DART_SDK_ROOT': p.join(d.sandbox, 'fuchsia')});
     });
   });
 
-  group("lists non-dev dependencies", () {
-    test("in compact form", () async {
+  group('lists non-dev dependencies', () {
+    test('in compact form', () async {
       await pubGet();
       await runPub(args: ['deps', '-s', 'compact', '--no-dev'], output: '''
           Dart SDK 0.1.2+3
@@ -177,7 +177,7 @@
           ''');
     });
 
-    test("in list form", () async {
+    test('in list form', () async {
       await pubGet();
       await runPub(args: ['deps', '--style', 'list', '--no-dev'], output: '''
           Dart SDK 0.1.2+3
@@ -208,7 +208,7 @@
           ''');
     });
 
-    test("in tree form", () async {
+    test('in tree form', () async {
       await pubGet();
       await runPub(args: ['deps', '--no-dev'], output: '''
           Dart SDK 0.1.2+3
diff --git a/test/descriptor.dart b/test/descriptor.dart
index 271fa2d..47438da 100644
--- a/test/descriptor.dart
+++ b/test/descriptor.dart
@@ -23,18 +23,18 @@
 
 /// Creates a new [GitRepoDescriptor] with [name] and [contents].
 GitRepoDescriptor git(String name, [Iterable<Descriptor> contents]) =>
-    GitRepoDescriptor(name, contents == null ? <Descriptor>[] : contents);
+    GitRepoDescriptor(name, contents ?? <Descriptor>[]);
 
 /// Creates a new [TarFileDescriptor] with [name] and [contents].
 TarFileDescriptor tar(String name, [Iterable<Descriptor> contents]) =>
-    TarFileDescriptor(name, contents == null ? <Descriptor>[] : contents);
+    TarFileDescriptor(name, contents ?? <Descriptor>[]);
 
 /// Describes a package that passes all validation.
 Descriptor get validPackage => dir(appPath, [
-      libPubspec("test_pkg", "1.0.0", sdk: '>=1.8.0 <=2.0.0'),
-      file("LICENSE", "Eh, do what you want."),
-      file("README.md", "This package isn't real."),
-      dir("lib", [file("test_pkg.dart", "int i = 1;")])
+      libPubspec('test_pkg', '1.0.0', sdk: '>=1.8.0 <=2.0.0'),
+      file('LICENSE', 'Eh, do what you want.'),
+      file('README.md', "This package isn't real."),
+      dir('lib', [file('test_pkg.dart', 'int i = 1;')])
     ]);
 
 /// Returns a descriptor of a snapshot that can't be run by the current VM.
@@ -49,13 +49,13 @@
 /// [contents] may contain [Future]s that resolve to serializable objects,
 /// which may in turn contain [Future]s recursively.
 Descriptor pubspec(Map<String, Object> contents) =>
-    file("pubspec.yaml", yaml(contents));
+    file('pubspec.yaml', yaml(contents));
 
 /// Describes a file named `pubspec.yaml` for an application package with the
 /// given [dependencies].
 Descriptor appPubspec([Map dependencies]) {
-  var map = <String, dynamic>{"name": "myapp"};
-  if (dependencies != null) map["dependencies"] = dependencies;
+  var map = <String, dynamic>{'name': 'myapp'};
+  if (dependencies != null) map['dependencies'] = dependencies;
   return pubspec(map);
 }
 
@@ -65,7 +65,7 @@
 Descriptor libPubspec(String name, String version,
     {Map deps, Map devDeps, String sdk}) {
   var map = packageMap(name, version, deps, devDeps);
-  if (sdk != null) map["environment"] = {"sdk": sdk};
+  if (sdk != null) map['environment'] = {'sdk': sdk};
   return pubspec(map);
 }
 
@@ -74,7 +74,7 @@
 Descriptor libDir(String name, [String code]) {
   // Default to printing the name if no other code was given.
   code ??= name;
-  return dir("lib", [file("$name.dart", 'main() => "$code";')]);
+  return dir('lib', [file('$name.dart', 'main() => "$code";')]);
 }
 
 /// Describes a directory whose name ends with a hyphen followed by an
@@ -86,7 +86,7 @@
 /// found in the revision cache of the global package cache.
 Descriptor gitPackageRevisionCacheDir(String name, [int modifier]) {
   var value = name;
-  if (modifier != null) value = "$name $modifier";
+  if (modifier != null) value = '$name $modifier';
   return hashDir(name, [libDir(name, value)]);
 }
 
@@ -119,7 +119,7 @@
       if (includePubspecs) {
         packageContents.add(libPubspec(name, version));
       }
-      contents.add(dir("$name-$version", packageContents));
+      contents.add(dir('$name-$version', packageContents));
     }
   });
 
@@ -222,6 +222,6 @@
 /// implicit entry for the app itself.
 Descriptor appPackagesFile(Map<String, String> dependencies) {
   var copied = Map<String, String>.from(dependencies);
-  copied["myapp"] = ".";
+  copied['myapp'] = '.';
   return dir(appPath, [packagesFile(copied)]);
 }
diff --git a/test/descriptor/git.dart b/test/descriptor/git.dart
index 640f8e5..b3fe8d6 100644
--- a/test/descriptor/git.dart
+++ b/test/descriptor/git.dart
@@ -14,6 +14,7 @@
       : super(name, contents);
 
   /// Creates the Git repository and commits the contents.
+  @override
   Future create([String parent]) async {
     await super.create(parent);
     await _runGitCommands(parent, [
diff --git a/test/descriptor/packages.dart b/test/descriptor/packages.dart
index b7b3385..8ba6157 100644
--- a/test/descriptor/packages.dart
+++ b/test/descriptor/packages.dart
@@ -2,9 +2,9 @@
 // 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.
 
-import "dart:async" show Future;
-import "dart:convert" show JsonEncoder, json, utf8;
-import "dart:io" show File;
+import 'dart:async' show Future;
+import 'dart:convert' show JsonEncoder, json, utf8;
+import 'dart:io' show File;
 
 import 'package:package_config/packages_file.dart' as packages_file;
 import 'package:path/path.dart' as p;
@@ -18,7 +18,7 @@
 // Resolve against a dummy URL so that we can test whether the URLs in
 // the package file are themselves relative. We can't resolve against just
 // "." due to sdk#23809.
-final _base = "/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p";
+final _base = '/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p';
 
 /// Describes a `.packages` file and its contents.
 class PackagesFileDescriptor extends Descriptor {
@@ -31,6 +31,7 @@
   /// are located on disk.
   PackagesFileDescriptor([this._dependencies]) : super('.packages');
 
+  @override
   Future create([String parent]) {
     var contents = const <int>[];
     if (_dependencies != null) {
@@ -39,13 +40,13 @@
         String packagePath;
         if (_isSemver(version)) {
           // It's a cache reference.
-          packagePath = p.join(cachePath, "$package-$version");
+          packagePath = p.join(cachePath, '$package-$version');
         } else {
           // Otherwise it's a path relative to the pubspec file,
           // which is also relative to the .packages file.
           packagePath = p.fromUri(version);
         }
-        mapping[package] = p.toUri(p.join(packagePath, "lib", ""));
+        mapping[package] = p.toUri(p.join(packagePath, 'lib', ''));
       });
       var buffer = StringBuffer();
       packages_file.write(buffer, mapping);
@@ -54,6 +55,7 @@
     return File(p.join(parent ?? sandbox, name)).writeAsBytes(contents);
   }
 
+  @override
   Future validate([String parent]) async {
     var fullPath = p.join(parent ?? sandbox, name);
     if (!await File(fullPath).exists()) {
@@ -66,14 +68,14 @@
 
     for (var package in _dependencies.keys) {
       if (!map.containsKey(package)) {
-        fail(".packages does not contain $package entry");
+        fail('.packages does not contain $package entry');
       }
 
       var description = _dependencies[package];
       if (_isSemver(description)) {
         if (!map[package].path.contains(description)) {
-          fail(".packages of $package has incorrect version. "
-              "Expected $description, found location: ${map[package]}.");
+          fail('.packages of $package has incorrect version. '
+              'Expected $description, found location: ${map[package]}.');
         }
       } else {
         var expected = p.normalize(p.join(p.fromUri(description), 'lib'));
@@ -81,7 +83,7 @@
             p.url.relative(map[package].toString(), from: p.dirname(_base))));
 
         if (expected != actual) {
-          fail("Relative path: Expected $expected, found $actual");
+          fail('Relative path: Expected $expected, found $actual');
         }
       }
     }
@@ -89,12 +91,13 @@
     if (map.length != _dependencies.length) {
       for (var key in map.keys) {
         if (!_dependencies.containsKey(key)) {
-          fail(".packages file contains unexpected entry: $key");
+          fail('.packages file contains unexpected entry: $key');
         }
       }
     }
   }
 
+  @override
   String describe() => name;
 }
 
@@ -120,6 +123,7 @@
   PackageConfigFileDescriptor(this._packages)
       : super('.dart_tool/package_config.json');
 
+  @override
   Future<void> create([String parent]) async {
     final packageConfigFile = File(p.join(parent ?? sandbox, name));
     await packageConfigFile.parent.create();
@@ -128,6 +132,7 @@
     );
   }
 
+  @override
   Future<void> validate([String parent]) async {
     final packageConfigFile = p.join(parent ?? sandbox, name);
     if (!await File(packageConfigFile).exists()) {
@@ -162,6 +167,7 @@
         reason: '"$packageConfigFile" does not match expected values');
   }
 
+  @override
   String describe() => name;
 }
 
diff --git a/test/descriptor/tar.dart b/test/descriptor/tar.dart
index f11eb8a..2b2e321 100644
--- a/test/descriptor/tar.dart
+++ b/test/descriptor/tar.dart
@@ -20,6 +20,7 @@
 
   /// Creates the files and directories within this tar file, then archives
   /// them, compresses them, and saves the result to [parentDir].
+  @override
   Future create([String parent]) {
     return withTempDir((tempDir) async {
       await Future.wait(contents.map((entry) => entry.create(tempDir)));
@@ -37,13 +38,16 @@
 
   /// Validates that the `.tar.gz` file at [path] contains the expected
   /// contents.
+  @override
   Future validate([String parent]) {
-    throw UnimplementedError("TODO(nweiz): implement this");
+    throw UnimplementedError('TODO(nweiz): implement this');
   }
 
+  @override
   Future<String> read() =>
-      throw UnsupportedError("TarFileDescriptor.read() is not supported.");
+      throw UnsupportedError('TarFileDescriptor.read() is not supported.');
 
+  @override
   Stream<List<int>> readAsBytes() {
     return Stream<List<int>>.fromFuture(withTempDir((tempDir) async {
       await create(tempDir);
@@ -54,11 +58,11 @@
 
 /// Creates [file] and writes [contents] to it.
 String _writeBinaryFile(String file, List<int> contents) {
-  log.io("Writing ${contents.length} bytes to binary file $file.");
+  log.io('Writing ${contents.length} bytes to binary file $file.');
   deleteIfLink(file);
   File(file).openSync(mode: FileMode.write)
     ..writeFromSync(contents)
     ..closeSync();
-  log.fine("Wrote text file $file.");
+  log.fine('Wrote text file $file.');
   return file;
 }
diff --git a/test/descriptor_server.dart b/test/descriptor_server.dart
index ab6b130..d14dbed 100644
--- a/test/descriptor_server.dart
+++ b/test/descriptor_server.dart
@@ -76,7 +76,7 @@
       DescriptorServer._errors(await shelf_io.IOServer.bind('localhost', 0));
 
   DescriptorServer._(this._server, Iterable<d.Descriptor> contents)
-      : _baseDir = d.dir("serve-dir", contents) {
+      : _baseDir = d.dir('serve-dir', contents) {
     _server.mount((request) async {
       var path = p.posix.fromUri(request.url.path);
       requestedPaths.add(path);
@@ -91,10 +91,10 @@
     addTearDown(_server.close);
   }
 
-  DescriptorServer._errors(this._server) : _baseDir = d.dir("serve-dir", []) {
+  DescriptorServer._errors(this._server) : _baseDir = d.dir('serve-dir', []) {
     _server.mount((request) {
-      fail("The HTTP server received an unexpected request:\n"
-          "${request.method} ${request.requestedUri}");
+      fail('The HTTP server received an unexpected request:\n'
+          '${request.method} ${request.requestedUri}');
     });
     addTearDown(_server.close);
   }
diff --git a/test/dev_dependency_test.dart b/test/dev_dependency_test.dart
index 2f2aff6..88f321b 100644
--- a/test/dev_dependency_test.dart
+++ b/test/dev_dependency_test.dart
@@ -7,7 +7,7 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   test("includes root package's dev dependencies", () async {
     await d
         .dir('foo', [d.libDir('foo'), d.libPubspec('foo', '0.0.1')]).create();
@@ -17,24 +17,24 @@
 
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dev_dependencies": {
-          "foo": {"path": "../foo"},
-          "bar": {"path": "../bar"},
+        'name': 'myapp',
+        'dev_dependencies': {
+          'foo': {'path': '../foo'},
+          'bar': {'path': '../bar'},
         }
       })
     ]).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "../foo", "bar": "../bar"}).validate();
+    await d.appPackagesFile({'foo': '../foo', 'bar': '../bar'}).validate();
   });
 
   test("includes dev dependency's transitive dependencies", () async {
     await d.dir('foo', [
       d.libDir('foo'),
       d.libPubspec('foo', '0.0.1', deps: {
-        "bar": {"path": "../bar"}
+        'bar': {'path': '../bar'}
       })
     ]).create();
 
@@ -43,26 +43,26 @@
 
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dev_dependencies": {
-          "foo": {"path": "../foo"}
+        'name': 'myapp',
+        'dev_dependencies': {
+          'foo': {'path': '../foo'}
         }
       })
     ]).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "../foo", "bar": "../bar"}).validate();
+    await d.appPackagesFile({'foo': '../foo', 'bar': '../bar'}).validate();
   });
 
   test("ignores transitive dependency's dev dependencies", () async {
     await d.dir('foo', [
       d.libDir('foo'),
       d.pubspec({
-        "name": "foo",
-        "version": "0.0.1",
-        "dev_dependencies": {
-          "bar": {"path": "../bar"}
+        'name': 'foo',
+        'version': '0.0.1',
+        'dev_dependencies': {
+          'bar': {'path': '../bar'}
         }
       })
     ]).create();
@@ -72,12 +72,12 @@
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       })
     ]).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "../foo"}).validate();
+    await d.appPackagesFile({'foo': '../foo'}).validate();
   });
 }
diff --git a/test/downgrade/does_not_show_other_versions_test.dart b/test/downgrade/does_not_show_other_versions_test.dart
index da41cc1..ca872c8 100644
--- a/test/downgrade/does_not_show_other_versions_test.dart
+++ b/test/downgrade/does_not_show_other_versions_test.dart
@@ -7,21 +7,21 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
-  test("does not show how many other versions are available", () async {
+void main() {
+  test('does not show how many other versions are available', () async {
     await servePackages((builder) {
-      builder.serve("downgraded", "1.0.0");
-      builder.serve("downgraded", "2.0.0");
-      builder.serve("downgraded", "3.0.0-dev");
+      builder.serve('downgraded', '1.0.0');
+      builder.serve('downgraded', '2.0.0');
+      builder.serve('downgraded', '3.0.0-dev');
     });
 
-    await d.appDir({"downgraded": "3.0.0-dev"}).create();
+    await d.appDir({'downgraded': '3.0.0-dev'}).create();
 
     await pubGet();
 
     // Loosen the constraints.
-    await d.appDir({"downgraded": ">=2.0.0"}).create();
+    await d.appDir({'downgraded': '>=2.0.0'}).create();
 
-    await pubDowngrade(output: contains("downgraded 2.0.0 (was 3.0.0-dev)"));
+    await pubDowngrade(output: contains('downgraded 2.0.0 (was 3.0.0-dev)'));
   });
 }
diff --git a/test/downgrade/doesnt_change_git_dependencies_test.dart b/test/downgrade/doesnt_change_git_dependencies_test.dart
index a19edd3..9f87792 100644
--- a/test/downgrade/doesnt_change_git_dependencies_test.dart
+++ b/test/downgrade/doesnt_change_git_dependencies_test.dart
@@ -7,7 +7,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test("doesn't change git dependencies", () async {
     ensureGit();
 
@@ -15,7 +15,7 @@
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
diff --git a/test/downgrade/dry_run_does_not_apply_changes_test.dart b/test/downgrade/dry_run_does_not_apply_changes_test.dart
index 50ea8ae..276a471 100644
--- a/test/downgrade/dry_run_does_not_apply_changes_test.dart
+++ b/test/downgrade/dry_run_does_not_apply_changes_test.dart
@@ -10,35 +10,35 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
-  test("--dry-run shows report but does not apply changes", () async {
+void main() {
+  test('--dry-run shows report but does not apply changes', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
-      builder.serve("foo", "2.0.0");
+      builder.serve('foo', '1.0.0');
+      builder.serve('foo', '2.0.0');
     });
 
     // Create the first lockfile.
-    await d.appDir({"foo": "2.0.0"}).create();
+    await d.appDir({'foo': '2.0.0'}).create();
 
     await pubGet();
 
     // Change the pubspec.
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     // Also delete the "packages" directory.
-    deleteEntry(path.join(d.sandbox, appPath, "packages"));
+    deleteEntry(path.join(d.sandbox, appPath, 'packages'));
 
     // Do the dry run.
     await pubDowngrade(
-        args: ["--dry-run"],
+        args: ['--dry-run'],
         output: allOf(
-            [contains("< foo 1.0.0"), contains("Would change 1 dependency.")]));
+            [contains('< foo 1.0.0'), contains('Would change 1 dependency.')]));
 
     await d.dir(appPath, [
       // The lockfile should be unmodified.
-      d.file("pubspec.lock", contains("2.0.0")),
+      d.file('pubspec.lock', contains('2.0.0')),
       // The "packages" directory should not have been regenerated.
-      d.nothing("packages")
+      d.nothing('packages')
     ]).validate();
   });
 }
diff --git a/test/downgrade/unlock_dependers_test.dart b/test/downgrade/unlock_dependers_test.dart
index c5c8515..8f785a6 100644
--- a/test/downgrade/unlock_dependers_test.dart
+++ b/test/downgrade/unlock_dependers_test.dart
@@ -7,28 +7,28 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test(
       "downgrades a locked package's dependers in order to get it to "
-      "min version", () async {
+      'min version', () async {
     await servePackages((builder) {
-      builder.serve("foo", "2.0.0", deps: {"bar": ">1.0.0"});
-      builder.serve("bar", "2.0.0");
+      builder.serve('foo', '2.0.0', deps: {'bar': '>1.0.0'});
+      builder.serve('bar', '2.0.0');
     });
 
-    await d.appDir({"foo": "any", "bar": "any"}).create();
+    await d.appDir({'foo': 'any', 'bar': 'any'}).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "2.0.0", "bar": "2.0.0"}).validate();
+    await d.appPackagesFile({'foo': '2.0.0', 'bar': '2.0.0'}).validate();
 
     globalPackageServer.add((builder) {
-      builder.serve("foo", "1.0.0", deps: {"bar": "any"});
-      builder.serve("bar", "1.0.0");
+      builder.serve('foo', '1.0.0', deps: {'bar': 'any'});
+      builder.serve('bar', '1.0.0');
     });
 
     await pubDowngrade(args: ['bar']);
 
-    await d.appPackagesFile({"foo": "1.0.0", "bar": "1.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0', 'bar': '1.0.0'}).validate();
   });
 }
diff --git a/test/downgrade/unlock_if_necessary_test.dart b/test/downgrade/unlock_if_necessary_test.dart
index 016ef94..8024eee 100644
--- a/test/downgrade/unlock_if_necessary_test.dart
+++ b/test/downgrade/unlock_if_necessary_test.dart
@@ -7,28 +7,28 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test(
       "downgrades one locked hosted package's dependencies if it's "
-      "necessary", () async {
+      'necessary', () async {
     await servePackages((builder) {
-      builder.serve("foo", "2.0.0", deps: {"foo_dep": "any"});
-      builder.serve("foo_dep", "2.0.0");
+      builder.serve('foo', '2.0.0', deps: {'foo_dep': 'any'});
+      builder.serve('foo_dep', '2.0.0');
     });
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "2.0.0", "foo_dep": "2.0.0"}).validate();
+    await d.appPackagesFile({'foo': '2.0.0', 'foo_dep': '2.0.0'}).validate();
 
     globalPackageServer.add((builder) {
-      builder.serve("foo", "1.0.0", deps: {"foo_dep": "<2.0.0"});
-      builder.serve("foo_dep", "1.0.0");
+      builder.serve('foo', '1.0.0', deps: {'foo_dep': '<2.0.0'});
+      builder.serve('foo_dep', '1.0.0');
     });
 
     await pubDowngrade(args: ['foo']);
 
-    await d.appPackagesFile({"foo": "1.0.0", "foo_dep": "1.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0', 'foo_dep': '1.0.0'}).validate();
   });
 }
diff --git a/test/error_group_test.dart b/test/error_group_test.dart
index f966682..39ecf24 100644
--- a/test/error_group_test.dart
+++ b/test/error_group_test.dart
@@ -16,7 +16,7 @@
 // that has a subscription added and subsequently canceled counts as having no
 // listeners.
 
-main() {
+void main() {
   group('with no futures or streams', () {
     setUp(() {
       errorGroup = ErrorGroup();
@@ -29,7 +29,7 @@
 
     test(
         "shouldn't allow additional futures or streams once an error has been "
-        "signaled", () {
+        'signaled', () {
       expect(errorGroup.done, throwsFormatException);
       errorGroup.signalError(FormatException());
 
@@ -58,7 +58,7 @@
 
     test(
         "shouldn't allow additional futures or streams once .done has "
-        "been called", () {
+        'been called', () {
       completer.complete('value');
 
       expect(
@@ -114,7 +114,7 @@
     });
 
     test(
-        "should complete .done if the future receives a value even if the "
+        'should complete .done if the future receives a value even if the '
         "future doesn't have a listener", () {
       expect(errorGroup.done, completes);
       completer.complete('value');
@@ -124,7 +124,7 @@
     });
 
     test(
-        "should pipe an exception from the future to .done if the future "
+        'should pipe an exception from the future to .done if the future '
         "doesn't have a listener", () {
       expect(errorGroup.done, throwsFormatException);
       completer.completeError(FormatException());
@@ -137,7 +137,7 @@
 
     test(
         "should pass a signaled exception to .done if the future doesn't have "
-        "a listener", () {
+        'a listener', () {
       expect(errorGroup.done, throwsFormatException);
       errorGroup.signalError(FormatException());
 
@@ -164,8 +164,8 @@
     });
 
     test(
-        "should pipe exceptions from one future to the other and to "
-        ".complete", () {
+        'should pipe exceptions from one future to the other and to '
+        '.complete', () {
       expect(future1, throwsFormatException);
       expect(future2, throwsFormatException);
       expect(errorGroup.done, throwsFormatException);
@@ -174,8 +174,8 @@
     });
 
     test(
-        "each future should be able to complete with a value "
-        "independently", () {
+        'each future should be able to complete with a value '
+        'independently', () {
       expect(future1, completion(equals('value1')));
       expect(future2, completion(equals('value2')));
       expect(errorGroup.done, completes);
@@ -186,7 +186,7 @@
 
     test(
         "shouldn't throw a top-level exception if a future receives an error "
-        "after the other listened future completes", () {
+        'after the other listened future completes', () {
       expect(future1, completion(equals('value')));
       completer1.complete('value');
 
@@ -198,7 +198,7 @@
 
     test(
         "shouldn't throw a top-level exception if an error is signaled after "
-        "one listened future completes", () {
+        'one listened future completes', () {
       expect(future1, completion(equals('value')));
       completer1.complete('value');
 
@@ -273,7 +273,7 @@
     });
 
     test(
-        "should see one value and complete .done when the stream is done even "
+        'should see one value and complete .done when the stream is done even '
         "if the stream doesn't have a listener", () {
       expect(errorGroup.done, completes);
       controller.add('value');
@@ -297,7 +297,7 @@
     });
 
     test(
-        "should complete .done when the stream is done even if the stream "
+        'should complete .done when the stream is done even if the stream '
         "doesn't have a listener", () {
       expect(errorGroup.done, completes);
       controller.add('value');
@@ -309,7 +309,7 @@
     });
 
     test(
-        "should pipe an exception from the stream to .done if the stream "
+        'should pipe an exception from the stream to .done if the stream '
         "doesn't have a listener", () {
       expect(errorGroup.done, throwsFormatException);
       controller.addError(FormatException());
@@ -323,7 +323,7 @@
 
     test(
         "should pass a signaled exception to .done if the stream doesn't "
-        "have a listener", () {
+        'have a listener', () {
       expect(errorGroup.done, throwsFormatException);
       errorGroup.signalError(FormatException());
 
@@ -349,7 +349,7 @@
       stream2 = errorGroup.registerStream(controller2.stream);
     });
 
-    test("should pipe exceptions from one stream to the other and to .done",
+    test('should pipe exceptions from one stream to the other and to .done',
         () {
       expect(stream1.first, throwsFormatException);
       expect(stream2.first, throwsFormatException);
@@ -358,7 +358,7 @@
       controller1.addError(FormatException());
     });
 
-    test("each future should be able to emit values independently", () {
+    test('each future should be able to emit values independently', () {
       expect(stream1.toList(), completion(equals(['value1.1', 'value1.2'])));
       expect(stream2.toList(), completion(equals(['value2.1', 'value2.2'])));
       expect(errorGroup.done, completes);
@@ -375,7 +375,7 @@
 
     test(
         "shouldn't throw a top-level exception if a stream receives an error "
-        "after the other listened stream completes", () {
+        'after the other listened stream completes', () {
       var signal = Completer();
       expect(stream1.toList().whenComplete(signal.complete),
           completion(equals(['value1', 'value2'])));
@@ -392,7 +392,7 @@
 
     test(
         "shouldn't throw a top-level exception if an error is signaled after "
-        "one listened stream completes", () {
+        'one listened stream completes', () {
       var signal = Completer();
       expect(stream1.toList().whenComplete(signal.complete),
           completion(equals(['value1', 'value2'])));
@@ -422,7 +422,7 @@
       future = errorGroup.registerFuture(completer.future);
     });
 
-    test("should pipe exceptions from the stream to the future", () {
+    test('should pipe exceptions from the stream to the future', () {
       expect(stream.first, throwsFormatException);
       expect(future, throwsFormatException);
       expect(errorGroup.done, throwsFormatException);
@@ -430,7 +430,7 @@
       controller.addError(FormatException());
     });
 
-    test("should pipe exceptions from the future to the stream", () {
+    test('should pipe exceptions from the future to the stream', () {
       expect(stream.first, throwsFormatException);
       expect(future, throwsFormatException);
       expect(errorGroup.done, throwsFormatException);
@@ -439,8 +439,8 @@
     });
 
     test(
-        "the stream and the future should be able to complete/emit values "
-        "independently", () {
+        'the stream and the future should be able to complete/emit values '
+        'independently', () {
       expect(stream.toList(), completion(equals(['value1.1', 'value1.2'])));
       expect(future, completion(equals('value2.0')));
       expect(errorGroup.done, completes);
@@ -454,7 +454,7 @@
 
     test(
         "shouldn't throw a top-level exception if the stream receives an error "
-        "after the listened future completes", () {
+        'after the listened future completes', () {
       expect(future, completion(equals('value')));
       completer.complete('value');
 
@@ -466,7 +466,7 @@
 
     test(
         "shouldn't throw a top-level exception if the future receives an "
-        "error after the listened stream completes", () {
+        'error after the listened stream completes', () {
       var signal = Completer();
       expect(stream.toList().whenComplete(signal.complete),
           completion(equals(['value1', 'value2'])));
diff --git a/test/get/dry_run_does_not_apply_changes_test.dart b/test/get/dry_run_does_not_apply_changes_test.dart
index 124f785..27969ae 100644
--- a/test/get/dry_run_does_not_apply_changes_test.dart
+++ b/test/get/dry_run_does_not_apply_changes_test.dart
@@ -7,26 +7,26 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
-  test("--dry-run shows but does not apply changes", () async {
+void main() {
+  test('--dry-run shows but does not apply changes', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
+      builder.serve('foo', '1.0.0');
     });
 
-    await d.appDir({"foo": "1.0.0"}).create();
+    await d.appDir({'foo': '1.0.0'}).create();
 
     await pubGet(
-        args: ["--dry-run"],
+        args: ['--dry-run'],
         output: allOf(
-            [contains("+ foo 1.0.0"), contains("Would change 1 dependency.")]));
+            [contains('+ foo 1.0.0'), contains('Would change 1 dependency.')]));
 
     await d.dir(appPath, [
       // The lockfile should not be created.
-      d.nothing("pubspec.lock"),
+      d.nothing('pubspec.lock'),
       // The "packages" directory should not have been generated.
-      d.nothing("packages"),
+      d.nothing('packages'),
       // The ".packages" file should not have been created.
-      d.nothing(".packages"),
+      d.nothing('.packages'),
     ]).validate();
   });
 }
diff --git a/test/get/git/check_out_and_upgrade_test.dart b/test/get/git/check_out_and_upgrade_test.dart
index 9771ed5..26f60f8 100644
--- a/test/get/git/check_out_and_upgrade_test.dart
+++ b/test/get/git/check_out_and_upgrade_test.dart
@@ -7,7 +7,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('checks out and upgrades a package from Git', () async {
     ensureGit();
 
@@ -15,7 +15,7 @@
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
@@ -41,7 +41,7 @@
     await d.git('foo.git',
         [d.libDir('foo', 'foo 2'), d.libPubspec('foo', '1.0.0')]).commit();
 
-    await pubUpgrade(output: contains("Changed 1 dependency!"));
+    await pubUpgrade(output: contains('Changed 1 dependency!'));
 
     // When we download a new version of the git package, we should re-use the
     // git/cache directory but create a new git/ directory.
diff --git a/test/get/git/check_out_branch_test.dart b/test/get/git/check_out_branch_test.dart
index 600b23a..05ede8f 100644
--- a/test/get/git/check_out_branch_test.dart
+++ b/test/get/git/check_out_branch_test.dart
@@ -7,21 +7,21 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('checks out a package at a specific branch from Git', () async {
     ensureGit();
 
     var repo = d.git(
         'foo.git', [d.libDir('foo', 'foo 1'), d.libPubspec('foo', '1.0.0')]);
     await repo.create();
-    await repo.runGit(["branch", "old"]);
+    await repo.runGit(['branch', 'old']);
 
     await d.git('foo.git',
         [d.libDir('foo', 'foo 2'), d.libPubspec('foo', '1.0.0')]).commit();
 
     await d.appDir({
-      "foo": {
-        "git": {"url": "../foo.git", "ref": "old"}
+      'foo': {
+        'git': {'url': '../foo.git', 'ref': 'old'}
       }
     }).create();
 
diff --git a/test/get/git/check_out_revision_test.dart b/test/get/git/check_out_revision_test.dart
index a45e053..d99dc54 100644
--- a/test/get/git/check_out_revision_test.dart
+++ b/test/get/git/check_out_revision_test.dart
@@ -7,7 +7,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('checks out a package at a specific revision from Git', () async {
     ensureGit();
 
@@ -20,8 +20,8 @@
         [d.libDir('foo', 'foo 2'), d.libPubspec('foo', '1.0.0')]).commit();
 
     await d.appDir({
-      "foo": {
-        "git": {"url": "../foo.git", "ref": commit}
+      'foo': {
+        'git': {'url': '../foo.git', 'ref': commit}
       }
     }).create();
 
diff --git a/test/get/git/check_out_test.dart b/test/get/git/check_out_test.dart
index f518079..7d4ad38 100644
--- a/test/get/git/check_out_test.dart
+++ b/test/get/git/check_out_test.dart
@@ -7,7 +7,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('checks out a package from Git', () async {
     ensureGit();
 
@@ -15,7 +15,7 @@
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
diff --git a/test/get/git/check_out_transitive_test.dart b/test/get/git/check_out_transitive_test.dart
index 19afe0c..a505bb7 100644
--- a/test/get/git/check_out_transitive_test.dart
+++ b/test/get/git/check_out_transitive_test.dart
@@ -7,14 +7,14 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('checks out packages transitively from Git', () async {
     ensureGit();
 
     await d.git('foo.git', [
       d.libDir('foo'),
       d.libPubspec('foo', '1.0.0', deps: {
-        "bar": {"git": "../bar.git"}
+        'bar': {'git': '../bar.git'}
       })
     ]).create();
 
@@ -22,7 +22,7 @@
         'bar.git', [d.libDir('bar'), d.libPubspec('bar', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
diff --git a/test/get/git/check_out_twice_test.dart b/test/get/git/check_out_twice_test.dart
index 375ec75..8860db8 100644
--- a/test/get/git/check_out_twice_test.dart
+++ b/test/get/git/check_out_twice_test.dart
@@ -7,7 +7,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('checks out a package from Git twice', () async {
     ensureGit();
 
@@ -15,7 +15,7 @@
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
diff --git a/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart b/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart
index 48fb88c..93d44d7 100644
--- a/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart
+++ b/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart
@@ -10,7 +10,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   // Regression test for issue 20947.
   test(
       'checks out an unfetched and locked revision of a cached '
@@ -24,7 +24,7 @@
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
@@ -32,18 +32,18 @@
     var originalFooSpec = packageSpecLine('foo');
 
     // Switch to a new cache.
-    renameInSandbox(cachePath, "$cachePath.old");
+    renameInSandbox(cachePath, '$cachePath.old');
 
     // Make the lockfile point to a new revision of the git repository.
     await d.git('foo.git',
         [d.libDir('foo', 'foo 2'), d.libPubspec('foo', '1.0.0')]).commit();
 
-    await pubUpgrade(output: contains("Changed 1 dependency!"));
+    await pubUpgrade(output: contains('Changed 1 dependency!'));
 
     // Switch back to the old cache.
     var cacheDir = p.join(d.sandbox, cachePath);
     deleteEntry(cacheDir);
-    renameInSandbox("$cachePath.old", cacheDir);
+    renameInSandbox('$cachePath.old', cacheDir);
 
     // Get the updated version of the git dependency based on the lockfile.
     await pubGet();
diff --git a/test/get/git/check_out_with_trailing_slash_test.dart b/test/get/git/check_out_with_trailing_slash_test.dart
index b56405f..5838986 100644
--- a/test/get/git/check_out_with_trailing_slash_test.dart
+++ b/test/get/git/check_out_with_trailing_slash_test.dart
@@ -7,8 +7,8 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  group("(regression)", () {
+void main() {
+  group('(regression)', () {
     test('checks out a package from Git with a trailing slash', () async {
       ensureGit();
 
@@ -16,7 +16,7 @@
           'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
       await d.appDir({
-        "foo": {"git": "../foo.git/"}
+        'foo': {'git': '../foo.git/'}
       }).create();
 
       await pubGet();
diff --git a/test/get/git/clean_invalid_git_repo_cache_test.dart b/test/get/git/clean_invalid_git_repo_cache_test.dart
index e7ff16b..39254a8 100644
--- a/test/get/git/clean_invalid_git_repo_cache_test.dart
+++ b/test/get/git/clean_invalid_git_repo_cache_test.dart
@@ -15,17 +15,15 @@
       path.join(d.sandbox, path.joinAll([cachePath, 'git', 'cache']));
   final Directory fooCacheDir =
       Directory(cacheDir).listSync().firstWhere((entity) {
-    if (entity is Directory &&
-        entity.path.split(Platform.pathSeparator).last.startsWith(repo))
-      return true;
-    return false;
+    return entity is Directory &&
+        entity.path.split(Platform.pathSeparator).last.startsWith(repo);
   });
 
   fooCacheDir.deleteSync(recursive: true);
   fooCacheDir.createSync();
 }
 
-main() {
+void main() {
   test('Clean-up invalid git repo cache', () async {
     ensureGit();
 
@@ -33,7 +31,7 @@
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
@@ -56,11 +54,11 @@
     var repo =
         d.git('foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]);
     await repo.create();
-    await repo.runGit(["branch", "old"]);
+    await repo.runGit(['branch', 'old']);
 
     await d.appDir({
-      "foo": {
-        "git": {"url": "../foo.git", "ref": "old"}
+      'foo': {
+        'git': {'url': '../foo.git', 'ref': 'old'}
       }
     }).create();
 
@@ -87,8 +85,8 @@
     var commit = await repo.revParse('HEAD');
 
     await d.appDir({
-      "foo": {
-        "git": {"url": "../foo.git", "ref": commit}
+      'foo': {
+        'git': {'url': '../foo.git', 'ref': commit}
       }
     }).create();
 
diff --git a/test/get/git/dependency_name_match_pubspec_test.dart b/test/get/git/dependency_name_match_pubspec_test.dart
index dc457fa..f863328 100644
--- a/test/get/git/dependency_name_match_pubspec_test.dart
+++ b/test/get/git/dependency_name_match_pubspec_test.dart
@@ -9,7 +9,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       'requires the dependency name to match the remote pubspec '
       'name', () async {
@@ -20,7 +20,7 @@
 
     await d.dir(appPath, [
       d.appPubspec({
-        "weirdname": {"git": "../foo.git"}
+        'weirdname': {'git': '../foo.git'}
       })
     ]).create();
 
diff --git a/test/get/git/different_repo_name_test.dart b/test/get/git/different_repo_name_test.dart
index 7f348e5..52cf3a5 100644
--- a/test/get/git/different_repo_name_test.dart
+++ b/test/get/git/different_repo_name_test.dart
@@ -7,7 +7,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       'doesn\'t require the repository name to match the name in the '
       'pubspec', () async {
@@ -18,7 +18,7 @@
 
     await d.dir(appPath, [
       d.appPubspec({
-        "weirdname": {"git": "../foo.git"}
+        'weirdname': {'git': '../foo.git'}
       })
     ]).create();
 
diff --git a/test/get/git/doesnt_fetch_if_nothing_changes_test.dart b/test/get/git/doesnt_fetch_if_nothing_changes_test.dart
index ff74344..9d81081 100644
--- a/test/get/git/doesnt_fetch_if_nothing_changes_test.dart
+++ b/test/get/git/doesnt_fetch_if_nothing_changes_test.dart
@@ -10,7 +10,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test("doesn't re-fetch a repository if nothing changes", () async {
     ensureGit();
 
@@ -18,8 +18,8 @@
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {
-        "git": {"url": "../foo.git"}
+      'foo': {
+        'git': {'url': '../foo.git'}
       }
     }).create();
 
diff --git a/test/get/git/git_not_installed.dart b/test/get/git/git_not_installed.dart
index 36dc241..06f6073 100644
--- a/test/get/git/git_not_installed.dart
+++ b/test/get/git/git_not_installed.dart
@@ -4,7 +4,7 @@
 
 import 'dart:io';
 
-@TestOn("linux")
+@TestOn('linux')
 import 'package:test/test.dart';
 import 'package:test_descriptor/test_descriptor.dart' show sandbox;
 import 'package:path/path.dart' as p;
@@ -13,7 +13,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('reports failure if Git is not installed', () async {
     // Create temporary folder 'bin/' containing a 'git' script in [sandbox]
     // By adding the bin/ folder to the search `$PATH` we can prevent `pub` from
@@ -31,7 +31,7 @@
     await runProcess('chmod', ['+x', p.join(sandbox, 'bin', 'git')]);
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet(
diff --git a/test/get/git/lock_version_test.dart b/test/get/git/lock_version_test.dart
index 741522b..b3efdb8 100644
--- a/test/get/git/lock_version_test.dart
+++ b/test/get/git/lock_version_test.dart
@@ -10,7 +10,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('keeps a Git package locked to the version in the lockfile', () async {
     ensureGit();
 
@@ -18,7 +18,7 @@
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     // This get should lock the foo.git dependency to the current revision.
diff --git a/test/get/git/locked_revision_without_repo_test.dart b/test/get/git/locked_revision_without_repo_test.dart
index 84ec07a..907909b 100644
--- a/test/get/git/locked_revision_without_repo_test.dart
+++ b/test/get/git/locked_revision_without_repo_test.dart
@@ -12,7 +12,7 @@
 
 // Regression test for issue 16470.
 
-main() {
+void main() {
   test('checks out the repository for a locked revision', () async {
     ensureGit();
 
@@ -20,7 +20,7 @@
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     // This get should lock the foo.git dependency to the current revision.
diff --git a/test/get/git/path_test.dart b/test/get/git/path_test.dart
index 607ca2d..db27e66 100644
--- a/test/get/git/path_test.dart
+++ b/test/get/git/path_test.dart
@@ -10,7 +10,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('depends on a package in a subdirectory', () async {
     ensureGit();
 
@@ -20,8 +20,8 @@
     await repo.create();
 
     await d.appDir({
-      "sub": {
-        "git": {"url": "../foo.git", "path": "subdir"}
+      'sub': {
+        'git': {'url': '../foo.git', 'path': 'subdir'}
       }
     }).create();
 
@@ -52,8 +52,8 @@
     await repo.create();
 
     await d.appDir({
-      "sub": {
-        "git": {"url": "../foo.git", "path": "sub/dir"}
+      'sub': {
+        'git': {'url': '../foo.git', 'path': 'sub/dir'}
       }
     }).create();
 
@@ -87,11 +87,11 @@
     await repo.create();
 
     await d.appDir({
-      "sub1": {
-        "git": {"url": "../foo.git", "path": "subdir1"}
+      'sub1': {
+        'git': {'url': '../foo.git', 'path': 'subdir1'}
       },
-      "sub2": {
-        "git": {"url": "../foo.git", "path": "subdir2"}
+      'sub2': {
+        'git': {'url': '../foo.git', 'path': 'subdir2'}
       }
     }).create();
 
@@ -133,11 +133,11 @@
     var newRevision = await repo.revParse('HEAD');
 
     await d.appDir({
-      "sub1": {
-        "git": {"url": "../foo.git", "path": "subdir", "ref": oldRevision}
+      'sub1': {
+        'git': {'url': '../foo.git', 'path': 'subdir', 'ref': oldRevision}
       },
-      "sub2": {
-        "git": {"url": "../foo.git", "path": "subdir"}
+      'sub2': {
+        'git': {'url': '../foo.git', 'path': 'subdir'}
       }
     }).create();
 
diff --git a/test/get/git/require_pubspec_name_test.dart b/test/get/git/require_pubspec_name_test.dart
index 6830cab..48fc843 100644
--- a/test/get/git/require_pubspec_name_test.dart
+++ b/test/get/git/require_pubspec_name_test.dart
@@ -9,7 +9,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       'requires the dependency to have a pubspec with a name '
       'field', () async {
@@ -18,7 +18,7 @@
     await d.git('foo.git', [d.libDir('foo'), d.pubspec({})]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet(
diff --git a/test/get/git/require_pubspec_test.dart b/test/get/git/require_pubspec_test.dart
index ec7a7f7..0f75c75 100644
--- a/test/get/git/require_pubspec_test.dart
+++ b/test/get/git/require_pubspec_test.dart
@@ -7,14 +7,14 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('requires the dependency to have a pubspec', () async {
     ensureGit();
 
     await d.git('foo.git', [d.libDir('foo')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet(
diff --git a/test/get/git/stay_locked_if_compatible_test.dart b/test/get/git/stay_locked_if_compatible_test.dart
index afc96a3..acd7b05 100644
--- a/test/get/git/stay_locked_if_compatible_test.dart
+++ b/test/get/git/stay_locked_if_compatible_test.dart
@@ -7,17 +7,17 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       "doesn't upgrade a locked Git package with a new compatible "
-      "constraint", () async {
+      'constraint', () async {
     ensureGit();
 
     await d.git('foo.git',
-        [d.libDir('foo', 'foo 1.0.0'), d.libPubspec("foo", "1.0.0")]).create();
+        [d.libDir('foo', 'foo 1.0.0'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
@@ -25,10 +25,10 @@
     var originalFooSpec = packageSpecLine('foo');
 
     await d.git('foo.git',
-        [d.libDir('foo', 'foo 1.0.1'), d.libPubspec("foo", "1.0.1")]).commit();
+        [d.libDir('foo', 'foo 1.0.1'), d.libPubspec('foo', '1.0.1')]).commit();
 
     await d.appDir({
-      "foo": {"git": "../foo.git", "version": ">=1.0.0"}
+      'foo': {'git': '../foo.git', 'version': '>=1.0.0'}
     }).create();
 
     await pubGet();
diff --git a/test/get/git/unlock_if_incompatible_test.dart b/test/get/git/unlock_if_incompatible_test.dart
index a6890e3..16df57e 100644
--- a/test/get/git/unlock_if_incompatible_test.dart
+++ b/test/get/git/unlock_if_incompatible_test.dart
@@ -7,7 +7,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       'upgrades a locked Git package with a new incompatible '
       'constraint', () async {
@@ -17,7 +17,7 @@
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '0.5.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
@@ -34,10 +34,10 @@
     var originalFooSpec = packageSpecLine('foo');
 
     await d.git('foo.git',
-        [d.libDir('foo', 'foo 2'), d.libPubspec("foo", "1.0.0")]).commit();
+        [d.libDir('foo', 'foo 2'), d.libPubspec('foo', '1.0.0')]).commit();
 
     await d.appDir({
-      "foo": {"git": "../foo.git", "version": ">=1.0.0"}
+      'foo': {'git': '../foo.git', 'version': '>=1.0.0'}
     }).create();
 
     await pubGet();
diff --git a/test/get/hosted/avoid_network_requests_test.dart b/test/get/hosted/avoid_network_requests_test.dart
index 55fba9d..3ca7ddb 100644
--- a/test/get/hosted/avoid_network_requests_test.dart
+++ b/test/get/hosted/avoid_network_requests_test.dart
@@ -7,18 +7,18 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('only requests versions that are needed during solving', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
-      builder.serve("foo", "1.1.0");
-      builder.serve("foo", "1.2.0");
-      builder.serve("bar", "1.0.0");
-      builder.serve("bar", "1.1.0");
-      builder.serve("bar", "1.2.0");
+      builder.serve('foo', '1.0.0');
+      builder.serve('foo', '1.1.0');
+      builder.serve('foo', '1.2.0');
+      builder.serve('bar', '1.0.0');
+      builder.serve('bar', '1.1.0');
+      builder.serve('bar', '1.2.0');
     });
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     // Get once so it gets cached.
     await pubGet();
@@ -28,12 +28,12 @@
     globalServer.requestedPaths.clear();
 
     // Add "bar" to the dependencies.
-    await d.appDir({"foo": "any", "bar": "any"}).create();
+    await d.appDir({'foo': 'any', 'bar': 'any'}).create();
 
     // Run the solver again.
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.2.0", "bar": "1.2.0"}).validate();
+    await d.appPackagesFile({'foo': '1.2.0', 'bar': '1.2.0'}).validate();
 
     // The get should not have done any network requests since the lock file is
     // up to date.
@@ -41,9 +41,9 @@
         globalServer.requestedPaths,
         unorderedEquals([
           // Bar should be requested because it's new, but not foo.
-          "api/packages/bar",
+          'api/packages/bar',
           // Need to download it.
-          "packages/bar/versions/1.2.0.tar.gz"
+          'packages/bar/versions/1.2.0.tar.gz'
         ]));
   });
 }
diff --git a/test/get/hosted/cached_pubspec_test.dart b/test/get/hosted/cached_pubspec_test.dart
index a4996a9..ac4d376 100644
--- a/test/get/hosted/cached_pubspec_test.dart
+++ b/test/get/hosted/cached_pubspec_test.dart
@@ -7,11 +7,11 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('does not request a pubspec for a cached package', () async {
-    await servePackages((builder) => builder.serve("foo", "1.2.3"));
+    await servePackages((builder) => builder.serve('foo', '1.2.3'));
 
-    await d.appDir({"foo": "1.2.3"}).create();
+    await d.appDir({'foo': '1.2.3'}).create();
 
     // Get once so it gets cached.
     await pubGet();
@@ -20,14 +20,14 @@
     // the initial get.
     globalServer.requestedPaths.clear();
 
-    await d.cacheDir({"foo": "1.2.3"}).validate();
-    await d.appPackagesFile({"foo": "1.2.3"}).validate();
+    await d.cacheDir({'foo': '1.2.3'}).validate();
+    await d.appPackagesFile({'foo': '1.2.3'}).validate();
 
     // Run the solver again now that it's cached.
     await pubGet();
 
     // The get should not have requested the pubspec since it's local already.
     expect(globalServer.requestedPaths,
-        isNot(contains("packages/foo/versions/1.2.3.yaml")));
+        isNot(contains('packages/foo/versions/1.2.3.yaml')));
   });
 }
diff --git a/test/get/hosted/do_not_upgrade_on_removed_constraints_test.dart b/test/get/hosted/do_not_upgrade_on_removed_constraints_test.dart
index a2eaa11..30e4a65 100644
--- a/test/get/hosted/do_not_upgrade_on_removed_constraints_test.dart
+++ b/test/get/hosted/do_not_upgrade_on_removed_constraints_test.dart
@@ -7,28 +7,28 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       "doesn't upgrade dependencies whose constraints have been "
-      "removed", () async {
+      'removed', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", deps: {"shared_dep": "any"});
-      builder.serve("bar", "1.0.0", deps: {"shared_dep": "<2.0.0"});
-      builder.serve("shared_dep", "1.0.0");
-      builder.serve("shared_dep", "2.0.0");
+      builder.serve('foo', '1.0.0', deps: {'shared_dep': 'any'});
+      builder.serve('bar', '1.0.0', deps: {'shared_dep': '<2.0.0'});
+      builder.serve('shared_dep', '1.0.0');
+      builder.serve('shared_dep', '2.0.0');
     });
 
-    await d.appDir({"foo": "any", "bar": "any"}).create();
+    await d.appDir({'foo': 'any', 'bar': 'any'}).create();
 
     await pubGet();
 
     await d.appPackagesFile(
-        {"foo": "1.0.0", "bar": "1.0.0", "shared_dep": "1.0.0"}).validate();
+        {'foo': '1.0.0', 'bar': '1.0.0', 'shared_dep': '1.0.0'}).validate();
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.0.0", "shared_dep": "1.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0', 'shared_dep': '1.0.0'}).validate();
   });
 }
diff --git a/test/get/hosted/does_no_network_requests_when_possible_test.dart b/test/get/hosted/does_no_network_requests_when_possible_test.dart
index 01ecea0..044686a 100644
--- a/test/get/hosted/does_no_network_requests_when_possible_test.dart
+++ b/test/get/hosted/does_no_network_requests_when_possible_test.dart
@@ -7,15 +7,15 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('does not request versions if the lockfile is up to date', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
-      builder.serve("foo", "1.1.0");
-      builder.serve("foo", "1.2.0");
+      builder.serve('foo', '1.0.0');
+      builder.serve('foo', '1.1.0');
+      builder.serve('foo', '1.2.0');
     });
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     // Get once so it gets cached.
     await pubGet();
@@ -27,8 +27,8 @@
     // Run the solver again now that it's cached.
     await pubGet();
 
-    await d.cacheDir({"foo": "1.2.0"}).validate();
-    await d.appPackagesFile({"foo": "1.2.0"}).validate();
+    await d.cacheDir({'foo': '1.2.0'}).validate();
+    await d.appPackagesFile({'foo': '1.2.0'}).validate();
 
     // The get should not have done any network requests since the lock file is
     // up to date.
diff --git a/test/get/hosted/get_test.dart b/test/get/hosted/get_test.dart
index dcaa8f6..89dafba 100644
--- a/test/get/hosted/get_test.dart
+++ b/test/get/hosted/get_test.dart
@@ -12,29 +12,29 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('gets a package from a pub server', () async {
-    await servePackages((builder) => builder.serve("foo", "1.2.3"));
+    await servePackages((builder) => builder.serve('foo', '1.2.3'));
 
-    await d.appDir({"foo": "1.2.3"}).create();
+    await d.appDir({'foo': '1.2.3'}).create();
 
     await pubGet();
 
-    await d.cacheDir({"foo": "1.2.3"}).validate();
-    await d.appPackagesFile({"foo": "1.2.3"}).validate();
+    await d.cacheDir({'foo': '1.2.3'}).validate();
+    await d.appPackagesFile({'foo': '1.2.3'}).validate();
   });
 
   test('URL encodes the package name', () async {
     await serveNoPackages();
 
-    await d.appDir({"bad name!": "1.2.3"}).create();
+    await d.appDir({'bad name!': '1.2.3'}).create();
 
     await pubGet(
         error: allOf([
           contains(
               "Because myapp depends on bad name! any which doesn't exist (could "
-              "not find package bad name! at http://localhost:"),
-          contains("), version solving failed.")
+              'not find package bad name! at http://localhost:'),
+          contains('), version solving failed.')
         ]),
         exitCode: exit_codes.UNAVAILABLE);
   });
@@ -45,39 +45,39 @@
     await serveErrors();
 
     var server = await PackageServer.start((builder) {
-      builder.serve("foo", "1.2.3");
+      builder.serve('foo', '1.2.3');
     });
 
     await d.appDir({
-      "foo": {
-        "version": "1.2.3",
-        "hosted": {"name": "foo", "url": "http://localhost:${server.port}"}
+      'foo': {
+        'version': '1.2.3',
+        'hosted': {'name': 'foo', 'url': 'http://localhost:${server.port}'}
       }
     }).create();
 
     await pubGet();
 
-    await d.cacheDir({"foo": "1.2.3"}, port: server.port).validate();
-    await d.appPackagesFile({"foo": "1.2.3"}).validate();
+    await d.cacheDir({'foo': '1.2.3'}, port: server.port).validate();
+    await d.appPackagesFile({'foo': '1.2.3'}).validate();
   });
 
   group('categorizes dependency types in the lockfile', () {
     setUp(() => servePackages((builder) {
-          builder.serve("foo", "1.2.3", deps: {"bar": "any"});
-          builder.serve("bar", "1.2.3");
-          builder.serve("baz", "1.2.3", deps: {"qux": "any"});
-          builder.serve("qux", "1.2.3");
-          builder.serve("zip", "1.2.3", deps: {"zap": "any"});
-          builder.serve("zap", "1.2.3");
+          builder.serve('foo', '1.2.3', deps: {'bar': 'any'});
+          builder.serve('bar', '1.2.3');
+          builder.serve('baz', '1.2.3', deps: {'qux': 'any'});
+          builder.serve('qux', '1.2.3');
+          builder.serve('zip', '1.2.3', deps: {'zap': 'any'});
+          builder.serve('zap', '1.2.3');
         }));
 
     test('for main, dev, and overridden dependencies', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dependencies": {"foo": "any"},
-          "dev_dependencies": {"baz": "any"},
-          "dependency_overrides": {"zip": "any"}
+          'name': 'myapp',
+          'dependencies': {'foo': 'any'},
+          'dev_dependencies': {'baz': 'any'},
+          'dependency_overrides': {'zip': 'any'}
         })
       ]).create();
 
@@ -102,10 +102,10 @@
     test('for overridden main and dev dependencies', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dependencies": {"foo": "any"},
-          "dev_dependencies": {"baz": "any"},
-          "dependency_overrides": {"foo": "any", "baz": "any"}
+          'name': 'myapp',
+          'dependencies': {'foo': 'any'},
+          'dev_dependencies': {'baz': 'any'},
+          'dependency_overrides': {'foo': 'any', 'baz': 'any'}
         })
       ]).create();
 
diff --git a/test/get/hosted/get_transitive_test.dart b/test/get/hosted/get_transitive_test.dart
index 7c0eefb..f68006a 100644
--- a/test/get/hosted/get_transitive_test.dart
+++ b/test/get/hosted/get_transitive_test.dart
@@ -7,20 +7,20 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('gets packages transitively from a pub server', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.3", deps: {"bar": "2.0.4"});
-      builder.serve("bar", "2.0.3");
-      builder.serve("bar", "2.0.4");
-      builder.serve("bar", "2.0.5");
+      builder.serve('foo', '1.2.3', deps: {'bar': '2.0.4'});
+      builder.serve('bar', '2.0.3');
+      builder.serve('bar', '2.0.4');
+      builder.serve('bar', '2.0.5');
     });
 
-    await d.appDir({"foo": "1.2.3"}).create();
+    await d.appDir({'foo': '1.2.3'}).create();
 
     await pubGet();
 
-    await d.cacheDir({"foo": "1.2.3", "bar": "2.0.4"}).validate();
-    await d.appPackagesFile({"foo": "1.2.3", "bar": "2.0.4"}).validate();
+    await d.cacheDir({'foo': '1.2.3', 'bar': '2.0.4'}).validate();
+    await d.appPackagesFile({'foo': '1.2.3', 'bar': '2.0.4'}).validate();
   });
 }
diff --git a/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart b/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart
index 321e954..c53079c 100644
--- a/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart
+++ b/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart
@@ -7,24 +7,24 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   // Regression test for issue 22194.
   test(
       'gets a dependency with broken dev dependencies from a pub '
       'server', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.3", pubspec: {
-        "dev_dependencies": {
-          "busted": {"not a real source": null}
+      builder.serve('foo', '1.2.3', pubspec: {
+        'dev_dependencies': {
+          'busted': {'not a real source': null}
         }
       });
     });
 
-    await d.appDir({"foo": "1.2.3"}).create();
+    await d.appDir({'foo': '1.2.3'}).create();
 
     await pubGet();
 
-    await d.cacheDir({"foo": "1.2.3"}).validate();
-    await d.appPackagesFile({"foo": "1.2.3"}).validate();
+    await d.cacheDir({'foo': '1.2.3'}).validate();
+    await d.appPackagesFile({'foo': '1.2.3'}).validate();
   });
 }
diff --git a/test/get/hosted/resolve_constraints_test.dart b/test/get/hosted/resolve_constraints_test.dart
index e5c0084..c515c8e 100644
--- a/test/get/hosted/resolve_constraints_test.dart
+++ b/test/get/hosted/resolve_constraints_test.dart
@@ -7,24 +7,24 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('resolves version constraints from a pub server', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.3", deps: {"baz": ">=2.0.0"});
-      builder.serve("bar", "2.3.4", deps: {"baz": "<3.0.0"});
-      builder.serve("baz", "2.0.3");
-      builder.serve("baz", "2.0.4");
-      builder.serve("baz", "3.0.1");
+      builder.serve('foo', '1.2.3', deps: {'baz': '>=2.0.0'});
+      builder.serve('bar', '2.3.4', deps: {'baz': '<3.0.0'});
+      builder.serve('baz', '2.0.3');
+      builder.serve('baz', '2.0.4');
+      builder.serve('baz', '3.0.1');
     });
 
-    await d.appDir({"foo": "any", "bar": "any"}).create();
+    await d.appDir({'foo': 'any', 'bar': 'any'}).create();
 
     await pubGet();
 
     await d
-        .cacheDir({"foo": "1.2.3", "bar": "2.3.4", "baz": "2.0.4"}).validate();
+        .cacheDir({'foo': '1.2.3', 'bar': '2.3.4', 'baz': '2.0.4'}).validate();
 
     await d.appPackagesFile(
-        {"foo": "1.2.3", "bar": "2.3.4", "baz": "2.0.4"}).validate();
+        {'foo': '1.2.3', 'bar': '2.3.4', 'baz': '2.0.4'}).validate();
   });
 }
diff --git a/test/get/hosted/stay_locked_if_compatible_test.dart b/test/get/hosted/stay_locked_if_compatible_test.dart
index a2921ab..716f734 100644
--- a/test/get/hosted/stay_locked_if_compatible_test.dart
+++ b/test/get/hosted/stay_locked_if_compatible_test.dart
@@ -7,24 +7,24 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       "doesn't upgrade a locked pub server package with a new "
-      "compatible constraint", () async {
-    await servePackages((builder) => builder.serve("foo", "1.0.0"));
+      'compatible constraint', () async {
+    await servePackages((builder) => builder.serve('foo', '1.0.0'));
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0'}).validate();
 
-    globalPackageServer.add((builder) => builder.serve("foo", "1.0.1"));
+    globalPackageServer.add((builder) => builder.serve('foo', '1.0.1'));
 
-    await d.appDir({"foo": ">=1.0.0"}).create();
+    await d.appDir({'foo': '>=1.0.0'}).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0'}).validate();
   });
 }
diff --git a/test/get/hosted/stay_locked_if_new_is_satisfied_test.dart b/test/get/hosted/stay_locked_if_new_is_satisfied_test.dart
index 8c4051a..41fd315 100644
--- a/test/get/hosted/stay_locked_if_new_is_satisfied_test.dart
+++ b/test/get/hosted/stay_locked_if_new_is_satisfied_test.dart
@@ -7,39 +7,39 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       "doesn't unlock dependencies if a new dependency is already "
-      "satisfied", () async {
+      'satisfied', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", deps: {"bar": "<2.0.0"});
-      builder.serve("bar", "1.0.0", deps: {"baz": "<2.0.0"});
-      builder.serve("baz", "1.0.0");
+      builder.serve('foo', '1.0.0', deps: {'bar': '<2.0.0'});
+      builder.serve('bar', '1.0.0', deps: {'baz': '<2.0.0'});
+      builder.serve('baz', '1.0.0');
     });
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     await pubGet();
 
     await d.appPackagesFile(
-        {"foo": "1.0.0", "bar": "1.0.0", "baz": "1.0.0"}).validate();
+        {'foo': '1.0.0', 'bar': '1.0.0', 'baz': '1.0.0'}).validate();
 
     globalPackageServer.add((builder) {
-      builder.serve("foo", "2.0.0", deps: {"bar": "<3.0.0"});
-      builder.serve("bar", "2.0.0", deps: {"baz": "<3.0.0"});
-      builder.serve("baz", "2.0.0");
-      builder.serve("newdep", "2.0.0", deps: {"baz": ">=1.0.0"});
+      builder.serve('foo', '2.0.0', deps: {'bar': '<3.0.0'});
+      builder.serve('bar', '2.0.0', deps: {'baz': '<3.0.0'});
+      builder.serve('baz', '2.0.0');
+      builder.serve('newdep', '2.0.0', deps: {'baz': '>=1.0.0'});
     });
 
-    await d.appDir({"foo": "any", "newdep": "any"}).create();
+    await d.appDir({'foo': 'any', 'newdep': 'any'}).create();
 
     await pubGet();
 
     await d.appPackagesFile({
-      "foo": "1.0.0",
-      "bar": "1.0.0",
-      "baz": "1.0.0",
-      "newdep": "2.0.0"
+      'foo': '1.0.0',
+      'bar': '1.0.0',
+      'baz': '1.0.0',
+      'newdep': '2.0.0'
     }).validate();
   });
 }
diff --git a/test/get/hosted/stay_locked_test.dart b/test/get/hosted/stay_locked_test.dart
index f92c365..972336d 100644
--- a/test/get/hosted/stay_locked_test.dart
+++ b/test/get/hosted/stay_locked_test.dart
@@ -10,28 +10,28 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       'keeps a hosted package locked to the version in the '
       'lockfile', () async {
-    await servePackages((builder) => builder.serve("foo", "1.0.0"));
+    await servePackages((builder) => builder.serve('foo', '1.0.0'));
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     // This should lock the foo dependency to version 1.0.0.
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0'}).validate();
 
     // Delete the .packages file to simulate a new checkout of the application.
     deleteEntry(path.join(d.sandbox, packagesFilePath));
 
     // Start serving a newer package as well.
-    globalPackageServer.add((builder) => builder.serve("foo", "1.0.1"));
+    globalPackageServer.add((builder) => builder.serve('foo', '1.0.1'));
 
     // This shouldn't upgrade the foo dependency due to the lockfile.
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0'}).validate();
   });
 }
diff --git a/test/get/hosted/unlock_if_incompatible_test.dart b/test/get/hosted/unlock_if_incompatible_test.dart
index 6d33d65..56ad89a 100644
--- a/test/get/hosted/unlock_if_incompatible_test.dart
+++ b/test/get/hosted/unlock_if_incompatible_test.dart
@@ -7,22 +7,22 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       'upgrades a locked pub server package with a new incompatible '
       'constraint', () async {
-    await servePackages((builder) => builder.serve("foo", "1.0.0"));
+    await servePackages((builder) => builder.serve('foo', '1.0.0'));
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.0.0"}).validate();
-    globalPackageServer.add((builder) => builder.serve("foo", "1.0.1"));
-    await d.appDir({"foo": ">1.0.0"}).create();
+    await d.appPackagesFile({'foo': '1.0.0'}).validate();
+    globalPackageServer.add((builder) => builder.serve('foo', '1.0.1'));
+    await d.appDir({'foo': '>1.0.0'}).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.0.1"}).validate();
+    await d.appPackagesFile({'foo': '1.0.1'}).validate();
   });
 }
diff --git a/test/get/hosted/unlock_if_new_is_unsatisfied_test.dart b/test/get/hosted/unlock_if_new_is_unsatisfied_test.dart
index f39b641..082bb1e 100644
--- a/test/get/hosted/unlock_if_new_is_unsatisfied_test.dart
+++ b/test/get/hosted/unlock_if_new_is_unsatisfied_test.dart
@@ -7,46 +7,46 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
-      "unlocks dependencies if necessary to ensure that a new "
-      "dependency is satisfied", () async {
+      'unlocks dependencies if necessary to ensure that a new '
+      'dependency is satisfied', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", deps: {"bar": "<2.0.0"});
-      builder.serve("bar", "1.0.0", deps: {"baz": "<2.0.0"});
-      builder.serve("baz", "1.0.0", deps: {"qux": "<2.0.0"});
-      builder.serve("qux", "1.0.0");
+      builder.serve('foo', '1.0.0', deps: {'bar': '<2.0.0'});
+      builder.serve('bar', '1.0.0', deps: {'baz': '<2.0.0'});
+      builder.serve('baz', '1.0.0', deps: {'qux': '<2.0.0'});
+      builder.serve('qux', '1.0.0');
     });
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     await pubGet();
 
     await d.appPackagesFile({
-      "foo": "1.0.0",
-      "bar": "1.0.0",
-      "baz": "1.0.0",
-      "qux": "1.0.0"
+      'foo': '1.0.0',
+      'bar': '1.0.0',
+      'baz': '1.0.0',
+      'qux': '1.0.0'
     }).validate();
 
     globalPackageServer.add((builder) {
-      builder.serve("foo", "2.0.0", deps: {"bar": "<3.0.0"});
-      builder.serve("bar", "2.0.0", deps: {"baz": "<3.0.0"});
-      builder.serve("baz", "2.0.0", deps: {"qux": "<3.0.0"});
-      builder.serve("qux", "2.0.0");
-      builder.serve("newdep", "2.0.0", deps: {"baz": ">=1.5.0"});
+      builder.serve('foo', '2.0.0', deps: {'bar': '<3.0.0'});
+      builder.serve('bar', '2.0.0', deps: {'baz': '<3.0.0'});
+      builder.serve('baz', '2.0.0', deps: {'qux': '<3.0.0'});
+      builder.serve('qux', '2.0.0');
+      builder.serve('newdep', '2.0.0', deps: {'baz': '>=1.5.0'});
     });
 
-    await d.appDir({"foo": "any", "newdep": "any"}).create();
+    await d.appDir({'foo': 'any', 'newdep': 'any'}).create();
 
     await pubGet();
 
     await d.appPackagesFile({
-      "foo": "2.0.0",
-      "bar": "2.0.0",
-      "baz": "2.0.0",
-      "qux": "1.0.0",
-      "newdep": "2.0.0"
+      'foo': '2.0.0',
+      'bar': '2.0.0',
+      'baz': '2.0.0',
+      'qux': '1.0.0',
+      'newdep': '2.0.0'
     }).validate();
   });
 }
diff --git a/test/get/hosted/unlock_if_version_doesnt_exist_test.dart b/test/get/hosted/unlock_if_version_doesnt_exist_test.dart
index 8f2856c..7a03709 100644
--- a/test/get/hosted/unlock_if_version_doesnt_exist_test.dart
+++ b/test/get/hosted/unlock_if_version_doesnt_exist_test.dart
@@ -10,19 +10,19 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('upgrades a locked pub server package with a nonexistent version',
       () async {
-    await servePackages((builder) => builder.serve("foo", "1.0.0"));
+    await servePackages((builder) => builder.serve('foo', '1.0.0'));
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
     await pubGet();
-    await d.appPackagesFile({"foo": "1.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0'}).validate();
 
     deleteEntry(p.join(d.sandbox, cachePath));
 
-    globalPackageServer.replace((builder) => builder.serve("foo", "1.0.1"));
+    globalPackageServer.replace((builder) => builder.serve('foo', '1.0.1'));
     await pubGet();
-    await d.appPackagesFile({"foo": "1.0.1"}).validate();
+    await d.appPackagesFile({'foo': '1.0.1'}).validate();
   });
 }
diff --git a/test/get/package_name_test.dart b/test/get/package_name_test.dart
index febcd8a..8edad38 100644
--- a/test/get/package_name_test.dart
+++ b/test/get/package_name_test.dart
@@ -9,10 +9,10 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
-  test("pub get fails with a non-identifier name", () async {
+void main() {
+  test('pub get fails with a non-identifier name', () async {
     await d.dir(appPath, [
-      d.pubspec({"name": "invalid package name", "version": "1.0.0"})
+      d.pubspec({'name': 'invalid package name', 'version': '1.0.0'})
     ]).create();
 
     await pubGet(
@@ -21,17 +21,17 @@
 
     await d.dir(appPath, [
       // The lockfile should not be created.
-      d.nothing("pubspec.lock"),
+      d.nothing('pubspec.lock'),
       // The "packages" directory should not have been generated.
-      d.nothing("packages"),
+      d.nothing('packages'),
       // The ".packages" file should not have been created.
-      d.nothing(".packages"),
+      d.nothing('.packages'),
     ]).validate();
   });
 
-  test("pub get fails with a reserved word name", () async {
+  test('pub get fails with a reserved word name', () async {
     await d.dir(appPath, [
-      d.pubspec({"name": "return", "version": "1.0.0"})
+      d.pubspec({'name': 'return', 'version': '1.0.0'})
     ]).create();
 
     await pubGet(
@@ -40,24 +40,24 @@
 
     await d.dir(appPath, [
       // The lockfile should not be created.
-      d.nothing("pubspec.lock"),
+      d.nothing('pubspec.lock'),
       // The "packages" directory should not have been generated.
-      d.nothing("packages"),
+      d.nothing('packages'),
       // The ".packages" file should not have been created.
-      d.nothing(".packages"),
+      d.nothing('.packages'),
     ]).validate();
   });
 
-  test("pub get allows a name with dotted identifiers", () async {
+  test('pub get allows a name with dotted identifiers', () async {
     await d.dir(appPath, [
-      d.pubspec({"name": "foo.bar.baz", "version": "1.0.0"}),
-      d.libDir("foo.bar.baz", "foo.bar.baz 1.0.0")
+      d.pubspec({'name': 'foo.bar.baz', 'version': '1.0.0'}),
+      d.libDir('foo.bar.baz', 'foo.bar.baz 1.0.0')
     ]).create();
 
     await pubGet();
 
     await d.dir(appPath, [
-      d.packagesFile({"foo.bar.baz": "."}),
+      d.packagesFile({'foo.bar.baz': '.'}),
     ]).validate();
   });
 }
diff --git a/test/get/path/absolute_path_test.dart b/test/get/path/absolute_path_test.dart
index 97ab008..1d9cba6 100644
--- a/test/get/path/absolute_path_test.dart
+++ b/test/get/path/absolute_path_test.dart
@@ -9,19 +9,19 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('path dependency with absolute path', () async {
     await d
         .dir('foo', [d.libDir('foo'), d.libPubspec('foo', '0.0.1')]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": path.join(d.sandbox, "foo")}
+        'foo': {'path': path.join(d.sandbox, 'foo')}
       })
     ]).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": path.join(d.sandbox, "foo")}).validate();
+    await d.appPackagesFile({'foo': path.join(d.sandbox, 'foo')}).validate();
   });
 }
diff --git a/test/get/path/absolute_symlink_test.dart b/test/get/path/absolute_symlink_test.dart
index 13db694..79442d8 100644
--- a/test/get/path/absolute_symlink_test.dart
+++ b/test/get/path/absolute_symlink_test.dart
@@ -9,17 +9,17 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
-      "generates a symlink with an absolute path if the dependency "
-      "path was absolute", () async {
+      'generates a symlink with an absolute path if the dependency '
+      'path was absolute', () async {
     await d
-        .dir("foo", [d.libDir("foo"), d.libPubspec("foo", "0.0.1")]).create();
+        .dir('foo', [d.libDir('foo'), d.libPubspec('foo', '0.0.1')]).create();
 
-    var fooPath = d.path("foo");
+    var fooPath = d.path('foo');
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": fooPath}
+        'foo': {'path': fooPath}
       })
     ]).create();
 
@@ -29,13 +29,13 @@
       d.packagesFile({'myapp': '.', 'foo': fooPath})
     ]).validate();
 
-    await d.dir("moved").create();
+    await d.dir('moved').create();
 
     // Move the app but not the package. Since the symlink is absolute, it
     // should still be able to find it.
-    renameInSandbox(appPath, path.join("moved", appPath));
+    renameInSandbox(appPath, path.join('moved', appPath));
 
-    await d.dir("moved", [
+    await d.dir('moved', [
       d.dir(appPath, [
         d.packagesFile({'myapp': '.', 'foo': fooPath})
       ])
diff --git a/test/get/path/empty_pubspec_test.dart b/test/get/path/empty_pubspec_test.dart
index e504e2d..f2ef751 100644
--- a/test/get/path/empty_pubspec_test.dart
+++ b/test/get/path/empty_pubspec_test.dart
@@ -10,14 +10,14 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   // Regression test for issue 20103.
   test('path dependency to an empty pubspec', () async {
     await d.dir('foo', [d.libDir('foo'), d.file('pubspec.yaml', '')]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       })
     ]).create();
 
diff --git a/test/get/path/no_pubspec_test.dart b/test/get/path/no_pubspec_test.dart
index c63d9ad..89efae6 100644
--- a/test/get/path/no_pubspec_test.dart
+++ b/test/get/path/no_pubspec_test.dart
@@ -10,15 +10,15 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('path dependency to non-package directory', () async {
     // Make an empty directory.
     await d.dir('foo').create();
-    var fooPath = path.join(d.sandbox, "foo");
+    var fooPath = path.join(d.sandbox, 'foo');
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": fooPath}
+        'foo': {'path': fooPath}
       })
     ]).create();
 
diff --git a/test/get/path/nonexistent_dir_test.dart b/test/get/path/nonexistent_dir_test.dart
index 1495409..2937ee3 100644
--- a/test/get/path/nonexistent_dir_test.dart
+++ b/test/get/path/nonexistent_dir_test.dart
@@ -10,20 +10,20 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('path dependency to non-existent directory', () async {
-    var badPath = path.join(d.sandbox, "bad_path");
+    var badPath = path.join(d.sandbox, 'bad_path');
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": badPath}
+        'foo': {'path': badPath}
       })
     ]).create();
 
     await pubGet(
         error: allOf([
           contains("Because myapp depends on foo from path which doesn't exist "
-              "(could not find package foo at"),
+              '(could not find package foo at'),
           contains('bad_path"), version solving failed.')
         ]),
         exitCode: exit_codes.NO_INPUT);
diff --git a/test/get/path/path_is_file_test.dart b/test/get/path/path_is_file_test.dart
index 726f455..c52f23a 100644
--- a/test/get/path/path_is_file_test.dart
+++ b/test/get/path/path_is_file_test.dart
@@ -9,7 +9,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('path dependency when path is a file', () async {
     await d
         .dir('foo', [d.libDir('foo'), d.libPubspec('foo', '0.0.1')]).create();
@@ -19,7 +19,7 @@
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": dummyPath}
+        'foo': {'path': dummyPath}
       })
     ]).create();
 
diff --git a/test/get/path/relative_path_test.dart b/test/get/path/relative_path_test.dart
index fb2b69d..51cb737 100644
--- a/test/get/path/relative_path_test.dart
+++ b/test/get/path/relative_path_test.dart
@@ -11,62 +11,62 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("can use relative path", () async {
+void main() {
+  test('can use relative path', () async {
     await d
-        .dir("foo", [d.libDir("foo"), d.libPubspec("foo", "0.0.1")]).create();
+        .dir('foo', [d.libDir('foo'), d.libPubspec('foo', '0.0.1')]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       })
     ]).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "../foo"}).validate();
+    await d.appPackagesFile({'foo': '../foo'}).validate();
   });
 
-  test("path is relative to containing pubspec", () async {
-    await d.dir("relative", [
-      d.dir("foo", [
-        d.libDir("foo"),
-        d.libPubspec("foo", "0.0.1", deps: {
-          "bar": {"path": "../bar"}
+  test('path is relative to containing pubspec', () async {
+    await d.dir('relative', [
+      d.dir('foo', [
+        d.libDir('foo'),
+        d.libPubspec('foo', '0.0.1', deps: {
+          'bar': {'path': '../bar'}
         })
       ]),
-      d.dir("bar", [d.libDir("bar"), d.libPubspec("bar", "0.0.1")])
+      d.dir('bar', [d.libDir('bar'), d.libPubspec('bar', '0.0.1')])
     ]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../relative/foo"}
+        'foo': {'path': '../relative/foo'}
       })
     ]).create();
 
     await pubGet();
 
     await d.appPackagesFile(
-        {"foo": "../relative/foo", "bar": "../relative/bar"}).validate();
+        {'foo': '../relative/foo', 'bar': '../relative/bar'}).validate();
   });
 
-  test("relative path preserved in the lockfile", () async {
+  test('relative path preserved in the lockfile', () async {
     await d
-        .dir("foo", [d.libDir("foo"), d.libPubspec("foo", "0.0.1")]).create();
+        .dir('foo', [d.libDir('foo'), d.libPubspec('foo', '0.0.1')]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       })
     ]).create();
 
     await pubGet();
 
-    var lockfilePath = path.join(d.sandbox, appPath, "pubspec.lock");
+    var lockfilePath = path.join(d.sandbox, appPath, 'pubspec.lock');
     var lockfile = LockFile.load(lockfilePath, SourceRegistry());
-    var description = lockfile.packages["foo"].description;
+    var description = lockfile.packages['foo'].description;
 
-    expect(description["relative"], isTrue);
-    expect(description["path"], path.join(d.sandbox, "foo"));
+    expect(description['relative'], isTrue);
+    expect(description['path'], path.join(d.sandbox, 'foo'));
   });
 }
diff --git a/test/get/path/relative_symlink_test.dart b/test/get/path/relative_symlink_test.dart
index e73c921..abca3a6 100644
--- a/test/get/path/relative_symlink_test.dart
+++ b/test/get/path/relative_symlink_test.dart
@@ -6,7 +6,7 @@
 // These (unlike the symlinks that are supported in Vista and later) do not
 // support relative paths. So this test, by design, will not pass on Windows.
 // So just skip it.
-@TestOn("!windows")
+@TestOn('!windows')
 import 'package:test/test.dart';
 
 import 'package:path/path.dart' as path;
@@ -14,16 +14,16 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
-      "generates a symlink with a relative path if the dependency "
-      "path was relative", () async {
+      'generates a symlink with a relative path if the dependency '
+      'path was relative', () async {
     await d
-        .dir("foo", [d.libDir("foo"), d.libPubspec("foo", "0.0.1")]).create();
+        .dir('foo', [d.libDir('foo'), d.libPubspec('foo', '0.0.1')]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       })
     ]).create();
 
@@ -33,15 +33,15 @@
       d.packagesFile({'myapp': '.', 'foo': '../foo'})
     ]).validate();
 
-    await d.dir("moved").create();
+    await d.dir('moved').create();
 
     // Move the app and package. Since they are still next to each other, it
     // should still be found and have the same relative path in the package
     // spec.
-    renameInSandbox("foo", path.join("moved", "foo"));
-    renameInSandbox(appPath, path.join("moved", appPath));
+    renameInSandbox('foo', path.join('moved', 'foo'));
+    renameInSandbox(appPath, path.join('moved', appPath));
 
-    await d.dir("moved", [
+    await d.dir('moved', [
       d.dir(appPath, [
         d.packagesFile({'myapp': '.', 'foo': '../foo'})
       ])
diff --git a/test/get/path/shared_dependency_symlink_test.dart b/test/get/path/shared_dependency_symlink_test.dart
index 443dc4f..10a9415 100644
--- a/test/get/path/shared_dependency_symlink_test.dart
+++ b/test/get/path/shared_dependency_symlink_test.dart
@@ -9,34 +9,34 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("shared dependency with symlink", () async {
-    await d.dir("shared",
-        [d.libDir("shared"), d.libPubspec("shared", "0.0.1")]).create();
+void main() {
+  test('shared dependency with symlink', () async {
+    await d.dir('shared',
+        [d.libDir('shared'), d.libPubspec('shared', '0.0.1')]).create();
 
-    await d.dir("foo", [
-      d.libDir("foo"),
-      d.libPubspec("foo", "0.0.1", deps: {
-        "shared": {"path": "../shared"}
+    await d.dir('foo', [
+      d.libDir('foo'),
+      d.libPubspec('foo', '0.0.1', deps: {
+        'shared': {'path': '../shared'}
       })
     ]).create();
 
-    await d.dir("bar", [
-      d.libDir("bar"),
-      d.libPubspec("bar", "0.0.1", deps: {
-        "shared": {"path": "../link/shared"}
+    await d.dir('bar', [
+      d.libDir('bar'),
+      d.libPubspec('bar', '0.0.1', deps: {
+        'shared': {'path': '../link/shared'}
       })
     ]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "bar": {"path": "../bar"},
-        "foo": {"path": "../foo"},
+        'bar': {'path': '../bar'},
+        'foo': {'path': '../foo'},
       })
     ]).create();
 
-    await d.dir("link").create();
-    symlinkInSandbox("shared", path.join("link", "shared"));
+    await d.dir('link').create();
+    symlinkInSandbox('shared', path.join('link', 'shared'));
 
     await pubGet();
 
diff --git a/test/get/path/shared_dependency_test.dart b/test/get/path/shared_dependency_test.dart
index 9eee287..c87cf72 100644
--- a/test/get/path/shared_dependency_test.dart
+++ b/test/get/path/shared_dependency_test.dart
@@ -7,66 +7,66 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("shared dependency with same path", () async {
-    await d.dir("shared",
-        [d.libDir("shared"), d.libPubspec("shared", "0.0.1")]).create();
+void main() {
+  test('shared dependency with same path', () async {
+    await d.dir('shared',
+        [d.libDir('shared'), d.libPubspec('shared', '0.0.1')]).create();
 
-    await d.dir("foo", [
-      d.libDir("foo"),
-      d.libPubspec("foo", "0.0.1", deps: {
-        "shared": {"path": "../shared"}
+    await d.dir('foo', [
+      d.libDir('foo'),
+      d.libPubspec('foo', '0.0.1', deps: {
+        'shared': {'path': '../shared'}
       })
     ]).create();
 
-    await d.dir("bar", [
-      d.libDir("bar"),
-      d.libPubspec("bar", "0.0.1", deps: {
-        "shared": {"path": "../shared"}
+    await d.dir('bar', [
+      d.libDir('bar'),
+      d.libPubspec('bar', '0.0.1', deps: {
+        'shared': {'path': '../shared'}
       })
     ]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"},
-        "bar": {"path": "../bar"}
+        'foo': {'path': '../foo'},
+        'bar': {'path': '../bar'}
       })
     ]).create();
 
     await pubGet();
 
     await d.appPackagesFile(
-        {"foo": "../foo", "bar": "../bar", "shared": "../shared"}).validate();
+        {'foo': '../foo', 'bar': '../bar', 'shared': '../shared'}).validate();
   });
 
-  test("shared dependency with paths that normalize the same", () async {
-    await d.dir("shared",
-        [d.libDir("shared"), d.libPubspec("shared", "0.0.1")]).create();
+  test('shared dependency with paths that normalize the same', () async {
+    await d.dir('shared',
+        [d.libDir('shared'), d.libPubspec('shared', '0.0.1')]).create();
 
-    await d.dir("foo", [
-      d.libDir("foo"),
-      d.libPubspec("foo", "0.0.1", deps: {
-        "shared": {"path": "../shared"}
+    await d.dir('foo', [
+      d.libDir('foo'),
+      d.libPubspec('foo', '0.0.1', deps: {
+        'shared': {'path': '../shared'}
       })
     ]).create();
 
-    await d.dir("bar", [
-      d.libDir("bar"),
-      d.libPubspec("bar", "0.0.1", deps: {
-        "shared": {"path": "../././shared"}
+    await d.dir('bar', [
+      d.libDir('bar'),
+      d.libPubspec('bar', '0.0.1', deps: {
+        'shared': {'path': '../././shared'}
       })
     ]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"},
-        "bar": {"path": "../bar"}
+        'foo': {'path': '../foo'},
+        'bar': {'path': '../bar'}
       })
     ]).create();
 
     await pubGet();
 
     await d.appPackagesFile(
-        {"foo": "../foo", "bar": "../bar", "shared": "../shared"}).validate();
+        {'foo': '../foo', 'bar': '../bar', 'shared': '../shared'}).validate();
   });
 }
diff --git a/test/get/switch_source_test.dart b/test/get/switch_source_test.dart
index e3b8b05..d0860d2 100644
--- a/test/get/switch_source_test.dart
+++ b/test/get/switch_source_test.dart
@@ -7,24 +7,24 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('re-gets a package if its source has changed', () async {
-    await servePackages((builder) => builder.serve("foo", "1.2.3"));
+    await servePackages((builder) => builder.serve('foo', '1.2.3'));
 
     await d.dir('foo',
         [d.libDir('foo', 'foo 0.0.1'), d.libPubspec('foo', '0.0.1')]).create();
 
     await d.appDir({
-      "foo": {"path": "../foo"}
+      'foo': {'path': '../foo'}
     }).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "../foo"}).validate();
-    await d.appDir({"foo": "any"}).create();
+    await d.appPackagesFile({'foo': '../foo'}).validate();
+    await d.appDir({'foo': 'any'}).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.2.3"}).validate();
+    await d.appPackagesFile({'foo': '1.2.3'}).validate();
   });
 }
diff --git a/test/global/activate/activate_git_after_hosted_test.dart b/test/global/activate/activate_git_after_hosted_test.dart
index fa3af98..131c3ac 100644
--- a/test/global/activate/activate_git_after_hosted_test.dart
+++ b/test/global/activate/activate_git_after_hosted_test.dart
@@ -7,25 +7,25 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activating a Git package deactivates the hosted one', () async {
     ensureGit();
 
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("foo.dart", "main(args) => print('hosted');")])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")])
       ]);
     });
 
     await d.git('foo.git', [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('git');")])
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('git');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await runPub(
-        args: ["global", "activate", "-sgit", "../foo.git"],
+        args: ['global', 'activate', '-sgit', '../foo.git'],
         output: allOf(
             startsWith('Package foo is currently active at version 1.0.0.\n'
                 'Resolving dependencies...\n'
@@ -36,8 +36,8 @@
                 'Activated foo 1.0.0 from Git repository "../foo.git".')));
 
     // Should now run the git one.
-    var pub = await pubRun(global: true, args: ["foo"]);
-    expect(pub.stdout, emits("git"));
+    var pub = await pubRun(global: true, args: ['foo']);
+    expect(pub.stdout, emits('git'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/activate/activate_hosted_after_git_test.dart b/test/global/activate/activate_hosted_after_git_test.dart
index 0a3c6ae..aa7cd65 100644
--- a/test/global/activate/activate_hosted_after_git_test.dart
+++ b/test/global/activate/activate_hosted_after_git_test.dart
@@ -7,33 +7,33 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activating a hosted package deactivates the Git one', () async {
     await servePackages((builder) {
-      builder.serve("foo", "2.0.0", contents: [
-        d.dir("bin", [d.file("foo.dart", "main(args) => print('hosted');")])
+      builder.serve('foo', '2.0.0', contents: [
+        d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")])
       ]);
     });
 
     await d.git('foo.git', [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('git');")])
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('git');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "-sgit", "../foo.git"]);
+    await runPub(args: ['global', 'activate', '-sgit', '../foo.git']);
 
-    await runPub(args: ["global", "activate", "foo"], output: """
+    await runPub(args: ['global', 'activate', 'foo'], output: '''
         Package foo is currently active from Git repository "../foo.git".
         Resolving dependencies...
         + foo 2.0.0
         Downloading foo 2.0.0...
         Precompiling executables...
         Precompiled foo:foo.
-        Activated foo 2.0.0.""");
+        Activated foo 2.0.0.''');
 
     // Should now run the hosted one.
-    var pub = await pubRun(global: true, args: ["foo"]);
-    expect(pub.stdout, emits("hosted"));
+    var pub = await pubRun(global: true, args: ['foo']);
+    expect(pub.stdout, emits('hosted'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/activate/activate_hosted_after_path_test.dart b/test/global/activate/activate_hosted_after_path_test.dart
index ea9e941..208d136 100644
--- a/test/global/activate/activate_hosted_after_path_test.dart
+++ b/test/global/activate/activate_hosted_after_path_test.dart
@@ -10,34 +10,34 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activating a hosted package deactivates the path one', () async {
     await servePackages((builder) {
-      builder.serve("foo", "2.0.0", contents: [
-        d.dir("bin", [d.file("foo.dart", "main(args) => print('hosted');")])
+      builder.serve('foo', '2.0.0', contents: [
+        d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")])
       ]);
     });
 
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('path');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('path');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "-spath", "../foo"]);
+    await runPub(args: ['global', 'activate', '-spath', '../foo']);
 
-    var path = canonicalize(p.join(d.sandbox, "foo"));
-    await runPub(args: ["global", "activate", "foo"], output: """
+    var path = canonicalize(p.join(d.sandbox, 'foo'));
+    await runPub(args: ['global', 'activate', 'foo'], output: '''
         Package foo is currently active at path "$path".
         Resolving dependencies...
         + foo 2.0.0
         Downloading foo 2.0.0...
         Precompiling executables...
         Precompiled foo:foo.
-        Activated foo 2.0.0.""");
+        Activated foo 2.0.0.''');
 
     // Should now run the hosted one.
-    var pub = await pubRun(global: true, args: ["foo"]);
-    expect(pub.stdout, emits("hosted"));
+    var pub = await pubRun(global: true, args: ['foo']);
+    expect(pub.stdout, emits('hosted'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/activate/activate_path_after_hosted_test.dart b/test/global/activate/activate_path_after_hosted_test.dart
index 150d981..4cb53c2 100644
--- a/test/global/activate/activate_path_after_hosted_test.dart
+++ b/test/global/activate/activate_path_after_hosted_test.dart
@@ -9,32 +9,32 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activating a hosted package deactivates the path one', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("foo.dart", "main(args) => print('hosted');")])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")])
       ]);
     });
 
-    await d.dir("foo", [
-      d.libPubspec("foo", "2.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('path');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '2.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('path');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
-    var path = canonicalize(p.join(d.sandbox, "foo"));
+    var path = canonicalize(p.join(d.sandbox, 'foo'));
     await runPub(
-        args: ["global", "activate", "-spath", "../foo"],
+        args: ['global', 'activate', '-spath', '../foo'],
         output: allOf([
-          contains("Package foo is currently active at version 1.0.0."),
+          contains('Package foo is currently active at version 1.0.0.'),
           contains('Activated foo 2.0.0 at path "$path".')
         ]));
 
     // Should now run the path one.
-    var pub = await pubRun(global: true, args: ["foo"]);
-    expect(pub.stdout, emits("path"));
+    var pub = await pubRun(global: true, args: ['foo']);
+    expect(pub.stdout, emits('path'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/activate/bad_version_test.dart b/test/global/activate/bad_version_test.dart
index 7297cf5..c5c4635 100644
--- a/test/global/activate/bad_version_test.dart
+++ b/test/global/activate/bad_version_test.dart
@@ -7,10 +7,10 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if the version constraint cannot be parsed', () {
     return runPub(
-        args: ["global", "activate", "foo", "1.0"],
+        args: ['global', 'activate', 'foo', '1.0'],
         error:
             contains('Could not parse version "1.0". Unknown text at "1.0".'),
         exitCode: exit_codes.USAGE);
diff --git a/test/global/activate/cached_package_test.dart b/test/global/activate/cached_package_test.dart
index 5d6f61e..324e158 100644
--- a/test/global/activate/cached_package_test.dart
+++ b/test/global/activate/cached_package_test.dart
@@ -7,19 +7,19 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('can activate an already cached package', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
+      builder.serve('foo', '1.0.0');
     });
 
-    await runPub(args: ["cache", "add", "foo"]);
+    await runPub(args: ['cache', 'add', 'foo']);
 
-    await runPub(args: ["global", "activate", "foo"], output: """
+    await runPub(args: ['global', 'activate', 'foo'], output: '''
         Resolving dependencies...
         + foo 1.0.0
         Precompiling executables...
-        Activated foo 1.0.0.""");
+        Activated foo 1.0.0.''');
 
     // Should be in global package cache.
     await d.dir(cachePath, [
diff --git a/test/global/activate/constraint_test.dart b/test/global/activate/constraint_test.dart
index 1c634cd..0a18257 100644
--- a/test/global/activate/constraint_test.dart
+++ b/test/global/activate/constraint_test.dart
@@ -7,16 +7,16 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('chooses the highest version that matches the constraint', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
-      builder.serve("foo", "1.0.1");
-      builder.serve("foo", "1.1.0");
-      builder.serve("foo", "1.2.3");
+      builder.serve('foo', '1.0.0');
+      builder.serve('foo', '1.0.1');
+      builder.serve('foo', '1.1.0');
+      builder.serve('foo', '1.2.3');
     });
 
-    await runPub(args: ["global", "activate", "foo", "<1.1.0"]);
+    await runPub(args: ['global', 'activate', 'foo', '<1.1.0']);
 
     await d.dir(cachePath, [
       d.dir('global_packages', [
diff --git a/test/global/activate/constraint_with_path_test.dart b/test/global/activate/constraint_with_path_test.dart
index 39305ee..a7c26c5 100644
--- a/test/global/activate/constraint_with_path_test.dart
+++ b/test/global/activate/constraint_with_path_test.dart
@@ -8,10 +8,10 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if a version is passed with the path source', () {
     return runPub(
-        args: ["global", "activate", "-spath", "foo", "1.2.3"],
+        args: ['global', 'activate', '-spath', 'foo', '1.2.3'],
         error: contains('Unexpected argument "1.2.3".'),
         exitCode: exit_codes.USAGE);
   });
diff --git a/test/global/activate/custom_hosted_url_test.dart b/test/global/activate/custom_hosted_url_test.dart
index f5fb0c8..54ee463 100644
--- a/test/global/activate/custom_hosted_url_test.dart
+++ b/test/global/activate/custom_hosted_url_test.dart
@@ -6,33 +6,33 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activating a package from a custom pub server', () async {
     // The default pub server (i.e. pub.dartlang.org).
     await servePackages((builder) {
-      builder.serve("baz", "1.0.0");
+      builder.serve('baz', '1.0.0');
     });
 
     // The custom pub server.
     final customServer = await PackageServer.start((builder) {
       Map<String, dynamic> hostedDep(String name, String constraint) => {
-            "hosted": {
-              "url": builder.serverUrl,
-              "name": name,
+            'hosted': {
+              'url': builder.serverUrl,
+              'name': name,
             },
-            "version": constraint,
+            'version': constraint,
           };
-      builder.serve("foo", "1.0.0", deps: {"bar": hostedDep("bar", "any")});
-      builder.serve("bar", "1.0.0", deps: {"baz": "any"});
+      builder.serve('foo', '1.0.0', deps: {'bar': hostedDep('bar', 'any')});
+      builder.serve('bar', '1.0.0', deps: {'baz': 'any'});
     });
 
     await runPub(
-        args: ["global", "activate", "foo", "-u", customServer.url],
+        args: ['global', 'activate', 'foo', '-u', customServer.url],
         output: allOf([
-          contains("Downloading bar 1.0.0..."),
-          contains("Downloading baz 1.0.0..."),
-          contains("Downloading foo 1.0.0..."),
-          contains("Activated foo 1.0.0")
+          contains('Downloading bar 1.0.0...'),
+          contains('Downloading baz 1.0.0...'),
+          contains('Downloading foo 1.0.0...'),
+          contains('Activated foo 1.0.0')
         ]));
   });
 }
diff --git a/test/global/activate/different_version_test.dart b/test/global/activate/different_version_test.dart
index fa0c0bd..037f18d 100644
--- a/test/global/activate/different_version_test.dart
+++ b/test/global/activate/different_version_test.dart
@@ -6,25 +6,25 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       "discards the previous active version if it doesn't match the "
-      "constraint", () async {
+      'constraint', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
-      builder.serve("foo", "2.0.0");
+      builder.serve('foo', '1.0.0');
+      builder.serve('foo', '2.0.0');
     });
 
     // Activate 1.0.0.
-    await runPub(args: ["global", "activate", "foo", "1.0.0"]);
+    await runPub(args: ['global', 'activate', 'foo', '1.0.0']);
 
     // Activating it again with a different constraint changes the version.
-    await runPub(args: ["global", "activate", "foo", ">1.0.0"], output: """
+    await runPub(args: ['global', 'activate', 'foo', '>1.0.0'], output: '''
         Package foo is currently active at version 1.0.0.
         Resolving dependencies...
         + foo 2.0.0
         Downloading foo 2.0.0...
         Precompiling executables...
-        Activated foo 2.0.0.""");
+        Activated foo 2.0.0.''');
   });
 }
diff --git a/test/global/activate/doesnt_snapshot_path_executables_test.dart b/test/global/activate/doesnt_snapshot_path_executables_test.dart
index 7cbfddc..e988080 100644
--- a/test/global/activate/doesnt_snapshot_path_executables_test.dart
+++ b/test/global/activate/doesnt_snapshot_path_executables_test.dart
@@ -7,15 +7,15 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test("doesn't snapshots the executables for a path package", () async {
     await d.dir('foo', [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("hello.dart", "void main() => print('hello!');")])
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('hello.dart', "void main() => print('hello!');")])
     ]).create();
 
     await runPub(
-        args: ["global", "activate", "-spath", "../foo"],
+        args: ['global', 'activate', '-spath', '../foo'],
         output: isNot(contains('Precompiled foo:hello.')));
 
     await d.dir(cachePath, [
diff --git a/test/global/activate/empty_constraint_test.dart b/test/global/activate/empty_constraint_test.dart
index 882b343..c454755 100644
--- a/test/global/activate/empty_constraint_test.dart
+++ b/test/global/activate/empty_constraint_test.dart
@@ -8,15 +8,15 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('errors if the constraint matches no versions', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
-      builder.serve("foo", "1.0.1");
+      builder.serve('foo', '1.0.0');
+      builder.serve('foo', '1.0.1');
     });
 
     await runPub(
-        args: ["global", "activate", "foo", ">1.1.0"],
+        args: ['global', 'activate', 'foo', '>1.1.0'],
         error: equalsIgnoringWhitespace("""
           Because pub global activate depends on foo >1.1.0 which doesn't match
             any versions, version solving failed.
diff --git a/test/global/activate/feature_test.dart b/test/global/activate/feature_test.dart
index a99ec1d..6095aa1 100644
--- a/test/global/activate/feature_test.dart
+++ b/test/global/activate/feature_test.dart
@@ -8,145 +8,145 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('enables default-on features by default', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "features": {
-          "stuff": {
-            "dependencies": {"bar": "1.0.0"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'features': {
+          'stuff': {
+            'dependencies': {'bar': '1.0.0'}
           },
-          "things": {
-            "default": false,
-            "dependencies": {"baz": "1.0.0"}
+          'things': {
+            'default': false,
+            'dependencies': {'baz': '1.0.0'}
           }
         }
       });
 
-      builder.serve("bar", "1.0.0");
-      builder.serve("baz", "1.0.0");
+      builder.serve('bar', '1.0.0');
+      builder.serve('baz', '1.0.0');
     });
 
-    await runPub(args: ["global", "activate", "foo"], output: contains("""
+    await runPub(args: ['global', 'activate', 'foo'], output: contains('''
 Resolving dependencies...
 + bar 1.0.0
 + foo 1.0.0
-Downloading"""));
+Downloading'''));
   });
 
   test('can enable default-off features', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "features": {
-          "stuff": {
-            "dependencies": {"bar": "1.0.0"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'features': {
+          'stuff': {
+            'dependencies': {'bar': '1.0.0'}
           },
-          "things": {
-            "default": false,
-            "dependencies": {"baz": "1.0.0"}
+          'things': {
+            'default': false,
+            'dependencies': {'baz': '1.0.0'}
           }
         }
       });
 
-      builder.serve("bar", "1.0.0");
-      builder.serve("baz", "1.0.0");
+      builder.serve('bar', '1.0.0');
+      builder.serve('baz', '1.0.0');
     });
 
     await runPub(
-        args: ["global", "activate", "foo", "--features", "things"],
-        output: contains("""
+        args: ['global', 'activate', 'foo', '--features', 'things'],
+        output: contains('''
 Resolving dependencies...
 + bar 1.0.0
 + baz 1.0.0
 + foo 1.0.0
-Downloading"""));
+Downloading'''));
   });
 
   test('can disable default-on features', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "features": {
-          "stuff": {
-            "dependencies": {"bar": "1.0.0"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'features': {
+          'stuff': {
+            'dependencies': {'bar': '1.0.0'}
           },
-          "things": {
-            "default": false,
-            "dependencies": {"baz": "1.0.0"}
+          'things': {
+            'default': false,
+            'dependencies': {'baz': '1.0.0'}
           }
         }
       });
 
-      builder.serve("bar", "1.0.0");
-      builder.serve("baz", "1.0.0");
+      builder.serve('bar', '1.0.0');
+      builder.serve('baz', '1.0.0');
     });
 
     await runPub(
-        args: ["global", "activate", "foo", "--omit-features", "stuff"],
-        output: contains("""
+        args: ['global', 'activate', 'foo', '--omit-features', 'stuff'],
+        output: contains('''
 Resolving dependencies...
 + foo 1.0.0
-Downloading"""));
+Downloading'''));
   });
 
   test('supports multiple arguments', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "features": {
-          "stuff": {
-            "default": false,
-            "dependencies": {"bar": "1.0.0"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'features': {
+          'stuff': {
+            'default': false,
+            'dependencies': {'bar': '1.0.0'}
           },
-          "things": {
-            "default": false,
-            "dependencies": {"baz": "1.0.0"}
+          'things': {
+            'default': false,
+            'dependencies': {'baz': '1.0.0'}
           }
         }
       });
 
-      builder.serve("bar", "1.0.0");
-      builder.serve("baz", "1.0.0");
+      builder.serve('bar', '1.0.0');
+      builder.serve('baz', '1.0.0');
     });
 
     await runPub(
-        args: ["global", "activate", "foo", "--features", "things,stuff"],
-        output: contains("""
+        args: ['global', 'activate', 'foo', '--features', 'things,stuff'],
+        output: contains('''
 Resolving dependencies...
 + bar 1.0.0
 + baz 1.0.0
 + foo 1.0.0
-Downloading"""));
+Downloading'''));
   });
 
   test('can both enable and disable', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "features": {
-          "stuff": {
-            "dependencies": {"bar": "1.0.0"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'features': {
+          'stuff': {
+            'dependencies': {'bar': '1.0.0'}
           },
-          "things": {
-            "default": false,
-            "dependencies": {"baz": "1.0.0"}
+          'things': {
+            'default': false,
+            'dependencies': {'baz': '1.0.0'}
           }
         }
       });
 
-      builder.serve("bar", "1.0.0");
-      builder.serve("baz", "1.0.0");
+      builder.serve('bar', '1.0.0');
+      builder.serve('baz', '1.0.0');
     });
 
     await runPub(args: [
-      "global",
-      "activate",
-      "foo",
-      "--features",
-      "things",
-      "--omit-features",
-      "stuff"
-    ], output: contains("""
+      'global',
+      'activate',
+      'foo',
+      '--features',
+      'things',
+      '--omit-features',
+      'stuff'
+    ], output: contains('''
 Resolving dependencies...
 + baz 1.0.0
 + foo 1.0.0
-Downloading"""));
+Downloading'''));
   });
 }
diff --git a/test/global/activate/git_package_test.dart b/test/global/activate/git_package_test.dart
index d7918d7..6e201f4 100644
--- a/test/global/activate/git_package_test.dart
+++ b/test/global/activate/git_package_test.dart
@@ -7,17 +7,17 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activates a package from a Git repo', () async {
     ensureGit();
 
     await d.git('foo.git', [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
     await runPub(
-        args: ["global", "activate", "-sgit", "../foo.git"],
+        args: ['global', 'activate', '-sgit', '../foo.git'],
         output: allOf(
             startsWith('Resolving dependencies...\n'
                 '+ foo 1.0.0 from git ../foo.git at '),
diff --git a/test/global/activate/ignores_active_version_test.dart b/test/global/activate/ignores_active_version_test.dart
index 843cce2..9d57d58 100644
--- a/test/global/activate/ignores_active_version_test.dart
+++ b/test/global/activate/ignores_active_version_test.dart
@@ -6,23 +6,23 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('ignores previously activated version', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.3");
-      builder.serve("foo", "1.3.0");
+      builder.serve('foo', '1.2.3');
+      builder.serve('foo', '1.3.0');
     });
 
     // Activate 1.2.3.
-    await runPub(args: ["global", "activate", "foo", "1.2.3"]);
+    await runPub(args: ['global', 'activate', 'foo', '1.2.3']);
 
     // Activating it again resolves to the new best version.
-    await runPub(args: ["global", "activate", "foo", ">1.0.0"], output: """
+    await runPub(args: ['global', 'activate', 'foo', '>1.0.0'], output: '''
         Package foo is currently active at version 1.2.3.
         Resolving dependencies...
         + foo 1.3.0
         Downloading foo 1.3.0...
         Precompiling executables...
-        Activated foo 1.3.0.""");
+        Activated foo 1.3.0.''');
   });
 }
diff --git a/test/global/activate/installs_dependencies_for_git_test.dart b/test/global/activate/installs_dependencies_for_git_test.dart
index 35c3c98..e67fad4 100644
--- a/test/global/activate/installs_dependencies_for_git_test.dart
+++ b/test/global/activate/installs_dependencies_for_git_test.dart
@@ -7,23 +7,23 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activating a Git package installs its dependencies', () async {
     await servePackages((builder) {
-      builder.serve("bar", "1.0.0", deps: {"baz": "any"});
-      builder.serve("baz", "1.0.0");
+      builder.serve('bar', '1.0.0', deps: {'baz': 'any'});
+      builder.serve('baz', '1.0.0');
     });
 
     await d.git('foo.git', [
-      d.libPubspec("foo", "1.0.0", deps: {"bar": "any"}),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+      d.libPubspec('foo', '1.0.0', deps: {'bar': 'any'}),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
     await runPub(
-        args: ["global", "activate", "-sgit", "../foo.git"],
+        args: ['global', 'activate', '-sgit', '../foo.git'],
         output: allOf([
-          contains("Downloading bar 1.0.0..."),
-          contains("Downloading baz 1.0.0...")
+          contains('Downloading bar 1.0.0...'),
+          contains('Downloading baz 1.0.0...')
         ]));
   });
 }
diff --git a/test/global/activate/installs_dependencies_for_path_test.dart b/test/global/activate/installs_dependencies_for_path_test.dart
index 0c08d79..58a8708 100644
--- a/test/global/activate/installs_dependencies_for_path_test.dart
+++ b/test/global/activate/installs_dependencies_for_path_test.dart
@@ -7,34 +7,34 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activating a path package installs dependencies', () async {
     await servePackages((builder) {
-      builder.serve("bar", "1.0.0", deps: {"baz": "any"});
-      builder.serve("baz", "2.0.0");
+      builder.serve('bar', '1.0.0', deps: {'baz': 'any'});
+      builder.serve('baz', '2.0.0');
     });
 
-    await d.dir("foo", [
-      d.libPubspec("foo", "0.0.0", deps: {"bar": "any"}),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '0.0.0', deps: {'bar': 'any'}),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    var pub = await startPub(args: ["global", "activate", "-spath", "../foo"]);
-    expect(pub.stdout, emitsThrough("Resolving dependencies..."));
-    expect(pub.stdout, emitsThrough("Downloading bar 1.0.0..."));
-    expect(pub.stdout, emitsThrough("Downloading baz 2.0.0..."));
-    expect(pub.stdout, emitsThrough(startsWith("Activated foo 0.0.0 at path")));
+    var pub = await startPub(args: ['global', 'activate', '-spath', '../foo']);
+    expect(pub.stdout, emitsThrough('Resolving dependencies...'));
+    expect(pub.stdout, emitsThrough('Downloading bar 1.0.0...'));
+    expect(pub.stdout, emitsThrough('Downloading baz 2.0.0...'));
+    expect(pub.stdout, emitsThrough(startsWith('Activated foo 0.0.0 at path')));
     await pub.shouldExit();
 
     // Puts the lockfile in the linked package itself.
-    await d.dir("foo", [
+    await d.dir('foo', [
       d.file(
-          "pubspec.lock",
+          'pubspec.lock',
           allOf([
-            contains("bar"),
-            contains("1.0.0"),
-            contains("baz"),
-            contains("2.0.0")
+            contains('bar'),
+            contains('1.0.0'),
+            contains('baz'),
+            contains('2.0.0')
           ]))
     ]).validate();
   });
diff --git a/test/global/activate/installs_dependencies_test.dart b/test/global/activate/installs_dependencies_test.dart
index e05e1ee..7114170 100644
--- a/test/global/activate/installs_dependencies_test.dart
+++ b/test/global/activate/installs_dependencies_test.dart
@@ -6,19 +6,19 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activating a package installs its dependencies', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", deps: {"bar": "any"});
-      builder.serve("bar", "1.0.0", deps: {"baz": "any"});
-      builder.serve("baz", "1.0.0");
+      builder.serve('foo', '1.0.0', deps: {'bar': 'any'});
+      builder.serve('bar', '1.0.0', deps: {'baz': 'any'});
+      builder.serve('baz', '1.0.0');
     });
 
     await runPub(
-        args: ["global", "activate", "foo"],
+        args: ['global', 'activate', 'foo'],
         output: allOf([
-          contains("Downloading bar 1.0.0..."),
-          contains("Downloading baz 1.0.0...")
+          contains('Downloading bar 1.0.0...'),
+          contains('Downloading baz 1.0.0...')
         ]));
   });
 }
diff --git a/test/global/activate/missing_git_repo_test.dart b/test/global/activate/missing_git_repo_test.dart
index 27177cb..ece251e 100644
--- a/test/global/activate/missing_git_repo_test.dart
+++ b/test/global/activate/missing_git_repo_test.dart
@@ -8,12 +8,12 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if the Git repo does not exist', () async {
     ensureGit();
 
     await runPub(
-        args: ["global", "activate", "-sgit", "../nope.git"],
+        args: ['global', 'activate', '-sgit', '../nope.git'],
         error: contains("repository '../nope.git' does not exist"),
         exitCode: exit_codes.UNAVAILABLE);
   });
diff --git a/test/global/activate/missing_package_arg_test.dart b/test/global/activate/missing_package_arg_test.dart
index 72b28f1..155393a 100644
--- a/test/global/activate/missing_package_arg_test.dart
+++ b/test/global/activate/missing_package_arg_test.dart
@@ -8,11 +8,11 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if no package was given', () {
     return runPub(
-        args: ["global", "activate"],
-        error: contains("No package to activate given."),
+        args: ['global', 'activate'],
+        error: contains('No package to activate given.'),
         exitCode: exit_codes.USAGE);
   });
 }
diff --git a/test/global/activate/outdated_binstub_test.dart b/test/global/activate/outdated_binstub_test.dart
index d853a03..d8bc249 100644
--- a/test/global/activate/outdated_binstub_test.dart
+++ b/test/global/activate/outdated_binstub_test.dart
@@ -7,7 +7,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-const _OUTDATED_BINSTUB = """
+const _OUTDATED_BINSTUB = '''
 #!/usr/bin/env sh
 # This file was created by pub v0.1.2-3.
 # Package: foo
@@ -15,31 +15,31 @@
 # Executable: foo-script
 # Script: script
 dart "/path/to/.pub-cache/global_packages/foo/bin/script.dart.snapshot" "\$@"
-""";
+''';
 
-main() {
-  test("an outdated binstub is replaced", () async {
+void main() {
+  test('an outdated binstub is replaced', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "executables": {"foo-script": "script"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'executables': {'foo-script': 'script'}
       }, contents: [
         d.dir(
-            "bin", [d.file("script.dart", "main(args) => print('ok \$args');")])
+            'bin', [d.file('script.dart', "main(args) => print('ok \$args');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.dir(cachePath, [
       d.dir('bin', [d.file(binStubName('foo-script'), _OUTDATED_BINSTUB)])
     ]).create();
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.dir(cachePath, [
       d.dir('bin', [
         // 253 is the VM's exit code upon seeing an out-of-date snapshot.
-        d.file(binStubName('foo-script'), contains("253"))
+        d.file(binStubName('foo-script'), contains('253'))
       ])
     ]).validate();
   });
diff --git a/test/global/activate/path_package_test.dart b/test/global/activate/path_package_test.dart
index 663009d..fe061db 100644
--- a/test/global/activate/path_package_test.dart
+++ b/test/global/activate/path_package_test.dart
@@ -10,28 +10,28 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activates a package at a local path', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    var path = canonicalize(p.join(d.sandbox, "foo"));
+    var path = canonicalize(p.join(d.sandbox, 'foo'));
     await runPub(
-        args: ["global", "activate", "--source", "path", "../foo"],
+        args: ['global', 'activate', '--source', 'path', '../foo'],
         output: endsWith('Activated foo 1.0.0 at path "$path".'));
   });
 
   // Regression test for #1751
   test('activates a package at a local path with a relative path dependency',
       () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0", deps: {
-        "bar": {"path": "../bar"}
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0', deps: {
+        'bar': {'path': '../bar'}
       }),
-      d.dir("bin", [
-        d.file("foo.dart", """
+      d.dir('bin', [
+        d.file('foo.dart', """
         import 'package:bar/bar.dart';
 
         main() => print(value);
@@ -39,19 +39,19 @@
       ])
     ]).create();
 
-    await d.dir("bar", [
-      d.libPubspec("bar", "1.0.0"),
-      d.dir("lib", [d.file("bar.dart", "final value = 'ok';")])
+    await d.dir('bar', [
+      d.libPubspec('bar', '1.0.0'),
+      d.dir('lib', [d.file('bar.dart', "final value = 'ok';")])
     ]).create();
 
-    var path = canonicalize(p.join(d.sandbox, "foo"));
+    var path = canonicalize(p.join(d.sandbox, 'foo'));
     await runPub(
-        args: ["global", "activate", "--source", "path", "../foo"],
+        args: ['global', 'activate', '--source', 'path', '../foo'],
         output: endsWith('Activated foo 1.0.0 at path "$path".'));
 
     await runPub(
-        args: ["global", "run", "foo"],
-        output: "ok",
+        args: ['global', 'run', 'foo'],
+        output: 'ok',
         workingDirectory: p.current);
   });
 }
diff --git a/test/global/activate/reactivating_git_upgrades_test.dart b/test/global/activate/reactivating_git_upgrades_test.dart
index 3c09796..4ba3e89 100644
--- a/test/global/activate/reactivating_git_upgrades_test.dart
+++ b/test/global/activate/reactivating_git_upgrades_test.dart
@@ -7,14 +7,14 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('ignores previously activated git commit', () async {
     ensureGit();
 
-    await d.git('foo.git', [d.libPubspec("foo", "1.0.0")]).create();
+    await d.git('foo.git', [d.libPubspec('foo', '1.0.0')]).create();
 
     await runPub(
-        args: ["global", "activate", "-sgit", "../foo.git"],
+        args: ['global', 'activate', '-sgit', '../foo.git'],
         output: allOf(
             startsWith('Resolving dependencies...\n'
                 '+ foo 1.0.0 from git ../foo.git at '),
@@ -22,11 +22,11 @@
             endsWith('Precompiling executables...\n'
                 'Activated foo 1.0.0 from Git repository "../foo.git".')));
 
-    await d.git('foo.git', [d.libPubspec("foo", "1.0.1")]).commit();
+    await d.git('foo.git', [d.libPubspec('foo', '1.0.1')]).commit();
 
     // Activating it again pulls down the latest commit.
     await runPub(
-        args: ["global", "activate", "-sgit", "../foo.git"],
+        args: ['global', 'activate', '-sgit', '../foo.git'],
         output: allOf(
             startsWith('Package foo is currently active from Git repository '
                 '"../foo.git".\n'
diff --git a/test/global/activate/removes_old_lockfile_test.dart b/test/global/activate/removes_old_lockfile_test.dart
index b89c992..a91a153 100644
--- a/test/global/activate/removes_old_lockfile_test.dart
+++ b/test/global/activate/removes_old_lockfile_test.dart
@@ -7,10 +7,10 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('removes the 1.6-style lockfile', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
+      builder.serve('foo', '1.0.0');
     });
 
     await d.dir(cachePath, [
@@ -22,7 +22,7 @@
       ])
     ]).create();
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.dir(cachePath, [
       d.dir('global_packages', [
diff --git a/test/global/activate/snapshots_git_executables_test.dart b/test/global/activate/snapshots_git_executables_test.dart
index 1ad271f..e57c19a 100644
--- a/test/global/activate/snapshots_git_executables_test.dart
+++ b/test/global/activate/snapshots_git_executables_test.dart
@@ -7,25 +7,25 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('snapshots the executables for a Git repo', () async {
     ensureGit();
 
     await d.git('foo.git', [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [
-        d.file("hello.dart", "void main() => print('hello!');"),
-        d.file("goodbye.dart", "void main() => print('goodbye!');"),
-        d.file("shell.sh", "echo shell"),
-        d.dir("subdir", [d.file("sub.dart", "void main() => print('sub!');")])
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [
+        d.file('hello.dart', "void main() => print('hello!');"),
+        d.file('goodbye.dart', "void main() => print('goodbye!');"),
+        d.file('shell.sh', 'echo shell'),
+        d.dir('subdir', [d.file('sub.dart', "void main() => print('sub!');")])
       ])
     ]).create();
 
     await runPub(
-        args: ["global", "activate", "-sgit", "../foo.git"],
+        args: ['global', 'activate', '-sgit', '../foo.git'],
         output: allOf([
           contains('Precompiled foo:hello.'),
-          contains("Precompiled foo:goodbye.")
+          contains('Precompiled foo:goodbye.')
         ]));
 
     await d.dir(cachePath, [
diff --git a/test/global/activate/snapshots_hosted_executables_test.dart b/test/global/activate/snapshots_hosted_executables_test.dart
index 91083cf..5f7761f 100644
--- a/test/global/activate/snapshots_hosted_executables_test.dart
+++ b/test/global/activate/snapshots_hosted_executables_test.dart
@@ -7,24 +7,24 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('snapshots the executables for a hosted package', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
+      builder.serve('foo', '1.0.0', contents: [
         d.dir('bin', [
-          d.file("hello.dart", "void main() => print('hello!');"),
-          d.file("goodbye.dart", "void main() => print('goodbye!');"),
-          d.file("shell.sh", "echo shell"),
-          d.dir("subdir", [d.file("sub.dart", "void main() => print('sub!');")])
+          d.file('hello.dart', "void main() => print('hello!');"),
+          d.file('goodbye.dart', "void main() => print('goodbye!');"),
+          d.file('shell.sh', 'echo shell'),
+          d.dir('subdir', [d.file('sub.dart', "void main() => print('sub!');")])
         ])
       ]);
     });
 
     await runPub(
-        args: ["global", "activate", "foo"],
+        args: ['global', 'activate', 'foo'],
         output: allOf([
           contains('Precompiled foo:hello.'),
-          contains("Precompiled foo:goodbye.")
+          contains('Precompiled foo:goodbye.')
         ]));
 
     await d.dir(cachePath, [
diff --git a/test/global/activate/supports_version_solver_backtracking_test.dart b/test/global/activate/supports_version_solver_backtracking_test.dart
index e7e247f..7731bc6 100644
--- a/test/global/activate/supports_version_solver_backtracking_test.dart
+++ b/test/global/activate/supports_version_solver_backtracking_test.dart
@@ -7,18 +7,18 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('performs verison solver backtracking if necessary', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.1.0", pubspec: {
-        "environment": {"sdk": ">=0.1.2 <0.2.0"}
+      builder.serve('foo', '1.1.0', pubspec: {
+        'environment': {'sdk': '>=0.1.2 <0.2.0'}
       });
-      builder.serve("foo", "1.2.0", pubspec: {
-        "environment": {"sdk": ">=0.1.3 <0.2.0"}
+      builder.serve('foo', '1.2.0', pubspec: {
+        'environment': {'sdk': '>=0.1.3 <0.2.0'}
       });
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     // foo 1.2.0 won't be picked because its SDK constraint conflicts with the
     // dummy SDK version 0.1.2+3.
diff --git a/test/global/activate/uncached_package_test.dart b/test/global/activate/uncached_package_test.dart
index eb1c0b4..3fa546c 100644
--- a/test/global/activate/uncached_package_test.dart
+++ b/test/global/activate/uncached_package_test.dart
@@ -7,20 +7,20 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('installs and activates the best version of a package', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
-      builder.serve("foo", "1.2.3");
-      builder.serve("foo", "2.0.0-wildly.unstable");
+      builder.serve('foo', '1.0.0');
+      builder.serve('foo', '1.2.3');
+      builder.serve('foo', '2.0.0-wildly.unstable');
     });
 
-    await runPub(args: ["global", "activate", "foo"], output: """
+    await runPub(args: ['global', 'activate', 'foo'], output: '''
         Resolving dependencies...
         + foo 1.2.3 (2.0.0-wildly.unstable available)
         Downloading foo 1.2.3...
         Precompiling executables...
-        Activated foo 1.2.3.""");
+        Activated foo 1.2.3.''');
 
     // Should be in global package cache.
     await d.dir(cachePath, [
diff --git a/test/global/activate/unexpected_arguments_test.dart b/test/global/activate/unexpected_arguments_test.dart
index 7507c5c..be6633d 100644
--- a/test/global/activate/unexpected_arguments_test.dart
+++ b/test/global/activate/unexpected_arguments_test.dart
@@ -7,10 +7,10 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if there are extra arguments', () {
     return runPub(
-        args: ["global", "activate", "foo", "1.0.0", "bar", "baz"],
+        args: ['global', 'activate', 'foo', '1.0.0', 'bar', 'baz'],
         error: contains('Unexpected arguments "bar" and "baz".'),
         exitCode: exit_codes.USAGE);
   });
diff --git a/test/global/activate/unknown_package_test.dart b/test/global/activate/unknown_package_test.dart
index 3e6ecb8..93a5d3a 100644
--- a/test/global/activate/unknown_package_test.dart
+++ b/test/global/activate/unknown_package_test.dart
@@ -7,17 +7,17 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('errors if the package could not be found', () async {
     await serveNoPackages();
 
     await runPub(
-        args: ["global", "activate", "foo"],
+        args: ['global', 'activate', 'foo'],
         error: allOf([
           contains(
               "Because pub global activate depends on foo any which doesn't "
-              "exist (could not find package foo at http://localhost:"),
-          contains("), version solving failed.")
+              'exist (could not find package foo at http://localhost:'),
+          contains('), version solving failed.')
         ]),
         exitCode: exit_codes.UNAVAILABLE);
   });
diff --git a/test/global/binstubs/binstub_runs_executable_test.dart b/test/global/binstubs/binstub_runs_executable_test.dart
index 63a9ef8..57e7c02 100644
--- a/test/global/binstubs/binstub_runs_executable_test.dart
+++ b/test/global/binstubs/binstub_runs_executable_test.dart
@@ -10,45 +10,45 @@
 import '../../test_pub.dart';
 import 'utils.dart';
 
-main() {
-  test("the generated binstub runs a snapshotted executable", () async {
+void main() {
+  test('the generated binstub runs a snapshotted executable', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "executables": {"foo-script": "script"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'executables': {'foo-script': 'script'}
       }, contents: [
         d.dir(
-            "bin", [d.file("script.dart", "main(args) => print('ok \$args');")])
+            'bin', [d.file('script.dart', "main(args) => print('ok \$args');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     var process = await TestProcess.start(
-        p.join(d.sandbox, cachePath, "bin", binStubName("foo-script")),
-        ["arg1", "arg2"],
+        p.join(d.sandbox, cachePath, 'bin', binStubName('foo-script')),
+        ['arg1', 'arg2'],
         environment: getEnvironment());
 
-    expect(process.stdout, emits("ok [arg1, arg2]"));
+    expect(process.stdout, emits('ok [arg1, arg2]'));
     await process.shouldExit();
   });
 
-  test("the generated binstub runs a non-snapshotted executable", () async {
-    await d.dir("foo", [
+  test('the generated binstub runs a non-snapshotted executable', () async {
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"foo-script": "script"}
+        'name': 'foo',
+        'executables': {'foo-script': 'script'}
       }),
-      d.dir("bin", [d.file("script.dart", "main(args) => print('ok \$args');")])
+      d.dir('bin', [d.file('script.dart', "main(args) => print('ok \$args');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "-spath", "../foo"]);
+    await runPub(args: ['global', 'activate', '-spath', '../foo']);
 
     var process = await TestProcess.start(
-        p.join(d.sandbox, cachePath, "bin", binStubName("foo-script")),
-        ["arg1", "arg2"],
+        p.join(d.sandbox, cachePath, 'bin', binStubName('foo-script')),
+        ['arg1', 'arg2'],
         environment: getEnvironment());
 
-    expect(process.stdout, emits("ok [arg1, arg2]"));
+    expect(process.stdout, emits('ok [arg1, arg2]'));
     await process.shouldExit();
   });
 }
diff --git a/test/global/binstubs/binstub_runs_global_run_if_no_snapshot_test.dart b/test/global/binstubs/binstub_runs_global_run_if_no_snapshot_test.dart
index b89d5e4..8024c3a 100644
--- a/test/global/binstubs/binstub_runs_global_run_if_no_snapshot_test.dart
+++ b/test/global/binstubs/binstub_runs_global_run_if_no_snapshot_test.dart
@@ -7,24 +7,24 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("the binstubs runs pub global run if there is no snapshot", () async {
-    await d.dir("foo", [
+void main() {
+  test('the binstubs runs pub global run if there is no snapshot', () async {
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"foo-script": "script"}
+        'name': 'foo',
+        'executables': {'foo-script': 'script'}
       }),
-      d.dir("bin", [d.file("script.dart", "main() => print('ok');")])
+      d.dir('bin', [d.file('script.dart', "main() => print('ok');")])
     ]).create();
 
     // Path packages are mutable, so no snapshot is created.
     await runPub(
-        args: ["global", "activate", "--source", "path", "../foo"],
-        output: contains("Installed executable foo-script."));
+        args: ['global', 'activate', '--source', 'path', '../foo'],
+        output: contains('Installed executable foo-script.'));
 
     await d.dir(cachePath, [
-      d.dir("bin", [
-        d.file(binStubName("foo-script"), contains("pub global run foo:script"))
+      d.dir('bin', [
+        d.file(binStubName('foo-script'), contains('pub global run foo:script'))
       ])
     ]).validate();
   });
diff --git a/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart b/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart
index e6b5af5..0fa7282 100644
--- a/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart
+++ b/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart
@@ -7,21 +7,21 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("the binstubs runs a precompiled snapshot if present", () async {
+void main() {
+  test('the binstubs runs a precompiled snapshot if present', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "executables": {"foo-script": "script"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'executables': {'foo-script': 'script'}
       }, contents: [
-        d.dir("bin", [d.file("script.dart", "main(args) => print('ok');")])
+        d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.dir(cachePath, [
-      d.dir("bin",
-          [d.file(binStubName("foo-script"), contains("script.dart.snapshot"))])
+      d.dir('bin',
+          [d.file(binStubName('foo-script'), contains('script.dart.snapshot'))])
     ]).validate();
   });
 }
diff --git a/test/global/binstubs/creates_executables_in_pubspec_test.dart b/test/global/binstubs/creates_executables_in_pubspec_test.dart
index 34d9010..8fe53dc 100644
--- a/test/global/binstubs/creates_executables_in_pubspec_test.dart
+++ b/test/global/binstubs/creates_executables_in_pubspec_test.dart
@@ -7,30 +7,30 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("creates binstubs for each executable in the pubspec", () async {
+void main() {
+  test('creates binstubs for each executable in the pubspec', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "executables": {"one": null, "two-renamed": "second"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'executables': {'one': null, 'two-renamed': 'second'}
       }, contents: [
-        d.dir("bin", [
-          d.file("one.dart", "main(args) => print('one');"),
-          d.file("second.dart", "main(args) => print('two');"),
-          d.file("nope.dart", "main(args) => print('nope');")
+        d.dir('bin', [
+          d.file('one.dart', "main(args) => print('one');"),
+          d.file('second.dart', "main(args) => print('two');"),
+          d.file('nope.dart', "main(args) => print('nope');")
         ])
       ]);
     });
 
     await runPub(
-        args: ["global", "activate", "foo"],
-        output: contains("Installed executables one and two-renamed."));
+        args: ['global', 'activate', 'foo'],
+        output: contains('Installed executables one and two-renamed.'));
 
     await d.dir(cachePath, [
-      d.dir("bin", [
-        d.file(binStubName("one"), contains("one")),
-        d.file(binStubName("two-renamed"), contains("second")),
-        d.nothing(binStubName("two")),
-        d.nothing(binStubName("nope"))
+      d.dir('bin', [
+        d.file(binStubName('one'), contains('one')),
+        d.file(binStubName('two-renamed'), contains('second')),
+        d.nothing(binStubName('two')),
+        d.nothing(binStubName('nope'))
       ])
     ]).validate();
   });
diff --git a/test/global/binstubs/does_not_warn_if_no_executables_test.dart b/test/global/binstubs/does_not_warn_if_no_executables_test.dart
index b0cd408..b7ca722 100644
--- a/test/global/binstubs/does_not_warn_if_no_executables_test.dart
+++ b/test/global/binstubs/does_not_warn_if_no_executables_test.dart
@@ -7,17 +7,17 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("does not warn if the package has no executables", () async {
+void main() {
+  test('does not warn if the package has no executables', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
+      builder.serve('foo', '1.0.0', contents: [
         d.dir(
-            "bin", [d.file("script.dart", "main(args) => print('ok \$args');")])
+            'bin', [d.file('script.dart', "main(args) => print('ok \$args');")])
       ]);
     });
 
     await runPub(
-        args: ["global", "activate", "foo"],
-        output: isNot(contains("is not on your path")));
+        args: ['global', 'activate', 'foo'],
+        output: isNot(contains('is not on your path')));
   });
 }
diff --git a/test/global/binstubs/does_not_warn_if_on_path_test.dart b/test/global/binstubs/does_not_warn_if_on_path_test.dart
index 1ecbaf8..fd0dfa7 100644
--- a/test/global/binstubs/does_not_warn_if_on_path_test.dart
+++ b/test/global/binstubs/does_not_warn_if_on_path_test.dart
@@ -10,25 +10,25 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("does not warn if the binstub directory is on the path", () async {
+void main() {
+  test('does not warn if the binstub directory is on the path', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "executables": {"script": null}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'executables': {'script': null}
       }, contents: [
         d.dir(
-            "bin", [d.file("script.dart", "main(args) => print('ok \$args');")])
+            'bin', [d.file('script.dart', "main(args) => print('ok \$args');")])
       ]);
     });
 
     // Add the test's cache bin directory to the path.
     var binDir = p.dirname(Platform.executable);
-    var separator = Platform.isWindows ? ";" : ":";
+    var separator = Platform.isWindows ? ';' : ':';
     var path = "${Platform.environment["PATH"]}$separator$binDir";
 
     await runPub(
-        args: ["global", "activate", "foo"],
-        output: isNot(contains("is not on your path")),
-        environment: {"PATH": path});
+        args: ['global', 'activate', 'foo'],
+        output: isNot(contains('is not on your path')),
+        environment: {'PATH': path});
   });
 }
diff --git a/test/global/binstubs/explicit_and_no_executables_options_test.dart b/test/global/binstubs/explicit_and_no_executables_options_test.dart
index 6b04c73..e9700ab 100644
--- a/test/global/binstubs/explicit_and_no_executables_options_test.dart
+++ b/test/global/binstubs/explicit_and_no_executables_options_test.dart
@@ -9,22 +9,22 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("errors if -x and --no-executables are both passed", () async {
-    await d.dir("foo", [d.libPubspec("foo", "1.0.0")]).create();
+void main() {
+  test('errors if -x and --no-executables are both passed', () async {
+    await d.dir('foo', [d.libPubspec('foo', '1.0.0')]).create();
 
     await runPub(
         args: [
-          "global",
-          "activate",
-          "--source",
-          "path",
-          "../foo",
-          "-x",
-          "anything",
-          "--no-executables"
+          'global',
+          'activate',
+          '--source',
+          'path',
+          '../foo',
+          '-x',
+          'anything',
+          '--no-executables'
         ],
-        error: contains("Cannot pass both --no-executables and --executable."),
+        error: contains('Cannot pass both --no-executables and --executable.'),
         exitCode: exit_codes.USAGE);
   });
 }
diff --git a/test/global/binstubs/explicit_executables_test.dart b/test/global/binstubs/explicit_executables_test.dart
index 8b67761..e721f73 100644
--- a/test/global/binstubs/explicit_executables_test.dart
+++ b/test/global/binstubs/explicit_executables_test.dart
@@ -7,33 +7,33 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("only creates binstubs for the listed executables", () async {
-    await d.dir("foo", [
+void main() {
+  test('only creates binstubs for the listed executables', () async {
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"one": "script", "two": "script", "three": "script"}
+        'name': 'foo',
+        'executables': {'one': 'script', 'two': 'script', 'three': 'script'}
       }),
-      d.dir("bin", [d.file("script.dart", "main() => print('ok');")])
+      d.dir('bin', [d.file('script.dart', "main() => print('ok');")])
     ]).create();
 
     await runPub(args: [
-      "global",
-      "activate",
-      "--source",
-      "path",
-      "../foo",
-      "-x",
-      "one",
-      "--executable",
-      "three"
-    ], output: contains("Installed executables one and three."));
+      'global',
+      'activate',
+      '--source',
+      'path',
+      '../foo',
+      '-x',
+      'one',
+      '--executable',
+      'three'
+    ], output: contains('Installed executables one and three.'));
 
     await d.dir(cachePath, [
-      d.dir("bin", [
-        d.file(binStubName("one"), contains("pub global run foo:script")),
-        d.nothing(binStubName("two")),
-        d.file(binStubName("three"), contains("pub global run foo:script"))
+      d.dir('bin', [
+        d.file(binStubName('one'), contains('pub global run foo:script')),
+        d.nothing(binStubName('two')),
+        d.file(binStubName('three'), contains('pub global run foo:script'))
       ])
     ]).validate();
   });
diff --git a/test/global/binstubs/missing_script_test.dart b/test/global/binstubs/missing_script_test.dart
index edfbb8b..d45baf0 100644
--- a/test/global/binstubs/missing_script_test.dart
+++ b/test/global/binstubs/missing_script_test.dart
@@ -9,16 +9,16 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test("errors if an executable's script can't be found", () async {
-    await d.dir("foo", [
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"missing": "not_here", "nope": null}
+        'name': 'foo',
+        'executables': {'missing': 'not_here', 'nope': null}
       })
     ]).create();
 
-    var pub = await startPub(args: ["global", "activate", "-spath", "../foo"]);
+    var pub = await startPub(args: ['global', 'activate', '-spath', '../foo']);
 
     expect(
         pub.stderr,
diff --git a/test/global/binstubs/name_collision_test.dart b/test/global/binstubs/name_collision_test.dart
index 8cdc1a2..75b72ce 100644
--- a/test/global/binstubs/name_collision_test.dart
+++ b/test/global/binstubs/name_collision_test.dart
@@ -7,44 +7,44 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("does not overwrite an existing binstub", () async {
-    await d.dir("foo", [
+void main() {
+  test('does not overwrite an existing binstub', () async {
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"foo": "foo", "collide1": "foo", "collide2": "foo"}
+        'name': 'foo',
+        'executables': {'foo': 'foo', 'collide1': 'foo', 'collide2': 'foo'}
       }),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    await d.dir("bar", [
+    await d.dir('bar', [
       d.pubspec({
-        "name": "bar",
-        "executables": {"bar": "bar", "collide1": "bar", "collide2": "bar"}
+        'name': 'bar',
+        'executables': {'bar': 'bar', 'collide1': 'bar', 'collide2': 'bar'}
       }),
-      d.dir("bin", [d.file("bar.dart", "main() => print('ok');")])
+      d.dir('bin', [d.file('bar.dart', "main() => print('ok');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "-spath", "../foo"]);
+    await runPub(args: ['global', 'activate', '-spath', '../foo']);
 
-    var pub = await startPub(args: ["global", "activate", "-spath", "../bar"]);
-    expect(pub.stdout, emitsThrough("Installed executable bar."));
+    var pub = await startPub(args: ['global', 'activate', '-spath', '../bar']);
+    expect(pub.stdout, emitsThrough('Installed executable bar.'));
     expect(pub.stderr,
-        emits("Executable collide1 was already installed from foo."));
+        emits('Executable collide1 was already installed from foo.'));
     expect(pub.stderr,
-        emits("Executable collide2 was already installed from foo."));
+        emits('Executable collide2 was already installed from foo.'));
     expect(
         pub.stderr,
-        emits("Deactivate the other package(s) or activate bar using "
-            "--overwrite."));
+        emits('Deactivate the other package(s) or activate bar using '
+            '--overwrite.'));
     await pub.shouldExit();
 
     await d.dir(cachePath, [
-      d.dir("bin", [
-        d.file(binStubName("foo"), contains("foo:foo")),
-        d.file(binStubName("bar"), contains("bar:bar")),
-        d.file(binStubName("collide1"), contains("foo:foo")),
-        d.file(binStubName("collide2"), contains("foo:foo"))
+      d.dir('bin', [
+        d.file(binStubName('foo'), contains('foo:foo')),
+        d.file(binStubName('bar'), contains('bar:bar')),
+        d.file(binStubName('collide1'), contains('foo:foo')),
+        d.file(binStubName('collide2'), contains('foo:foo'))
       ])
     ]).validate();
   });
diff --git a/test/global/binstubs/name_collision_with_overwrite_test.dart b/test/global/binstubs/name_collision_with_overwrite_test.dart
index 4c8b81b..6e5a869 100644
--- a/test/global/binstubs/name_collision_with_overwrite_test.dart
+++ b/test/global/binstubs/name_collision_with_overwrite_test.dart
@@ -7,42 +7,42 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("overwrites an existing binstub if --overwrite is passed", () async {
-    await d.dir("foo", [
+void main() {
+  test('overwrites an existing binstub if --overwrite is passed', () async {
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"foo": "foo", "collide1": "foo", "collide2": "foo"}
+        'name': 'foo',
+        'executables': {'foo': 'foo', 'collide1': 'foo', 'collide2': 'foo'}
       }),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    await d.dir("bar", [
+    await d.dir('bar', [
       d.pubspec({
-        "name": "bar",
-        "executables": {"bar": "bar", "collide1": "bar", "collide2": "bar"}
+        'name': 'bar',
+        'executables': {'bar': 'bar', 'collide1': 'bar', 'collide2': 'bar'}
       }),
-      d.dir("bin", [d.file("bar.dart", "main() => print('ok');")])
+      d.dir('bin', [d.file('bar.dart', "main() => print('ok');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "-spath", "../foo"]);
+    await runPub(args: ['global', 'activate', '-spath', '../foo']);
 
     var pub = await startPub(
-        args: ["global", "activate", "-spath", "../bar", "--overwrite"]);
+        args: ['global', 'activate', '-spath', '../bar', '--overwrite']);
     expect(pub.stdout,
-        emitsThrough("Installed executables bar, collide1 and collide2."));
+        emitsThrough('Installed executables bar, collide1 and collide2.'));
     expect(
-        pub.stderr, emits("Replaced collide1 previously installed from foo."));
+        pub.stderr, emits('Replaced collide1 previously installed from foo.'));
     expect(
-        pub.stderr, emits("Replaced collide2 previously installed from foo."));
+        pub.stderr, emits('Replaced collide2 previously installed from foo.'));
     await pub.shouldExit();
 
     await d.dir(cachePath, [
-      d.dir("bin", [
-        d.file(binStubName("foo"), contains("foo:foo")),
-        d.file(binStubName("bar"), contains("bar:bar")),
-        d.file(binStubName("collide1"), contains("bar:bar")),
-        d.file(binStubName("collide2"), contains("bar:bar"))
+      d.dir('bin', [
+        d.file(binStubName('foo'), contains('foo:foo')),
+        d.file(binStubName('bar'), contains('bar:bar')),
+        d.file(binStubName('collide1'), contains('bar:bar')),
+        d.file(binStubName('collide2'), contains('bar:bar'))
       ])
     ]).validate();
   });
diff --git a/test/global/binstubs/no_executables_flag_test.dart b/test/global/binstubs/no_executables_flag_test.dart
index 4779387..39f91cd 100644
--- a/test/global/binstubs/no_executables_flag_test.dart
+++ b/test/global/binstubs/no_executables_flag_test.dart
@@ -7,30 +7,30 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("does not create binstubs if --no-executables is passed", () async {
-    await d.dir("foo", [
+void main() {
+  test('does not create binstubs if --no-executables is passed', () async {
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"one": null}
+        'name': 'foo',
+        'executables': {'one': null}
       }),
-      d.dir("bin", [d.file("one.dart", "main() => print('ok');")])
+      d.dir('bin', [d.file('one.dart', "main() => print('ok');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "--source", "path", "../foo"]);
+    await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
 
     await runPub(args: [
-      "global",
-      "activate",
-      "--source",
-      "path",
-      "../foo",
-      "--no-executables"
+      'global',
+      'activate',
+      '--source',
+      'path',
+      '../foo',
+      '--no-executables'
     ]);
 
     // Should still delete old one.
     await d.dir(cachePath, [
-      d.dir("bin", [d.nothing(binStubName("one"))])
+      d.dir('bin', [d.nothing(binStubName('one'))])
     ]).validate();
   });
 }
diff --git a/test/global/binstubs/outdated_binstub_runs_pub_global_test.dart b/test/global/binstubs/outdated_binstub_runs_pub_global_test.dart
index 6c816c9..aa2a618 100644
--- a/test/global/binstubs/outdated_binstub_runs_pub_global_test.dart
+++ b/test/global/binstubs/outdated_binstub_runs_pub_global_test.dart
@@ -10,17 +10,17 @@
 import '../../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   test("an outdated binstub runs 'pub global run'", () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "executables": {"foo-script": "script"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'executables': {'foo-script': 'script'}
       }, contents: [
-        d.dir("bin", [d.file("script.dart", "main(args) => print('ok');")])
+        d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.dir(cachePath, [
       d.dir('global_packages', [
@@ -31,11 +31,11 @@
     ]).create();
 
     var process = await TestProcess.start(
-        p.join(d.sandbox, cachePath, "bin", binStubName("foo-script")),
-        ["arg1", "arg2"],
+        p.join(d.sandbox, cachePath, 'bin', binStubName('foo-script')),
+        ['arg1', 'arg2'],
         environment: getEnvironment());
 
-    expect(process.stdout, emitsThrough("ok"));
+    expect(process.stdout, emitsThrough('ok'));
     await process.shouldExit();
   });
 }
diff --git a/test/global/binstubs/outdated_snapshot_test.dart b/test/global/binstubs/outdated_snapshot_test.dart
index 5c9167a..2dd4be5 100644
--- a/test/global/binstubs/outdated_snapshot_test.dart
+++ b/test/global/binstubs/outdated_snapshot_test.dart
@@ -12,18 +12,18 @@
 import '../../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   test("a binstub runs 'pub global run' for an outdated snapshot", () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "executables": {"foo-script": "script"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'executables': {'foo-script': 'script'}
       }, contents: [
         d.dir(
-            "bin", [d.file("script.dart", "main(args) => print('ok \$args');")])
+            'bin', [d.file('script.dart', "main(args) => print('ok \$args');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.dir(cachePath, [
       d.dir('global_packages', [
@@ -34,13 +34,13 @@
     ]).create();
 
     var process = await TestProcess.start(
-        p.join(d.sandbox, cachePath, "bin", binStubName("foo-script")),
-        ["arg1", "arg2"],
+        p.join(d.sandbox, cachePath, 'bin', binStubName('foo-script')),
+        ['arg1', 'arg2'],
         environment: getEnvironment());
 
     expect(process.stderr,
-        emits(contains("Invalid kernel binary format version.")));
-    expect(process.stdout, emitsThrough("ok [arg1, arg2]"));
+        emits(contains('Invalid kernel binary format version.')));
+    expect(process.stdout, emitsThrough('ok [arg1, arg2]'));
     await process.shouldExit();
 
     await d.dir(cachePath, [
diff --git a/test/global/binstubs/path_package_test.dart b/test/global/binstubs/path_package_test.dart
index 3c7d523..0461e35 100644
--- a/test/global/binstubs/path_package_test.dart
+++ b/test/global/binstubs/path_package_test.dart
@@ -7,23 +7,23 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("creates binstubs when activating a path package", () async {
-    await d.dir("foo", [
+void main() {
+  test('creates binstubs when activating a path package', () async {
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"foo": null}
+        'name': 'foo',
+        'executables': {'foo': null}
       }),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
     await runPub(
-        args: ["global", "activate", "--source", "path", "../foo"],
-        output: contains("Installed executable foo."));
+        args: ['global', 'activate', '--source', 'path', '../foo'],
+        output: contains('Installed executable foo.'));
 
     await d.dir(cachePath, [
-      d.dir("bin",
-          [d.file(binStubName("foo"), contains("pub global run foo:foo"))])
+      d.dir('bin',
+          [d.file(binStubName('foo'), contains('pub global run foo:foo'))])
     ]).validate();
   });
 }
diff --git a/test/global/binstubs/reactivate_removes_old_executables_test.dart b/test/global/binstubs/reactivate_removes_old_executables_test.dart
index c595c76..80b50ff 100644
--- a/test/global/binstubs/reactivate_removes_old_executables_test.dart
+++ b/test/global/binstubs/reactivate_removes_old_executables_test.dart
@@ -7,37 +7,37 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("removes previous binstubs when reactivating a package", () async {
-    await d.dir("foo", [
+void main() {
+  test('removes previous binstubs when reactivating a package', () async {
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"one": null, "two": null}
+        'name': 'foo',
+        'executables': {'one': null, 'two': null}
       }),
-      d.dir("bin", [
-        d.file("one.dart", "main() => print('ok');"),
-        d.file("two.dart", "main() => print('ok');")
+      d.dir('bin', [
+        d.file('one.dart', "main() => print('ok');"),
+        d.file('two.dart', "main() => print('ok');")
       ])
     ]).create();
 
-    await runPub(args: ["global", "activate", "--source", "path", "../foo"]);
+    await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
 
-    await d.dir("foo", [
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {
+        'name': 'foo',
+        'executables': {
           // Remove "one".
-          "two": null
+          'two': null
         }
       }),
     ]).create();
 
-    await runPub(args: ["global", "activate", "--source", "path", "../foo"]);
+    await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
 
     await d.dir(cachePath, [
-      d.dir("bin", [
-        d.nothing(binStubName("one")),
-        d.file(binStubName("two"), contains("two"))
+      d.dir('bin', [
+        d.nothing(binStubName('one')),
+        d.file(binStubName('two'), contains('two'))
       ])
     ]).validate();
   });
diff --git a/test/global/binstubs/removes_even_if_not_in_pubspec_test.dart b/test/global/binstubs/removes_even_if_not_in_pubspec_test.dart
index 4fb0a9f..4cd458e 100644
--- a/test/global/binstubs/removes_even_if_not_in_pubspec_test.dart
+++ b/test/global/binstubs/removes_even_if_not_in_pubspec_test.dart
@@ -7,30 +7,30 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("removes all binstubs for package", () async {
-    await d.dir("foo", [
+void main() {
+  test('removes all binstubs for package', () async {
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"foo": null}
+        'name': 'foo',
+        'executables': {'foo': null}
       }),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
     // Create the binstub for foo.
-    await runPub(args: ["global", "activate", "--source", "path", "../foo"]);
+    await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
 
     // Remove it from the pubspec.
-    await d.dir("foo", [
-      d.pubspec({"name": "foo"})
+    await d.dir('foo', [
+      d.pubspec({'name': 'foo'})
     ]).create();
 
     // Deactivate.
-    await runPub(args: ["global", "deactivate", "foo"]);
+    await runPub(args: ['global', 'deactivate', 'foo']);
 
     // It should still be deleted.
     await d.dir(cachePath, [
-      d.dir("bin", [d.nothing(binStubName("foo"))])
+      d.dir('bin', [d.nothing(binStubName('foo'))])
     ]).validate();
   });
 }
diff --git a/test/global/binstubs/removes_when_deactivated_test.dart b/test/global/binstubs/removes_when_deactivated_test.dart
index b13f6f7..05c8413 100644
--- a/test/global/binstubs/removes_when_deactivated_test.dart
+++ b/test/global/binstubs/removes_when_deactivated_test.dart
@@ -7,25 +7,25 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("removes binstubs when the package is deactivated", () async {
+void main() {
+  test('removes binstubs when the package is deactivated', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "executables": {"one": null, "two": null}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'executables': {'one': null, 'two': null}
       }, contents: [
-        d.dir("bin", [
-          d.file("one.dart", "main(args) => print('one');"),
-          d.file("two.dart", "main(args) => print('two');")
+        d.dir('bin', [
+          d.file('one.dart', "main(args) => print('one');"),
+          d.file('two.dart', "main(args) => print('two');")
         ])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
-    await runPub(args: ["global", "deactivate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
+    await runPub(args: ['global', 'deactivate', 'foo']);
 
     await d.dir(cachePath, [
       d.dir(
-          "bin", [d.nothing(binStubName("one")), d.nothing(binStubName("two"))])
+          'bin', [d.nothing(binStubName('one')), d.nothing(binStubName('two'))])
     ]).validate();
   });
 }
diff --git a/test/global/binstubs/unknown_explicit_executable_test.dart b/test/global/binstubs/unknown_explicit_executable_test.dart
index 08dbcba..d95b733 100644
--- a/test/global/binstubs/unknown_explicit_executable_test.dart
+++ b/test/global/binstubs/unknown_explicit_executable_test.dart
@@ -9,23 +9,23 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("errors on an unknown explicit executable", () async {
-    await d.dir("foo", [
+void main() {
+  test('errors on an unknown explicit executable', () async {
+    await d.dir('foo', [
       d.pubspec({
-        "name": "foo",
-        "executables": {"one": "one"}
+        'name': 'foo',
+        'executables': {'one': 'one'}
       }),
-      d.dir("bin", [d.file("one.dart", "main() => print('ok');")])
+      d.dir('bin', [d.file('one.dart', "main() => print('ok');")])
     ]).create();
 
     var pub = await startPub(args: [
-      "global", "activate", "--source", "path", "../foo", //
-      "-x", "who", "-x", "one", "--executable", "wat"
+      'global', 'activate', '--source', 'path', '../foo', //
+      '-x', 'who', '-x', 'one', '--executable', 'wat'
     ]);
 
-    expect(pub.stdout, emitsThrough("Installed executable one."));
-    expect(pub.stderr, emits("Unknown executables wat and who."));
+    expect(pub.stdout, emitsThrough('Installed executable one.'));
+    expect(pub.stderr, emits('Unknown executables wat and who.'));
     await pub.shouldExit(exit_codes.DATA);
   });
 }
diff --git a/test/global/binstubs/utils.dart b/test/global/binstubs/utils.dart
index 8f990e9..e7a185f 100644
--- a/test/global/binstubs/utils.dart
+++ b/test/global/binstubs/utils.dart
@@ -23,10 +23,10 @@
   // scripts in pub's repo that can act like those scripts but invoke pub from
   // source from the pub repo.
   var binDir = p.dirname(Platform.executable);
-  var separator = Platform.isWindows ? ";" : ":";
+  var separator = Platform.isWindows ? ';' : ':';
   var path = "${Platform.environment["PATH"]}$separator$binDir";
 
   var environment = getPubTestEnvironment();
-  environment["PATH"] = path;
+  environment['PATH'] = path;
   return environment;
 }
diff --git a/test/global/binstubs/warns_if_not_on_path_test.dart b/test/global/binstubs/warns_if_not_on_path_test.dart
index cdf17c5..d09e698 100644
--- a/test/global/binstubs/warns_if_not_on_path_test.dart
+++ b/test/global/binstubs/warns_if_not_on_path_test.dart
@@ -7,19 +7,19 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("warns if the binstub directory is not on the path", () async {
+void main() {
+  test('warns if the binstub directory is not on the path', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", pubspec: {
-        "executables": {"some-dart-script": "script"}
+      builder.serve('foo', '1.0.0', pubspec: {
+        'executables': {'some-dart-script': 'script'}
       }, contents: [
         d.dir(
-            "bin", [d.file("script.dart", "main(args) => print('ok \$args');")])
+            'bin', [d.file('script.dart', "main(args) => print('ok \$args');")])
       ]);
     });
 
     await runPub(
-        args: ["global", "activate", "foo"],
-        error: contains("is not on your path"));
+        args: ['global', 'activate', 'foo'],
+        error: contains('is not on your path'));
   });
 }
diff --git a/test/global/deactivate/deactivate_and_reactivate_package_test.dart b/test/global/deactivate/deactivate_and_reactivate_package_test.dart
index 82ce27a..dc7481c 100644
--- a/test/global/deactivate/deactivate_and_reactivate_package_test.dart
+++ b/test/global/deactivate/deactivate_and_reactivate_package_test.dart
@@ -6,26 +6,26 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('activates a different version after deactivating', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
-      builder.serve("foo", "2.0.0");
+      builder.serve('foo', '1.0.0');
+      builder.serve('foo', '2.0.0');
     });
 
     // Activate an old version.
-    await runPub(args: ["global", "activate", "foo", "1.0.0"]);
+    await runPub(args: ['global', 'activate', 'foo', '1.0.0']);
 
     await runPub(
-        args: ["global", "deactivate", "foo"],
-        output: "Deactivated package foo 1.0.0.");
+        args: ['global', 'deactivate', 'foo'],
+        output: 'Deactivated package foo 1.0.0.');
 
     // Activating again should forget the old version.
-    await runPub(args: ["global", "activate", "foo"], output: """
+    await runPub(args: ['global', 'activate', 'foo'], output: '''
         Resolving dependencies...
         + foo 2.0.0
         Downloading foo 2.0.0...
         Precompiling executables...
-        Activated foo 2.0.0.""");
+        Activated foo 2.0.0.''');
   });
 }
diff --git a/test/global/deactivate/git_package_test.dart b/test/global/deactivate/git_package_test.dart
index b73054e..f06ce53 100644
--- a/test/global/deactivate/git_package_test.dart
+++ b/test/global/deactivate/git_package_test.dart
@@ -7,19 +7,19 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('deactivates an active Git package', () async {
     ensureGit();
 
     await d.git('foo.git', [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "-sgit", "../foo.git"]);
+    await runPub(args: ['global', 'activate', '-sgit', '../foo.git']);
 
     await runPub(
-        args: ["global", "deactivate", "foo"],
+        args: ['global', 'deactivate', 'foo'],
         output:
             'Deactivated package foo 1.0.0 from Git repository "../foo.git".');
   });
diff --git a/test/global/deactivate/hosted_package_test.dart b/test/global/deactivate/hosted_package_test.dart
index 9090777..854d6a9 100644
--- a/test/global/deactivate/hosted_package_test.dart
+++ b/test/global/deactivate/hosted_package_test.dart
@@ -6,14 +6,14 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('deactivates an active hosted package', () async {
-    await servePackages((builder) => builder.serve("foo", "1.0.0"));
+    await servePackages((builder) => builder.serve('foo', '1.0.0'));
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await runPub(
-        args: ["global", "deactivate", "foo"],
-        output: "Deactivated package foo 1.0.0.");
+        args: ['global', 'deactivate', 'foo'],
+        output: 'Deactivated package foo 1.0.0.');
   });
 }
diff --git a/test/global/deactivate/missing_package_arg_test.dart b/test/global/deactivate/missing_package_arg_test.dart
index ea07b25..7310dd0 100644
--- a/test/global/deactivate/missing_package_arg_test.dart
+++ b/test/global/deactivate/missing_package_arg_test.dart
@@ -8,15 +8,15 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if no package was given', () {
-    return runPub(args: ["global", "deactivate"], error: """
+    return runPub(args: ['global', 'deactivate'], error: '''
             No package to deactivate given.
 
             Usage: pub global deactivate <package>
             -h, --help    Print this usage information.
 
             Run "pub help" to see global options.
-            """, exitCode: exit_codes.USAGE);
+            ''', exitCode: exit_codes.USAGE);
   });
 }
diff --git a/test/global/deactivate/path_package_test.dart b/test/global/deactivate/path_package_test.dart
index 94585c7..3716941 100644
--- a/test/global/deactivate/path_package_test.dart
+++ b/test/global/deactivate/path_package_test.dart
@@ -10,18 +10,18 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('deactivates an active path package', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "--source", "path", "../foo"]);
+    await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
 
-    var path = canonicalize(p.join(d.sandbox, "foo"));
+    var path = canonicalize(p.join(d.sandbox, 'foo'));
     await runPub(
-        args: ["global", "deactivate", "foo"],
+        args: ['global', 'deactivate', 'foo'],
         output: 'Deactivated package foo 1.0.0 at path "$path".');
   });
 }
diff --git a/test/global/deactivate/removes_precompiled_snapshots_test.dart b/test/global/deactivate/removes_precompiled_snapshots_test.dart
index c32cf9f..9ef19c8 100644
--- a/test/global/deactivate/removes_precompiled_snapshots_test.dart
+++ b/test/global/deactivate/removes_precompiled_snapshots_test.dart
@@ -7,15 +7,15 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('removes precompiled snapshots', () async {
-    await servePackages((builder) => builder.serve("foo", "1.0.0"));
+    await servePackages((builder) => builder.serve('foo', '1.0.0'));
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await runPub(
-        args: ["global", "deactivate", "foo"],
-        output: "Deactivated package foo 1.0.0.");
+        args: ['global', 'deactivate', 'foo'],
+        output: 'Deactivated package foo 1.0.0.');
 
     await d.dir(cachePath, [
       d.dir('global_packages', [d.nothing('foo')])
diff --git a/test/global/deactivate/unexpected_arguments_test.dart b/test/global/deactivate/unexpected_arguments_test.dart
index d000814..e219573 100644
--- a/test/global/deactivate/unexpected_arguments_test.dart
+++ b/test/global/deactivate/unexpected_arguments_test.dart
@@ -8,16 +8,16 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if there are extra arguments', () {
     return runPub(
-        args: ["global", "deactivate", "foo", "bar", "baz"], error: """
+        args: ['global', 'deactivate', 'foo', 'bar', 'baz'], error: '''
             Unexpected arguments "bar" and "baz".
 
             Usage: pub global deactivate <package>
             -h, --help    Print this usage information.
 
             Run "pub help" to see global options.
-            """, exitCode: exit_codes.USAGE);
+            ''', exitCode: exit_codes.USAGE);
   });
 }
diff --git a/test/global/deactivate/unknown_package_test.dart b/test/global/deactivate/unknown_package_test.dart
index ab1d605..4d4ac20 100644
--- a/test/global/deactivate/unknown_package_test.dart
+++ b/test/global/deactivate/unknown_package_test.dart
@@ -8,13 +8,13 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('errors if the package is not activated', () async {
     await serveNoPackages();
 
     await runPub(
-        args: ["global", "deactivate", "foo"],
-        error: "No active package foo.",
+        args: ['global', 'deactivate', 'foo'],
+        error: 'No active package foo.',
         exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/global/list_test.dart b/test/global/list_test.dart
index 0607c6e..573bde2 100644
--- a/test/global/list_test.dart
+++ b/test/global/list_test.dart
@@ -10,7 +10,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('lists an activated hosted package', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0');
diff --git a/test/global/run/errors_if_outside_bin_test.dart b/test/global/run/errors_if_outside_bin_test.dart
index 43d3732..52b7d29 100644
--- a/test/global/run/errors_if_outside_bin_test.dart
+++ b/test/global/run/errors_if_outside_bin_test.dart
@@ -9,16 +9,16 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('errors if the script is in a subdirectory.', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("example", [d.file("script.dart", "main(args) => print('ok');")])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('example', [d.file('script.dart', "main(args) => print('ok');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
-    await runPub(args: ["global", "run", "foo:example/script"], error: """
+    await runPub(args: ['global', 'activate', 'foo']);
+    await runPub(args: ['global', 'run', 'foo:example/script'], error: '''
 Cannot run an executable in a subdirectory of a global package.
 
 Usage: pub global run <package>:<executable> [args...]
@@ -26,6 +26,6 @@
     --[no-]enable-asserts    Enable assert statements.
 
 Run "pub help" to see global options.
-""", exitCode: exit_codes.USAGE);
+''', exitCode: exit_codes.USAGE);
   });
 }
diff --git a/test/global/run/fails_if_sdk_constraint_is_unmet_test.dart b/test/global/run/fails_if_sdk_constraint_is_unmet_test.dart
index 59b8fa2..850a188 100644
--- a/test/global/run/fails_if_sdk_constraint_is_unmet_test.dart
+++ b/test/global/run/fails_if_sdk_constraint_is_unmet_test.dart
@@ -9,18 +9,18 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test("fails if the current SDK doesn't match the constraint", () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("script.dart", "main(args) => print('ok');")])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.hostedCache([
-      d.dir("foo-1.0.0", [d.libPubspec("foo", "1.0.0", sdk: "0.5.6")])
+      d.dir('foo-1.0.0', [d.libPubspec('foo', '1.0.0', sdk: '0.5.6')])
     ]).create();
 
     // Make the snapshot out-of-date, too, so that we load the pubspec with the
@@ -36,7 +36,7 @@
     ]).create();
 
     await runPub(
-        args: ["global", "run", "foo:script"],
+        args: ['global', 'run', 'foo:script'],
         error: contains("foo 1.0.0 doesn't support Dart 0.1.2+3."),
         exitCode: exit_codes.DATA);
   });
diff --git a/test/global/run/implicit_executable_name_test.dart b/test/global/run/implicit_executable_name_test.dart
index ff64014..fa7bf51 100644
--- a/test/global/run/implicit_executable_name_test.dart
+++ b/test/global/run/implicit_executable_name_test.dart
@@ -7,18 +7,18 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('defaults to the package name if the script is omitted', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("foo.dart", "main(args) => print('foo');")])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('foo.dart', "main(args) => print('foo');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
-    var pub = await pubRun(global: true, args: ["foo"]);
-    expect(pub.stdout, emits("foo"));
+    var pub = await pubRun(global: true, args: ['foo']);
+    expect(pub.stdout, emits('foo'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/run/missing_executable_arg_test.dart b/test/global/run/missing_executable_arg_test.dart
index 614cf3f..90b8db4 100644
--- a/test/global/run/missing_executable_arg_test.dart
+++ b/test/global/run/missing_executable_arg_test.dart
@@ -8,7 +8,7 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('fails if no executable was given', () {
     return runPub(args: ['global', 'run'], error: '''
             Must specify an executable to run.
diff --git a/test/global/run/missing_path_package_test.dart b/test/global/run/missing_path_package_test.dart
index 18352b5..497f7b3 100644
--- a/test/global/run/missing_path_package_test.dart
+++ b/test/global/run/missing_path_package_test.dart
@@ -11,19 +11,19 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('errors if the local package does not exist', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "--source", "path", "../foo"]);
+    await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
 
-    deleteEntry(p.join(d.sandbox, "foo"));
+    deleteEntry(p.join(d.sandbox, 'foo'));
 
-    var pub = await pubRun(global: true, args: ["foo"]);
-    var path = canonicalize(p.join(d.sandbox, "foo"));
+    var pub = await pubRun(global: true, args: ['foo']);
+    var path = canonicalize(p.join(d.sandbox, 'foo'));
     expect(pub.stderr,
         emits('Could not find a file named "pubspec.yaml" in "$path".'));
     await pub.shouldExit(exit_codes.NO_INPUT);
diff --git a/test/global/run/nonexistent_script_test.dart b/test/global/run/nonexistent_script_test.dart
index ff56dd8..0e4f198 100644
--- a/test/global/run/nonexistent_script_test.dart
+++ b/test/global/run/nonexistent_script_test.dart
@@ -9,15 +9,15 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('errors if the script does not exist.', () async {
-    await servePackages((builder) => builder.serve("foo", "1.0.0", pubspec: {
-          "dev_dependencies": {"bar": "1.0.0"}
+    await servePackages((builder) => builder.serve('foo', '1.0.0', pubspec: {
+          'dev_dependencies': {'bar': '1.0.0'}
         }));
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
-    var pub = await pubRun(global: true, args: ["foo:script"]);
+    var pub = await pubRun(global: true, args: ['foo:script']);
     expect(
         pub.stderr,
         emits(
diff --git a/test/global/run/package_api_test.dart b/test/global/run/package_api_test.dart
index 2e66c21..d72c711 100644
--- a/test/global/run/package_api_test.dart
+++ b/test/global/run/package_api_test.dart
@@ -8,16 +8,16 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('an immutable application sees a file: package config', () async {
     await servePackages((builder) {
-      builder.serve("bar", "1.0.0");
+      builder.serve('bar', '1.0.0');
 
-      builder.serve("foo", "1.0.0", deps: {
-        "bar": "1.0.0"
+      builder.serve('foo', '1.0.0', deps: {
+        'bar': '1.0.0'
       }, contents: [
-        d.dir("bin", [
-          d.file("script.dart", """
+        d.dir('bin', [
+          d.file('script.dart', """
 import 'dart:isolate';
 
 main() async {
@@ -33,36 +33,36 @@
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
-    var pub = await pubRun(global: true, args: ["foo:script"]);
+    var pub = await pubRun(global: true, args: ['foo:script']);
 
-    expect(pub.stdout, emits("null"));
+    expect(pub.stdout, emits('null'));
 
     var packageConfigPath =
-        p.join(d.sandbox, cachePath, "global_packages/foo/.packages");
+        p.join(d.sandbox, cachePath, 'global_packages/foo/.packages');
     expect(pub.stdout, emits(p.toUri(packageConfigPath).toString()));
 
     var fooResourcePath = p.join(
-        globalPackageServer.pathInCache('foo', '1.0.0'), "lib/resource.txt");
+        globalPackageServer.pathInCache('foo', '1.0.0'), 'lib/resource.txt');
     expect(pub.stdout, emits(p.toUri(fooResourcePath).toString()));
 
     var barResourcePath = p.join(
-        globalPackageServer.pathInCache('bar', '1.0.0'), "lib/resource.txt");
+        globalPackageServer.pathInCache('bar', '1.0.0'), 'lib/resource.txt');
     expect(pub.stdout, emits(p.toUri(barResourcePath).toString()));
     await pub.shouldExit(0);
   });
 
   test('a mutable untransformed application sees a file: package root',
       () async {
-    await d.dir("foo", [d.libPubspec("foo", "1.0.0")]).create();
+    await d.dir('foo', [d.libPubspec('foo', '1.0.0')]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       }),
-      d.dir("bin", [
-        d.file("script.dart", """
+      d.dir('bin', [
+        d.file('script.dart', """
 import 'dart:isolate';
 
 main() async {
@@ -77,19 +77,19 @@
       ])
     ]).create();
 
-    await runPub(args: ["global", "activate", "-s", "path", "."]);
+    await runPub(args: ['global', 'activate', '-s', 'path', '.']);
 
-    var pub = await pubRun(global: true, args: ["myapp:script"]);
+    var pub = await pubRun(global: true, args: ['myapp:script']);
 
-    expect(pub.stdout, emits("null"));
+    expect(pub.stdout, emits('null'));
 
-    var packageConfigPath = p.join(d.sandbox, "myapp/.packages");
+    var packageConfigPath = p.join(d.sandbox, 'myapp/.packages');
     expect(pub.stdout, emits(p.toUri(packageConfigPath).toString()));
 
-    var myappResourcePath = p.join(d.sandbox, "myapp/lib/resource.txt");
+    var myappResourcePath = p.join(d.sandbox, 'myapp/lib/resource.txt');
     expect(pub.stdout, emits(p.toUri(myappResourcePath).toString()));
 
-    var fooResourcePath = p.join(d.sandbox, "foo/lib/resource.txt");
+    var fooResourcePath = p.join(d.sandbox, 'foo/lib/resource.txt');
     expect(pub.stdout, emits(p.toUri(fooResourcePath).toString()));
     await pub.shouldExit(0);
   });
diff --git a/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart b/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart
index 3c32d8c..e27c30a 100644
--- a/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart
+++ b/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart
@@ -7,15 +7,15 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('recompiles a script if the snapshot is out-of-date', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("script.dart", "main(args) => print('ok');")])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     await d.dir(cachePath, [
       d.dir('global_packages', [
@@ -25,11 +25,11 @@
       ])
     ]).create();
 
-    var pub = await pubRun(global: true, args: ["foo:script"]);
+    var pub = await pubRun(global: true, args: ['foo:script']);
     // In the real world this would just print "hello!", but since we collect
     // all output we see the precompilation messages as well.
-    expect(pub.stdout, emits("Precompiling executables..."));
-    expect(pub.stdout, emitsThrough("ok"));
+    expect(pub.stdout, emits('Precompiling executables...'));
+    expect(pub.stdout, emitsThrough('ok'));
     await pub.shouldExit();
 
     await d.dir(cachePath, [
diff --git a/test/global/run/reflects_changes_to_local_package_test.dart b/test/global/run/reflects_changes_to_local_package_test.dart
index 083a57c..af7c9c2 100644
--- a/test/global/run/reflects_changes_to_local_package_test.dart
+++ b/test/global/run/reflects_changes_to_local_package_test.dart
@@ -7,19 +7,19 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('changes in a path package are immediately reflected', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "--source", "path", "../foo"]);
+    await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
 
-    await d.file("foo/bin/foo.dart", "main() => print('changed');").create();
+    await d.file('foo/bin/foo.dart', "main() => print('changed');").create();
 
-    var pub = await pubRun(global: true, args: ["foo"]);
-    expect(pub.stdout, emits("changed"));
+    var pub = await pubRun(global: true, args: ['foo']);
+    expect(pub.stdout, emits('changed'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/run/runs_git_script_test.dart b/test/global/run/runs_git_script_test.dart
index 2721c55..900b586 100644
--- a/test/global/run/runs_git_script_test.dart
+++ b/test/global/run/runs_git_script_test.dart
@@ -7,19 +7,19 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('runs a script in a git package', () async {
     ensureGit();
 
     await d.git('foo.git', [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "-sgit", "../foo.git"]);
+    await runPub(args: ['global', 'activate', '-sgit', '../foo.git']);
 
-    var pub = await pubRun(global: true, args: ["foo"]);
-    expect(pub.stdout, emits("ok"));
+    var pub = await pubRun(global: true, args: ['foo']);
+    expect(pub.stdout, emits('ok'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/run/runs_path_script_test.dart b/test/global/run/runs_path_script_test.dart
index 427787a..79c6c0d 100644
--- a/test/global/run/runs_path_script_test.dart
+++ b/test/global/run/runs_path_script_test.dart
@@ -7,17 +7,17 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('runs a script in a path package', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "--source", "path", "../foo"]);
+    await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
 
-    var pub = await pubRun(global: true, args: ["foo"]);
-    expect(pub.stdout, emits("ok"));
+    var pub = await pubRun(global: true, args: ['foo']);
+    expect(pub.stdout, emits('ok'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/run/runs_script_in_checked_mode_test.dart b/test/global/run/runs_script_in_checked_mode_test.dart
index b01b228..69cd393 100644
--- a/test/global/run/runs_script_in_checked_mode_test.dart
+++ b/test/global/run/runs_script_in_checked_mode_test.dart
@@ -7,7 +7,7 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('runs a script with assertions enabled', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', contents: [
diff --git a/test/global/run/runs_script_in_unchecked_mode_test.dart b/test/global/run/runs_script_in_unchecked_mode_test.dart
index bd7d74d..d684c27 100644
--- a/test/global/run/runs_script_in_unchecked_mode_test.dart
+++ b/test/global/run/runs_script_in_unchecked_mode_test.dart
@@ -7,25 +7,25 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-const SCRIPT = """
+const SCRIPT = '''
 main() {
   assert(false);
   print("no checks");
 }
-""";
+''';
 
-main() {
+void main() {
   test('runs a script in unchecked mode by default', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("script.dart", SCRIPT)])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('script.dart', SCRIPT)])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
-    var pub = await pubRun(global: true, args: ["foo:script"]);
-    expect(pub.stdout, emits("no checks"));
+    var pub = await pubRun(global: true, args: ['foo:script']);
+    expect(pub.stdout, emits('no checks'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/run/runs_script_test.dart b/test/global/run/runs_script_test.dart
index cf0d5e6..fe767ef 100644
--- a/test/global/run/runs_script_test.dart
+++ b/test/global/run/runs_script_test.dart
@@ -7,18 +7,18 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('runs a script in an activated package', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("script.dart", "main(args) => print('ok');")])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
-    var pub = await pubRun(global: true, args: ["foo:script"]);
-    expect(pub.stdout, emits("ok"));
+    var pub = await pubRun(global: true, args: ['foo:script']);
+    expect(pub.stdout, emits('ok'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/run/runs_script_without_packages_file_test.dart b/test/global/run/runs_script_without_packages_file_test.dart
index 7e715b0..421e200 100644
--- a/test/global/run/runs_script_without_packages_file_test.dart
+++ b/test/global/run/runs_script_without_packages_file_test.dart
@@ -10,37 +10,37 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('runs a snapshotted script without a .packages file', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("script.dart", "main(args) => print('ok');")])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
       ]);
     });
 
-    await runPub(args: ["global", "activate", "foo"]);
+    await runPub(args: ['global', 'activate', 'foo']);
 
     // Mimic the global packages installed by pub <1.12, which didn't create a
     // .packages file for global installs.
     deleteEntry(p.join(d.sandbox, cachePath, 'global_packages/foo/.packages'));
 
-    var pub = await pubRun(global: true, args: ["foo:script"]);
-    expect(pub.stdout, emits("ok"));
+    var pub = await pubRun(global: true, args: ['foo:script']);
+    expect(pub.stdout, emits('ok'));
     await pub.shouldExit();
   });
 
   test('runs an unsnapshotted script without a .packages file', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
     ]).create();
 
-    await runPub(args: ["global", "activate", "--source", "path", "../foo"]);
+    await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
 
     deleteEntry(p.join(d.sandbox, cachePath, 'global_packages/foo/.packages'));
 
-    var pub = await pubRun(global: true, args: ["foo"]);
-    expect(pub.stdout, emits("ok"));
+    var pub = await pubRun(global: true, args: ['foo']);
+    expect(pub.stdout, emits('ok'));
     await pub.shouldExit();
   });
 }
diff --git a/test/global/run/unknown_package_test.dart b/test/global/run/unknown_package_test.dart
index 0f1ea82..ef6deba 100644
--- a/test/global/run/unknown_package_test.dart
+++ b/test/global/run/unknown_package_test.dart
@@ -8,13 +8,13 @@
 
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('errors if the package is not activated', () async {
     await serveNoPackages();
 
     await runPub(
-        args: ["global", "run", "foo:bar"],
-        error: startsWith("No active package foo."),
+        args: ['global', 'run', 'foo:bar'],
+        error: startsWith('No active package foo.'),
         exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/global/run/uses_old_lockfile_test.dart b/test/global/run/uses_old_lockfile_test.dart
index 983a61a..5eb8406 100644
--- a/test/global/run/uses_old_lockfile_test.dart
+++ b/test/global/run/uses_old_lockfile_test.dart
@@ -7,15 +7,15 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test('uses the 1.6-style lockfile if necessary', () async {
     await servePackages((builder) {
-      builder.serve("bar", "1.0.0");
-      builder.serve("foo", "1.0.0", deps: {
-        "bar": "any"
+      builder.serve('bar', '1.0.0');
+      builder.serve('foo', '1.0.0', deps: {
+        'bar': 'any'
       }, contents: [
-        d.dir("bin", [
-          d.file("script.dart", """
+        d.dir('bin', [
+          d.file('script.dart', """
               import 'package:bar/bar.dart' as bar;
 
               main(args) => print(bar.main());""")
@@ -23,8 +23,8 @@
       ]);
     });
 
-    await runPub(args: ["cache", "add", "foo"]);
-    await runPub(args: ["cache", "add", "bar"]);
+    await runPub(args: ['cache', 'add', 'foo']);
+    await runPub(args: ['cache', 'add', 'bar']);
 
     await d.dir(cachePath, [
       d.dir('global_packages', [
@@ -41,8 +41,8 @@
       ])
     ]).create();
 
-    var pub = await pubRun(global: true, args: ["foo:script"]);
-    expect(pub.stdout, emitsThrough("bar 1.0.0"));
+    var pub = await pubRun(global: true, args: ['foo:script']);
+    expect(pub.stdout, emitsThrough('bar 1.0.0'));
     await pub.shouldExit();
 
     await d.dir(cachePath, [
diff --git a/test/hosted/fail_gracefully_on_missing_package_test.dart b/test/hosted/fail_gracefully_on_missing_package_test.dart
index cc798f8..08d1f18 100644
--- a/test/hosted/fail_gracefully_on_missing_package_test.dart
+++ b/test/hosted/fail_gracefully_on_missing_package_test.dart
@@ -9,19 +9,19 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test('fails gracefully if the package does not exist', () async {
       await serveNoPackages();
 
-      await d.appDir({"foo": "1.2.3"}).create();
+      await d.appDir({'foo': '1.2.3'}).create();
 
       await pubCommand(command,
           error: allOf([
             contains(
                 "Because myapp depends on foo any which doesn't exist (could "
-                "not find package foo at http://localhost:"),
-            contains("), version solving failed.")
+                'not find package foo at http://localhost:'),
+            contains('), version solving failed.')
           ]),
           exitCode: exit_codes.UNAVAILABLE);
     });
diff --git a/test/hosted/fail_gracefully_on_url_resolve_test.dart b/test/hosted/fail_gracefully_on_url_resolve_test.dart
index 7e274df..645fabd 100644
--- a/test/hosted/fail_gracefully_on_url_resolve_test.dart
+++ b/test/hosted/fail_gracefully_on_url_resolve_test.dart
@@ -9,13 +9,13 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test('fails gracefully if the url does not resolve', () async {
       await d.dir(appPath, [
         d.appPubspec({
-          "foo": {
-            "hosted": {"name": "foo", "url": "http://pub.invalid"}
+          'foo': {
+            'hosted': {'name': 'foo', 'url': 'http://pub.invalid'}
           }
         })
       ]).create();
diff --git a/test/hosted/metadata_test.dart b/test/hosted/metadata_test.dart
index 6873677..342bd11 100644
--- a/test/hosted/metadata_test.dart
+++ b/test/hosted/metadata_test.dart
@@ -9,91 +9,91 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test('sends metadata headers for a direct dependency', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.0.0");
+        builder.serve('foo', '1.0.0');
       });
 
-      await d.appDir({"foo": "1.0.0"}).create();
+      await d.appDir({'foo': '1.0.0'}).create();
 
       await pubCommand(command,
           silent: allOf([
-            contains("X-Pub-OS: ${Platform.operatingSystem}"),
-            contains("X-Pub-Command: ${command.name}"),
-            contains("X-Pub-Session-ID:"),
-            contains("X-Pub-Environment: test-environment"),
+            contains('X-Pub-OS: ${Platform.operatingSystem}'),
+            contains('X-Pub-Command: ${command.name}'),
+            contains('X-Pub-Session-ID:'),
+            contains('X-Pub-Environment: test-environment'),
 
             // We should send the reason when we request the pubspec and when we
             // request the tarball.
-            matchesMultiple("X-Pub-Reason: direct", 2),
-            isNot(contains("X-Pub-Reason: dev")),
+            matchesMultiple('X-Pub-Reason: direct', 2),
+            isNot(contains('X-Pub-Reason: dev')),
           ]));
     });
 
     test('sends metadata headers for a dev dependency', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.0.0");
+        builder.serve('foo', '1.0.0');
       });
 
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dev_dependencies": {"foo": "1.0.0"}
+          'name': 'myapp',
+          'dev_dependencies': {'foo': '1.0.0'}
         })
       ]).create();
 
       await pubCommand(command,
           silent: allOf([
-            contains("X-Pub-OS: ${Platform.operatingSystem}"),
-            contains("X-Pub-Command: ${command.name}"),
-            contains("X-Pub-Session-ID:"),
-            contains("X-Pub-Environment: test-environment"),
+            contains('X-Pub-OS: ${Platform.operatingSystem}'),
+            contains('X-Pub-Command: ${command.name}'),
+            contains('X-Pub-Session-ID:'),
+            contains('X-Pub-Environment: test-environment'),
 
             // We should send the reason when we request the pubspec and when we
             // request the tarball.
-            matchesMultiple("X-Pub-Reason: dev", 2),
-            isNot(contains("X-Pub-Reason: direct")),
+            matchesMultiple('X-Pub-Reason: dev', 2),
+            isNot(contains('X-Pub-Reason: direct')),
           ]));
     });
 
     test('sends metadata headers for a transitive dependency', () async {
       await servePackages((builder) {
-        builder.serve("bar", "1.0.0");
+        builder.serve('bar', '1.0.0');
       });
 
       await d.appDir({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       }).create();
 
-      await d.dir("foo", [
-        d.libPubspec("foo", "1.0.0", deps: {"bar": "1.0.0"})
+      await d.dir('foo', [
+        d.libPubspec('foo', '1.0.0', deps: {'bar': '1.0.0'})
       ]).create();
 
       await pubCommand(command,
           silent: allOf([
-            contains("X-Pub-OS: ${Platform.operatingSystem}"),
-            contains("X-Pub-Command: ${command.name}"),
-            contains("X-Pub-Session-ID:"),
-            contains("X-Pub-Environment: test-environment"),
-            isNot(contains("X-Pub-Reason:")),
+            contains('X-Pub-OS: ${Platform.operatingSystem}'),
+            contains('X-Pub-Command: ${command.name}'),
+            contains('X-Pub-Session-ID:'),
+            contains('X-Pub-Environment: test-environment'),
+            isNot(contains('X-Pub-Reason:')),
           ]));
     });
 
     test("doesn't send metadata headers to a foreign server", () async {
       var server = await PackageServer.start((builder) {
-        builder.serve("foo", "1.0.0");
+        builder.serve('foo', '1.0.0');
       });
 
       await d.appDir({
-        "foo": {
-          "version": "1.0.0",
-          "hosted": {"name": "foo", "url": "http://localhost:${server.port}"}
+        'foo': {
+          'version': '1.0.0',
+          'hosted': {'name': 'foo', 'url': 'http://localhost:${server.port}'}
         }
       }).create();
 
-      await pubCommand(command, silent: isNot(contains("X-Pub-")));
+      await pubCommand(command, silent: isNot(contains('X-Pub-')));
     });
   });
 }
diff --git a/test/hosted/offline_test.dart b/test/hosted/offline_test.dart
index c60c115..1788edd 100644
--- a/test/hosted/offline_test.dart
+++ b/test/hosted/offline_test.dart
@@ -9,28 +9,28 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test('upgrades a package using the cache', () async {
       // Run the server so that we know what URL to use in the system cache.
       await serveErrors();
 
       await d.cacheDir({
-        "foo": ["1.2.2", "1.2.3"],
-        "bar": ["1.2.3"]
+        'foo': ['1.2.2', '1.2.3'],
+        'bar': ['1.2.3']
       }, includePubspecs: true).create();
 
-      await d.appDir({"foo": "any", "bar": "any"}).create();
+      await d.appDir({'foo': 'any', 'bar': 'any'}).create();
 
       String warning;
       if (command == RunCommand.upgrade) {
-        warning = "Warning: Upgrading when offline may not update you "
-            "to the latest versions of your dependencies.";
+        warning = 'Warning: Upgrading when offline may not update you '
+            'to the latest versions of your dependencies.';
       }
 
       await pubCommand(command, args: ['--offline'], warning: warning);
 
-      await d.appPackagesFile({"foo": "1.2.3", "bar": "1.2.3"}).validate();
+      await d.appPackagesFile({'foo': '1.2.3', 'bar': '1.2.3'}).validate();
     });
 
     test('supports prerelease versions', () async {
@@ -38,27 +38,27 @@
       await serveErrors();
 
       await d.cacheDir({
-        "foo": ["1.2.3-alpha.1"]
+        'foo': ['1.2.3-alpha.1']
       }, includePubspecs: true).create();
 
-      await d.appDir({"foo": "any"}).create();
+      await d.appDir({'foo': 'any'}).create();
 
       String warning;
       if (command == RunCommand.upgrade) {
-        warning = "Warning: Upgrading when offline may not update you "
-            "to the latest versions of your dependencies.";
+        warning = 'Warning: Upgrading when offline may not update you '
+            'to the latest versions of your dependencies.';
       }
 
       await pubCommand(command, args: ['--offline'], warning: warning);
 
-      await d.appPackagesFile({"foo": "1.2.3-alpha.1"}).validate();
+      await d.appPackagesFile({'foo': '1.2.3-alpha.1'}).validate();
     });
 
     test('fails gracefully if a dependency is not cached', () async {
       // Run the server so that we know what URL to use in the system cache.
       await serveErrors();
 
-      await d.appDir({"foo": "any"}).create();
+      await d.appDir({'foo': 'any'}).create();
 
       await pubCommand(command,
           args: ['--offline'],
@@ -74,10 +74,10 @@
       await serveErrors();
 
       await d.cacheDir({
-        "foo": ["1.2.2", "1.2.3"]
+        'foo': ['1.2.2', '1.2.3']
       }, includePubspecs: true).create();
 
-      await d.appDir({"foo": ">2.0.0"}).create();
+      await d.appDir({'foo': '>2.0.0'}).create();
 
       await pubCommand(command,
           args: ['--offline'], error: equalsIgnoringWhitespace("""
@@ -92,7 +92,7 @@
       // Run the server so that we know what URL to use in the system cache.
       await serveErrors();
 
-      await d.appDir({"foo": "any"}).create();
+      await d.appDir({'foo': 'any'}).create();
 
       await createLockFile('myapp', hosted: {'foo': '1.2.4'});
 
@@ -110,16 +110,16 @@
       await serveErrors();
 
       await d.cacheDir({
-        "foo": ["1.2.2", "1.2.3"]
+        'foo': ['1.2.2', '1.2.3']
       }, includePubspecs: true).create();
 
-      await d.appDir({"foo": "any"}).create();
+      await d.appDir({'foo': 'any'}).create();
 
       await createLockFile('myapp', hosted: {'foo': '1.2.4'});
 
       await pubCommand(command, args: ['--offline']);
 
-      await d.appPackagesFile({"foo": "1.2.3"}).validate();
+      await d.appPackagesFile({'foo': '1.2.3'}).validate();
     });
 
     test('skips invalid cached versions', () async {
@@ -127,18 +127,18 @@
       await serveErrors();
 
       await d.cacheDir({
-        "foo": ["1.2.2", "1.2.3"]
+        'foo': ['1.2.2', '1.2.3']
       }, includePubspecs: true).create();
 
       await d.hostedCache([
-        d.dir("foo-1.2.3", [d.file("pubspec.yaml", "{")])
+        d.dir('foo-1.2.3', [d.file('pubspec.yaml', '{')])
       ]).create();
 
-      await d.appDir({"foo": "any"}).create();
+      await d.appDir({'foo': 'any'}).create();
 
       await pubCommand(command, args: ['--offline']);
 
-      await d.appPackagesFile({"foo": "1.2.2"}).validate();
+      await d.appPackagesFile({'foo': '1.2.2'}).validate();
     });
 
     test('skips invalid locked versions', () async {
@@ -146,20 +146,20 @@
       await serveErrors();
 
       await d.cacheDir({
-        "foo": ["1.2.2", "1.2.3"]
+        'foo': ['1.2.2', '1.2.3']
       }, includePubspecs: true).create();
 
       await d.hostedCache([
-        d.dir("foo-1.2.3", [d.file("pubspec.yaml", "{")])
+        d.dir('foo-1.2.3', [d.file('pubspec.yaml', '{')])
       ]).create();
 
-      await d.appDir({"foo": "any"}).create();
+      await d.appDir({'foo': 'any'}).create();
 
       await createLockFile('myapp', hosted: {'foo': '1.2.3'});
 
       await pubCommand(command, args: ['--offline']);
 
-      await d.appPackagesFile({"foo": "1.2.2"}).validate();
+      await d.appPackagesFile({'foo': '1.2.2'}).validate();
     });
   });
 }
diff --git a/test/hosted/remove_removed_dependency_test.dart b/test/hosted/remove_removed_dependency_test.dart
index dd6faec..d326384 100644
--- a/test/hosted/remove_removed_dependency_test.dart
+++ b/test/hosted/remove_removed_dependency_test.dart
@@ -7,25 +7,25 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test("removes a dependency that's removed from the pubspec", () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.0.0");
-        builder.serve("bar", "1.0.0");
+        builder.serve('foo', '1.0.0');
+        builder.serve('bar', '1.0.0');
       });
 
-      await d.appDir({"foo": "any", "bar": "any"}).create();
+      await d.appDir({'foo': 'any', 'bar': 'any'}).create();
 
       await pubCommand(command);
 
-      await d.appPackagesFile({"foo": "1.0.0", "bar": "1.0.0"}).validate();
+      await d.appPackagesFile({'foo': '1.0.0', 'bar': '1.0.0'}).validate();
 
-      await d.appDir({"foo": "any"}).create();
+      await d.appDir({'foo': 'any'}).create();
 
       await pubCommand(command);
 
-      await d.appPackagesFile({"foo": "1.0.0"}).validate();
+      await d.appPackagesFile({'foo': '1.0.0'}).validate();
     });
   });
 }
diff --git a/test/hosted/remove_removed_transitive_dependency_test.dart b/test/hosted/remove_removed_transitive_dependency_test.dart
index 1256543..50702d7 100644
--- a/test/hosted/remove_removed_transitive_dependency_test.dart
+++ b/test/hosted/remove_removed_transitive_dependency_test.dart
@@ -7,36 +7,36 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test(
         "removes a transitive dependency that's no longer depended "
-        "on", () async {
+        'on', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.0.0", deps: {"shared_dep": "any"});
-        builder.serve("bar", "1.0.0",
-            deps: {"shared_dep": "any", "bar_dep": "any"});
-        builder.serve("shared_dep", "1.0.0");
-        builder.serve("bar_dep", "1.0.0");
+        builder.serve('foo', '1.0.0', deps: {'shared_dep': 'any'});
+        builder.serve('bar', '1.0.0',
+            deps: {'shared_dep': 'any', 'bar_dep': 'any'});
+        builder.serve('shared_dep', '1.0.0');
+        builder.serve('bar_dep', '1.0.0');
       });
 
-      await d.appDir({"foo": "any", "bar": "any"}).create();
+      await d.appDir({'foo': 'any', 'bar': 'any'}).create();
 
       await pubCommand(command);
 
       await d.appPackagesFile({
-        "foo": "1.0.0",
-        "bar": "1.0.0",
-        "shared_dep": "1.0.0",
-        "bar_dep": "1.0.0",
+        'foo': '1.0.0',
+        'bar': '1.0.0',
+        'shared_dep': '1.0.0',
+        'bar_dep': '1.0.0',
       }).validate();
 
-      await d.appDir({"foo": "any"}).create();
+      await d.appDir({'foo': 'any'}).create();
 
       await pubCommand(command);
 
       await d
-          .appPackagesFile({"foo": "1.0.0", "shared_dep": "1.0.0"}).validate();
+          .appPackagesFile({'foo': '1.0.0', 'shared_dep': '1.0.0'}).validate();
     });
   });
 }
diff --git a/test/hosted/version_negotiation_test.dart b/test/hosted/version_negotiation_test.dart
index b952aa2..6d06729 100644
--- a/test/hosted/version_negotiation_test.dart
+++ b/test/hosted/version_negotiation_test.dart
@@ -9,14 +9,14 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test('sends the correct Accept header', () async {
       var server = await ShelfTestServer.create();
 
       await d.appDir({
-        "foo": {
-          "hosted": {"name": "foo", "url": server.url.toString()}
+        'foo': {
+          'hosted': {'name': 'foo', 'url': server.url.toString()}
         }
       }).create();
 
@@ -35,8 +35,8 @@
       var server = await ShelfTestServer.create();
 
       await d.appDir({
-        "foo": {
-          "hosted": {"name": "foo", "url": server.url.toString()}
+        'foo': {
+          'hosted': {'name': 'foo', 'url': server.url.toString()}
         }
       }).create();
 
@@ -50,8 +50,8 @@
       expect(
           pub.stderr,
           emitsLines(
-              "Pub 0.1.2+3 is incompatible with the current version of localhost.\n"
-              "Upgrade pub to the latest version and try again."));
+              'Pub 0.1.2+3 is incompatible with the current version of localhost.\n'
+              'Upgrade pub to the latest version and try again.'));
     });
   });
 }
diff --git a/test/io_test.dart b/test/io_test.dart
index b7b7241..ede9139 100644
--- a/test/io_test.dart
+++ b/test/io_test.dart
@@ -9,7 +9,7 @@
 import 'package:pub/src/io.dart';
 import 'package:test/test.dart';
 
-main() {
+void main() {
   group('listDir', () {
     test('ignores hidden files by default', () {
       expect(withTempDir((temp) {
@@ -201,7 +201,7 @@
     });
   });
 
-  testExistencePredicate("entryExists", entryExists,
+  testExistencePredicate('entryExists', entryExists,
       forFile: true,
       forFileSymlink: true,
       forMultiLevelFileSymlink: true,
@@ -211,7 +211,7 @@
       forBrokenSymlink: true,
       forMultiLevelBrokenSymlink: true);
 
-  testExistencePredicate("linkExists", linkExists,
+  testExistencePredicate('linkExists', linkExists,
       forFile: false,
       forFileSymlink: true,
       forMultiLevelFileSymlink: true,
@@ -221,7 +221,7 @@
       forBrokenSymlink: true,
       forMultiLevelBrokenSymlink: true);
 
-  testExistencePredicate("fileExists", fileExists,
+  testExistencePredicate('fileExists', fileExists,
       forFile: true,
       forFileSymlink: true,
       forMultiLevelFileSymlink: true,
@@ -231,7 +231,7 @@
       forBrokenSymlink: false,
       forMultiLevelBrokenSymlink: false);
 
-  testExistencePredicate("dirExists", dirExists,
+  testExistencePredicate('dirExists', dirExists,
       forFile: false,
       forFileSymlink: false,
       forMultiLevelFileSymlink: false,
@@ -242,7 +242,7 @@
       forMultiLevelBrokenSymlink: false);
 }
 
-void testExistencePredicate(String name, bool predicate(String path),
+void testExistencePredicate(String name, bool Function(String path) predicate,
     {bool forFile,
     bool forFileSymlink,
     bool forMultiLevelFileSymlink,
@@ -254,15 +254,15 @@
   group(name, () {
     test('returns $forFile for a file', () {
       expect(withTempDir((temp) {
-        var file = path.join(temp, "test.txt");
-        writeTextFile(file, "contents");
+        var file = path.join(temp, 'test.txt');
+        writeTextFile(file, 'contents');
         expect(predicate(file), equals(forFile));
       }), completes);
     });
 
     test('returns $forDirectory for a directory', () {
       expect(withTempDir((temp) {
-        var file = path.join(temp, "dir");
+        var file = path.join(temp, 'dir');
         _createDir(file);
         expect(predicate(file), equals(forDirectory));
       }), completes);
@@ -270,8 +270,8 @@
 
     test('returns $forDirectorySymlink for a symlink to a directory', () {
       expect(withTempDir((temp) {
-        var targetPath = path.join(temp, "dir");
-        var symlinkPath = path.join(temp, "linkdir");
+        var targetPath = path.join(temp, 'dir');
+        var symlinkPath = path.join(temp, 'linkdir');
         _createDir(targetPath);
         createSymlink(targetPath, symlinkPath);
         expect(predicate(symlinkPath), equals(forDirectorySymlink));
@@ -282,9 +282,9 @@
         'returns $forMultiLevelDirectorySymlink for a multi-level symlink to '
         'a directory', () {
       expect(withTempDir((temp) {
-        var targetPath = path.join(temp, "dir");
-        var symlink1Path = path.join(temp, "link1dir");
-        var symlink2Path = path.join(temp, "link2dir");
+        var targetPath = path.join(temp, 'dir');
+        var symlink1Path = path.join(temp, 'link1dir');
+        var symlink2Path = path.join(temp, 'link2dir');
         _createDir(targetPath);
         createSymlink(targetPath, symlink1Path);
         createSymlink(symlink1Path, symlink2Path);
@@ -294,8 +294,8 @@
 
     test('returns $forBrokenSymlink for a broken symlink', () {
       expect(withTempDir((temp) {
-        var targetPath = path.join(temp, "dir");
-        var symlinkPath = path.join(temp, "linkdir");
+        var targetPath = path.join(temp, 'dir');
+        var symlinkPath = path.join(temp, 'linkdir');
         _createDir(targetPath);
         createSymlink(targetPath, symlinkPath);
         deleteEntry(targetPath);
@@ -306,9 +306,9 @@
     test('returns $forMultiLevelBrokenSymlink for a multi-level broken symlink',
         () {
       expect(withTempDir((temp) {
-        var targetPath = path.join(temp, "dir");
-        var symlink1Path = path.join(temp, "link1dir");
-        var symlink2Path = path.join(temp, "link2dir");
+        var targetPath = path.join(temp, 'dir');
+        var symlink1Path = path.join(temp, 'link1dir');
+        var symlink2Path = path.join(temp, 'link2dir');
         _createDir(targetPath);
         createSymlink(targetPath, symlink1Path);
         createSymlink(symlink1Path, symlink2Path);
@@ -321,9 +321,9 @@
     if (!Platform.isWindows) {
       test('returns $forFileSymlink for a symlink to a file', () {
         expect(withTempDir((temp) {
-          var targetPath = path.join(temp, "test.txt");
-          var symlinkPath = path.join(temp, "link.txt");
-          writeTextFile(targetPath, "contents");
+          var targetPath = path.join(temp, 'test.txt');
+          var symlinkPath = path.join(temp, 'link.txt');
+          writeTextFile(targetPath, 'contents');
           createSymlink(targetPath, symlinkPath);
           expect(predicate(symlinkPath), equals(forFileSymlink));
         }), completes);
@@ -333,10 +333,10 @@
           'returns $forMultiLevelFileSymlink for a multi-level symlink to a '
           'file', () {
         expect(withTempDir((temp) {
-          var targetPath = path.join(temp, "test.txt");
-          var symlink1Path = path.join(temp, "link1.txt");
-          var symlink2Path = path.join(temp, "link2.txt");
-          writeTextFile(targetPath, "contents");
+          var targetPath = path.join(temp, 'test.txt');
+          var symlink1Path = path.join(temp, 'link1.txt');
+          var symlink2Path = path.join(temp, 'link2.txt');
+          writeTextFile(targetPath, 'contents');
           createSymlink(targetPath, symlink1Path);
           createSymlink(symlink1Path, symlink2Path);
           expect(predicate(symlink2Path), equals(forMultiLevelFileSymlink));
@@ -347,7 +347,7 @@
 }
 
 /// Like [withTempDir], but canonicalizes the path before passing it to [fn].
-Future<T> _withCanonicalTempDir<T>(FutureOr<T> fn(String path)) =>
+Future<T> _withCanonicalTempDir<T>(FutureOr<T> Function(String path) fn) =>
     withTempDir((temp) => fn(canonicalize(temp)));
 
 /// Creates a directory [dir].
diff --git a/test/lish/archives_and_uploads_a_package_test.dart b/test/lish/archives_and_uploads_a_package_test.dart
index f5ad0eb..8a57716 100644
--- a/test/lish/archives_and_uploads_a_package_test.dart
+++ b/test/lish/archives_and_uploads_a_package_test.dart
@@ -16,7 +16,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('archives and uploads a package', () async {
diff --git a/test/lish/cloud_storage_upload_doesnt_redirect_test.dart b/test/lish/cloud_storage_upload_doesnt_redirect_test.dart
index b0bebc3..14fc05f 100644
--- a/test/lish/cloud_storage_upload_doesnt_redirect_test.dart
+++ b/test/lish/cloud_storage_upload_doesnt_redirect_test.dart
@@ -10,7 +10,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test("cloud storage upload doesn't redirect", () async {
diff --git a/test/lish/cloud_storage_upload_provides_an_error_test.dart b/test/lish/cloud_storage_upload_provides_an_error_test.dart
index 8b25b93..aa1956f 100644
--- a/test/lish/cloud_storage_upload_provides_an_error_test.dart
+++ b/test/lish/cloud_storage_upload_provides_an_error_test.dart
@@ -10,7 +10,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('cloud storage upload provides an error', () async {
diff --git a/test/lish/does_not_publish_if_private_test.dart b/test/lish/does_not_publish_if_private_test.dart
index 6d59bf1..f500517 100644
--- a/test/lish/does_not_publish_if_private_test.dart
+++ b/test/lish/does_not_publish_if_private_test.dart
@@ -9,15 +9,15 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('does not publish if the package is private', () async {
-    var pkg = packageMap("test_pkg", "1.0.0");
-    pkg["publish_to"] = "none";
+    var pkg = packageMap('test_pkg', '1.0.0');
+    pkg['publish_to'] = 'none';
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     await runPub(
-        args: ["lish"],
-        error: startsWith("A private package cannot be published."),
+        args: ['lish'],
+        error: startsWith('A private package cannot be published.'),
         exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/lish/does_not_publish_if_private_with_server_arg_test.dart b/test/lish/does_not_publish_if_private_with_server_arg_test.dart
index 3056130..96cc1f5 100644
--- a/test/lish/does_not_publish_if_private_with_server_arg_test.dart
+++ b/test/lish/does_not_publish_if_private_with_server_arg_test.dart
@@ -9,17 +9,17 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test(
       'does not publish if the package is private even if a server '
       'argument is provided', () async {
-    var pkg = packageMap("test_pkg", "1.0.0");
-    pkg["publish_to"] = "none";
+    var pkg = packageMap('test_pkg', '1.0.0');
+    pkg['publish_to'] = 'none';
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     await runPub(
-        args: ["lish", "--server", "http://example.com"],
-        error: startsWith("A private package cannot be published."),
+        args: ['lish', '--server', 'http://example.com'],
+        error: startsWith('A private package cannot be published.'),
         exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/lish/force_cannot_be_combined_with_dry_run_test.dart b/test/lish/force_cannot_be_combined_with_dry_run_test.dart
index 0ae869b..aabdcfb 100644
--- a/test/lish/force_cannot_be_combined_with_dry_run_test.dart
+++ b/test/lish/force_cannot_be_combined_with_dry_run_test.dart
@@ -9,11 +9,11 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('--force cannot be combined with --dry-run', () async {
-    await runPub(args: ['lish', '--force', '--dry-run'], error: """
+    await runPub(args: ['lish', '--force', '--dry-run'], error: '''
           Cannot use both --force and --dry-run.
           
           Usage: pub publish [options]
@@ -24,6 +24,6 @@
 
           Run "pub help" to see global options.
           See https://dart.dev/tools/pub/cmd/pub-lish for detailed documentation.
-          """, exitCode: exit_codes.USAGE);
+          ''', exitCode: exit_codes.USAGE);
   });
 }
diff --git a/test/lish/force_does_not_publish_if_private_test.dart b/test/lish/force_does_not_publish_if_private_test.dart
index 94ed680..3525f8c 100644
--- a/test/lish/force_does_not_publish_if_private_test.dart
+++ b/test/lish/force_does_not_publish_if_private_test.dart
@@ -9,15 +9,15 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('force does not publish if the package is private', () async {
-    var pkg = packageMap("test_pkg", "1.0.0");
-    pkg["publish_to"] = "none";
+    var pkg = packageMap('test_pkg', '1.0.0');
+    pkg['publish_to'] = 'none';
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     await runPub(
-        args: ["lish", "--force"],
-        error: startsWith("A private package cannot be published."),
+        args: ['lish', '--force'],
+        error: startsWith('A private package cannot be published.'),
         exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/lish/force_does_not_publish_if_there_are_errors_test.dart b/test/lish/force_does_not_publish_if_there_are_errors_test.dart
index fcb183a..53d388d 100644
--- a/test/lish/force_does_not_publish_if_there_are_errors_test.dart
+++ b/test/lish/force_does_not_publish_if_there_are_errors_test.dart
@@ -10,12 +10,12 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('--force does not publish if there are errors', () async {
-    var pkg = packageMap("test_pkg", "1.0.0");
-    pkg.remove("homepage");
+    var pkg = packageMap('test_pkg', '1.0.0');
+    pkg.remove('homepage');
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     var server = await ShelfTestServer.create();
@@ -24,7 +24,7 @@
     await pub.shouldExit(exit_codes.DATA);
     expect(
         pub.stderr,
-        emitsThrough("Sorry, your package is missing some "
+        emitsThrough('Sorry, your package is missing some '
             "requirements and can't be published yet."));
   });
 }
diff --git a/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart b/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart
index 16b701d..b39e8ec 100644
--- a/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart
+++ b/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart
@@ -14,7 +14,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('--force publishes if there are no warnings or errors', () async {
diff --git a/test/lish/force_publishes_if_there_are_warnings_test.dart b/test/lish/force_publishes_if_there_are_warnings_test.dart
index db941ad..e1f5bec 100644
--- a/test/lish/force_publishes_if_there_are_warnings_test.dart
+++ b/test/lish/force_publishes_if_there_are_warnings_test.dart
@@ -14,13 +14,13 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('--force publishes if there are warnings', () async {
     var pkg =
-        packageMap("test_pkg", "1.0.0", null, null, {'sdk': '>=1.8.0 <2.0.0'});
-    pkg["dependencies"] = {'foo': 'any'};
+        packageMap('test_pkg', '1.0.0', null, null, {'sdk': '>=1.8.0 <2.0.0'});
+    pkg['dependencies'] = {'foo': 'any'};
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     var server = await ShelfTestServer.create();
diff --git a/test/lish/many_files_test.dart b/test/lish/many_files_test.dart
index 15a749e..7ef9d2c 100644
--- a/test/lish/many_files_test.dart
+++ b/test/lish/many_files_test.dart
@@ -29,7 +29,7 @@
 /// [MAX_PATH]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa383130(v=vs.85).aspx
 const _pathMax = 260 - 1;
 
-main() {
+void main() {
   test(
       'archives and uploads a package with more files than can fit on '
       'the command line', () async {
@@ -42,10 +42,10 @@
     } else {
       // On POSIX, the maximum argument list length can be retrieved
       // automatically.
-      var result = Process.runSync("getconf", ["ARG_MAX"]);
+      var result = Process.runSync('getconf', ['ARG_MAX']);
       if (result.exitCode != 0) {
-        fail("getconf failed with exit code ${result.exitCode}:\n"
-            "${result.stderr}");
+        fail('getconf failed with exit code ${result.exitCode}:\n'
+            '${result.stderr}');
       }
 
       argMax = int.parse(result.stdout);
@@ -70,9 +70,9 @@
       // The file name contains "x"s to make the path hit [_pathMax],
       // followed by a number to distinguish different files.
       var fileName =
-          "x" * (_pathMax - appRoot.length - iString.length - 1) + iString;
+          'x' * (_pathMax - appRoot.length - iString.length - 1) + iString;
 
-      File(p.join(appRoot, fileName)).writeAsStringSync("");
+      File(p.join(appRoot, fileName)).writeAsStringSync('');
     }
 
     var server = await ShelfTestServer.create();
diff --git a/test/lish/package_creation_provides_a_malformed_error_test.dart b/test/lish/package_creation_provides_a_malformed_error_test.dart
index f31f5ab..a4b601d 100644
--- a/test/lish/package_creation_provides_a_malformed_error_test.dart
+++ b/test/lish/package_creation_provides_a_malformed_error_test.dart
@@ -12,7 +12,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('package creation provides a malformed error', () async {
diff --git a/test/lish/package_creation_provides_a_malformed_success_test.dart b/test/lish/package_creation_provides_a_malformed_success_test.dart
index f30e30f..27415b8 100644
--- a/test/lish/package_creation_provides_a_malformed_success_test.dart
+++ b/test/lish/package_creation_provides_a_malformed_success_test.dart
@@ -12,7 +12,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('package creation provides a malformed success', () async {
diff --git a/test/lish/package_creation_provides_an_error_test.dart b/test/lish/package_creation_provides_an_error_test.dart
index 1a62c33..39f41af 100644
--- a/test/lish/package_creation_provides_an_error_test.dart
+++ b/test/lish/package_creation_provides_an_error_test.dart
@@ -12,7 +12,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('package creation provides an error', () async {
diff --git a/test/lish/package_creation_provides_invalid_json_test.dart b/test/lish/package_creation_provides_invalid_json_test.dart
index 0e9bc1b..2666b95 100644
--- a/test/lish/package_creation_provides_invalid_json_test.dart
+++ b/test/lish/package_creation_provides_invalid_json_test.dart
@@ -10,7 +10,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('package creation provides invalid JSON', () async {
diff --git a/test/lish/package_validation_has_a_warning_and_continues_test.dart b/test/lish/package_validation_has_a_warning_and_continues_test.dart
index 7002d78..b672126 100644
--- a/test/lish/package_validation_has_a_warning_and_continues_test.dart
+++ b/test/lish/package_validation_has_a_warning_and_continues_test.dart
@@ -14,19 +14,19 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('package validation has a warning and continues', () async {
     var pkg =
-        packageMap("test_pkg", "1.0.0", null, null, {'sdk': '>=1.8.0 <2.0.0'});
-    pkg["author"] = "Natalie Weizenbaum";
+        packageMap('test_pkg', '1.0.0', null, null, {'sdk': '>=1.8.0 <2.0.0'});
+    pkg['author'] = 'Natalie Weizenbaum';
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     var server = await ShelfTestServer.create();
     await d.credentialsFile(server, 'access token').create();
     var pub = await startPublish(server);
-    pub.stdin.writeln("y");
+    pub.stdin.writeln('y');
     handleUploadForm(server);
     handleUpload(server);
 
diff --git a/test/lish/package_validation_has_a_warning_and_is_canceled_test.dart b/test/lish/package_validation_has_a_warning_and_is_canceled_test.dart
index 3a435c5..fa67de6 100644
--- a/test/lish/package_validation_has_a_warning_and_is_canceled_test.dart
+++ b/test/lish/package_validation_has_a_warning_and_is_canceled_test.dart
@@ -10,20 +10,20 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('package validation has a warning and is canceled', () async {
     var pkg =
-        packageMap("test_pkg", "1.0.0", null, null, {'sdk': '>=1.8.0 <2.0.0'});
-    pkg["author"] = "Natalie Weizenbaum";
+        packageMap('test_pkg', '1.0.0', null, null, {'sdk': '>=1.8.0 <2.0.0'});
+    pkg['author'] = 'Natalie Weizenbaum';
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     var server = await ShelfTestServer.create();
     var pub = await startPublish(server);
 
-    pub.stdin.writeln("n");
+    pub.stdin.writeln('n');
     await pub.shouldExit(exit_codes.DATA);
-    expect(pub.stderr, emitsThrough("Package upload canceled."));
+    expect(pub.stderr, emitsThrough('Package upload canceled.'));
   });
 }
diff --git a/test/lish/package_validation_has_an_error_test.dart b/test/lish/package_validation_has_an_error_test.dart
index f45ae17..c51f315 100644
--- a/test/lish/package_validation_has_an_error_test.dart
+++ b/test/lish/package_validation_has_an_error_test.dart
@@ -10,12 +10,12 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('package validation has an error', () async {
-    var pkg = packageMap("test_pkg", "1.0.0");
-    pkg.remove("homepage");
+    var pkg = packageMap('test_pkg', '1.0.0');
+    pkg.remove('homepage');
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     var server = await ShelfTestServer.create();
@@ -24,7 +24,7 @@
     await pub.shouldExit(exit_codes.DATA);
     expect(
         pub.stderr,
-        emitsThrough("Sorry, your package is missing some "
+        emitsThrough('Sorry, your package is missing some '
             "requirements and can't be published yet."));
   });
 }
diff --git a/test/lish/preview_errors_if_private_test.dart b/test/lish/preview_errors_if_private_test.dart
index 7cac069..61284a1 100644
--- a/test/lish/preview_errors_if_private_test.dart
+++ b/test/lish/preview_errors_if_private_test.dart
@@ -9,15 +9,15 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('preview shows an error if the package is private', () async {
-    var pkg = packageMap("test_pkg", "1.0.0");
-    pkg["publish_to"] = "none";
+    var pkg = packageMap('test_pkg', '1.0.0');
+    pkg['publish_to'] = 'none';
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     await runPub(
-        args: ["lish", "--dry-run"],
-        error: startsWith("A private package cannot be published."),
+        args: ['lish', '--dry-run'],
+        error: startsWith('A private package cannot be published.'),
         exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/lish/preview_package_validation_has_a_warning_test.dart b/test/lish/preview_package_validation_has_a_warning_test.dart
index 309e1c7..b715fab 100644
--- a/test/lish/preview_package_validation_has_a_warning_test.dart
+++ b/test/lish/preview_package_validation_has_a_warning_test.dart
@@ -10,13 +10,13 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('preview package validation has a warning', () async {
     var pkg =
-        packageMap("test_pkg", "1.0.0", null, null, {'sdk': '>=1.8.0 <2.0.0'});
-    pkg["dependencies"] = {'foo': 'any'};
+        packageMap('test_pkg', '1.0.0', null, null, {'sdk': '>=1.8.0 <2.0.0'});
+    pkg['dependencies'] = {'foo': 'any'};
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     var server = await ShelfTestServer.create();
diff --git a/test/lish/preview_package_validation_has_no_warnings_test.dart b/test/lish/preview_package_validation_has_no_warnings_test.dart
index 4af1dfb..5a39ddb 100644
--- a/test/lish/preview_package_validation_has_no_warnings_test.dart
+++ b/test/lish/preview_package_validation_has_no_warnings_test.dart
@@ -10,12 +10,12 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('preview package validation has no warnings', () async {
     var pkg =
-        packageMap("test_pkg", "1.0.0", null, null, {'sdk': '>=1.8.0 <2.0.0'});
+        packageMap('test_pkg', '1.0.0', null, null, {'sdk': '>=1.8.0 <2.0.0'});
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     var server = await ShelfTestServer.create();
diff --git a/test/lish/server_arg_does_not_override_private_test.dart b/test/lish/server_arg_does_not_override_private_test.dart
index 8492d28..ac6f27b 100644
--- a/test/lish/server_arg_does_not_override_private_test.dart
+++ b/test/lish/server_arg_does_not_override_private_test.dart
@@ -9,15 +9,15 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('an explicit --server argument does not override privacy', () async {
-    var pkg = packageMap("test_pkg", "1.0.0");
-    pkg["publish_to"] = "none";
+    var pkg = packageMap('test_pkg', '1.0.0');
+    pkg['publish_to'] = 'none';
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     await runPub(
-        args: ["lish", "--server", "http://arg.com"],
-        error: startsWith("A private package cannot be published."),
+        args: ['lish', '--server', 'http://arg.com'],
+        error: startsWith('A private package cannot be published.'),
         exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/lish/server_arg_overrides_publish_to_url_test.dart b/test/lish/server_arg_overrides_publish_to_url_test.dart
index 1e14b7b..6d7929b 100644
--- a/test/lish/server_arg_overrides_publish_to_url_test.dart
+++ b/test/lish/server_arg_overrides_publish_to_url_test.dart
@@ -9,15 +9,15 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('an explicit --server argument overrides a "publish_to" url', () async {
-    var pkg = packageMap("test_pkg", "1.0.0");
-    pkg["publish_to"] = "http://pubspec.com";
+    var pkg = packageMap('test_pkg', '1.0.0');
+    pkg['publish_to'] = 'http://pubspec.com';
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     await runPub(
-        args: ["lish", "--dry-run", "--server", "http://arg.com"],
-        output: contains("http://arg.com"),
+        args: ['lish', '--dry-run', '--server', 'http://arg.com'],
+        output: contains('http://arg.com'),
         exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/lish/upload_form_fields_has_a_non_string_value_test.dart b/test/lish/upload_form_fields_has_a_non_string_value_test.dart
index 3145343..86c37d2 100644
--- a/test/lish/upload_form_fields_has_a_non_string_value_test.dart
+++ b/test/lish/upload_form_fields_has_a_non_string_value_test.dart
@@ -11,7 +11,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('upload form fields has a non-string value', () async {
diff --git a/test/lish/upload_form_fields_is_not_a_map_test.dart b/test/lish/upload_form_fields_is_not_a_map_test.dart
index 93d8fc4..081cbdc 100644
--- a/test/lish/upload_form_fields_is_not_a_map_test.dart
+++ b/test/lish/upload_form_fields_is_not_a_map_test.dart
@@ -11,7 +11,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('upload form fields is not a map', () async {
diff --git a/test/lish/upload_form_is_missing_fields_test.dart b/test/lish/upload_form_is_missing_fields_test.dart
index 870e24a..524b10d 100644
--- a/test/lish/upload_form_is_missing_fields_test.dart
+++ b/test/lish/upload_form_is_missing_fields_test.dart
@@ -11,7 +11,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('upload form is missing fields', () async {
diff --git a/test/lish/upload_form_is_missing_url_test.dart b/test/lish/upload_form_is_missing_url_test.dart
index d486fb7..838c54b 100644
--- a/test/lish/upload_form_is_missing_url_test.dart
+++ b/test/lish/upload_form_is_missing_url_test.dart
@@ -11,7 +11,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('upload form is missing url', () async {
diff --git a/test/lish/upload_form_provides_an_error_test.dart b/test/lish/upload_form_provides_an_error_test.dart
index 75be376..e0a24cc 100644
--- a/test/lish/upload_form_provides_an_error_test.dart
+++ b/test/lish/upload_form_provides_an_error_test.dart
@@ -11,7 +11,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('upload form provides an error', () async {
diff --git a/test/lish/upload_form_provides_invalid_json_test.dart b/test/lish/upload_form_provides_invalid_json_test.dart
index 2bb2f24..f3633d0 100644
--- a/test/lish/upload_form_provides_invalid_json_test.dart
+++ b/test/lish/upload_form_provides_invalid_json_test.dart
@@ -9,7 +9,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('upload form provides invalid JSON', () async {
diff --git a/test/lish/upload_form_url_is_not_a_string_test.dart b/test/lish/upload_form_url_is_not_a_string_test.dart
index d61716a..f832ccb 100644
--- a/test/lish/upload_form_url_is_not_a_string_test.dart
+++ b/test/lish/upload_form_url_is_not_a_string_test.dart
@@ -11,7 +11,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('upload form url is not a string', () async {
diff --git a/test/lish/uses_publish_to_url_test.dart b/test/lish/uses_publish_to_url_test.dart
index 53f5996..ba00af8 100644
--- a/test/lish/uses_publish_to_url_test.dart
+++ b/test/lish/uses_publish_to_url_test.dart
@@ -9,15 +9,15 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('uses the publish_to URL', () async {
-    var pkg = packageMap("test_pkg", "1.0.0");
-    pkg["publish_to"] = "http://example.com";
+    var pkg = packageMap('test_pkg', '1.0.0');
+    pkg['publish_to'] = 'http://example.com';
     await d.dir(appPath, [d.pubspec(pkg)]).create();
 
     await runPub(
-        args: ["lish", "--dry-run"],
-        output: contains("Publishing test_pkg 1.0.0 to http://example.com"),
+        args: ['lish', '--dry-run'],
+        output: contains('Publishing test_pkg 1.0.0 to http://example.com'),
         exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/list_package_dirs/ignores_updated_pubspec_test.dart b/test/list_package_dirs/ignores_updated_pubspec_test.dart
index 8cddfc3..fb4f5fd 100644
--- a/test/list_package_dirs/ignores_updated_pubspec_test.dart
+++ b/test/list_package_dirs/ignores_updated_pubspec_test.dart
@@ -10,14 +10,14 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test("uses what's in the lockfile regardless of the pubspec", () async {
     await d
-        .dir("foo", [d.libDir("foo"), d.libPubspec("foo", "1.0.0")]).create();
+        .dir('foo', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": path.join(d.sandbox, "foo")}
+        'foo': {'path': path.join(d.sandbox, 'foo')}
       })
     ]).create();
 
@@ -25,7 +25,7 @@
     // Add a dependency on "bar" and remove "foo", but don't run "pub get".
 
     await d.dir(appPath, [
-      d.appPubspec({"bar": "any"})
+      d.appPubspec({'bar': 'any'})
     ]).create();
     // Note: Using canonicalize here because pub gets the path to the
     // entrypoint package from the working directory, which has had symlinks
@@ -33,16 +33,16 @@
     // need to accomodate that.
 
     await runPub(args: [
-      "list-package-dirs",
-      "--format=json"
+      'list-package-dirs',
+      '--format=json'
     ], outputJson: {
-      "packages": {
-        "foo": path.join(d.sandbox, "foo", "lib"),
-        "myapp": canonicalize(path.join(d.sandbox, appPath, "lib"))
+      'packages': {
+        'foo': path.join(d.sandbox, 'foo', 'lib'),
+        'myapp': canonicalize(path.join(d.sandbox, appPath, 'lib'))
       },
-      "input_files": [
-        canonicalize(path.join(d.sandbox, appPath, "pubspec.lock")),
-        canonicalize(path.join(d.sandbox, appPath, "pubspec.yaml"))
+      'input_files': [
+        canonicalize(path.join(d.sandbox, appPath, 'pubspec.lock')),
+        canonicalize(path.join(d.sandbox, appPath, 'pubspec.yaml'))
       ]
     });
   });
diff --git a/test/list_package_dirs/includes_dev_dependencies_test.dart b/test/list_package_dirs/includes_dev_dependencies_test.dart
index ea0ad39..65db401 100644
--- a/test/list_package_dirs/includes_dev_dependencies_test.dart
+++ b/test/list_package_dirs/includes_dev_dependencies_test.dart
@@ -10,16 +10,16 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('includes dev dependencies in the results', () async {
     await d
-        .dir("foo", [d.libDir("foo"), d.libPubspec("foo", "1.0.0")]).create();
+        .dir('foo', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dev_dependencies": {
-          "foo": {"path": path.join(d.sandbox, "foo")}
+        'name': 'myapp',
+        'dev_dependencies': {
+          'foo': {'path': path.join(d.sandbox, 'foo')}
         }
       })
     ]).create();
@@ -31,16 +31,16 @@
     // resolve. On Mac, "/tmp" is actually a symlink to "/private/tmp", so we
     // need to accomodate that.
     await runPub(args: [
-      "list-package-dirs",
-      "--format=json"
+      'list-package-dirs',
+      '--format=json'
     ], outputJson: {
-      "packages": {
-        "foo": path.join(d.sandbox, "foo", "lib"),
-        "myapp": canonicalize(path.join(d.sandbox, appPath, "lib"))
+      'packages': {
+        'foo': path.join(d.sandbox, 'foo', 'lib'),
+        'myapp': canonicalize(path.join(d.sandbox, appPath, 'lib'))
       },
-      "input_files": [
-        canonicalize(path.join(d.sandbox, appPath, "pubspec.lock")),
-        canonicalize(path.join(d.sandbox, appPath, "pubspec.yaml"))
+      'input_files': [
+        canonicalize(path.join(d.sandbox, appPath, 'pubspec.lock')),
+        canonicalize(path.join(d.sandbox, appPath, 'pubspec.yaml'))
       ]
     });
   });
diff --git a/test/list_package_dirs/lists_dependency_directories_test.dart b/test/list_package_dirs/lists_dependency_directories_test.dart
index 240175f..91c9de0 100644
--- a/test/list_package_dirs/lists_dependency_directories_test.dart
+++ b/test/list_package_dirs/lists_dependency_directories_test.dart
@@ -10,17 +10,17 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('prints the local paths to all packages in the lockfile', () async {
-    await servePackages((builder) => builder.serve("bar", "1.0.0"));
+    await servePackages((builder) => builder.serve('bar', '1.0.0'));
 
     await d
-        .dir("foo", [d.libDir("foo"), d.libPubspec("foo", "1.0.0")]).create();
+        .dir('foo', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": path.join(d.sandbox, "foo")},
-        "bar": "any"
+        'foo': {'path': path.join(d.sandbox, 'foo')},
+        'bar': 'any'
       })
     ]).create();
 
@@ -32,18 +32,18 @@
         // resolve. On Mac, "/tmp" is actually a symlink to "/private/tmp", so we
         // need to accomodate that.
         await runPub(args: [
-      "list-package-dirs",
-      "--format=json"
+      'list-package-dirs',
+      '--format=json'
     ], outputJson: {
-      "packages": {
-        "foo": path.join(d.sandbox, "foo", "lib"),
-        "bar": path.join(d.sandbox, cachePath, "hosted",
-            "localhost%58${globalServer.port}", "bar-1.0.0", "lib"),
-        "myapp": canonicalize(path.join(d.sandbox, appPath, "lib"))
+      'packages': {
+        'foo': path.join(d.sandbox, 'foo', 'lib'),
+        'bar': path.join(d.sandbox, cachePath, 'hosted',
+            'localhost%58${globalServer.port}', 'bar-1.0.0', 'lib'),
+        'myapp': canonicalize(path.join(d.sandbox, appPath, 'lib'))
       },
-      "input_files": [
-        canonicalize(path.join(d.sandbox, appPath, "pubspec.lock")),
-        canonicalize(path.join(d.sandbox, appPath, "pubspec.yaml"))
+      'input_files': [
+        canonicalize(path.join(d.sandbox, appPath, 'pubspec.lock')),
+        canonicalize(path.join(d.sandbox, appPath, 'pubspec.yaml'))
       ]
     });
   });
diff --git a/test/list_package_dirs/lockfile_error_test.dart b/test/list_package_dirs/lockfile_error_test.dart
index 74f7da5..ca566d3 100644
--- a/test/list_package_dirs/lockfile_error_test.dart
+++ b/test/list_package_dirs/lockfile_error_test.dart
@@ -11,17 +11,17 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
-  test("reports the lockfile path when there is an error in it", () async {
+void main() {
+  test('reports the lockfile path when there is an error in it', () async {
     await d.dir(appPath,
-        [d.appPubspec(), d.file("pubspec.lock", "some bad yaml")]).create();
+        [d.appPubspec(), d.file('pubspec.lock', 'some bad yaml')]).create();
 
     await runPub(args: [
-      "list-package-dirs",
-      "--format=json"
+      'list-package-dirs',
+      '--format=json'
     ], outputJson: {
-      "error": contains('The lockfile must be a YAML mapping.'),
-      "path": canonicalize(path.join(d.sandbox, appPath, "pubspec.lock"))
+      'error': contains('The lockfile must be a YAML mapping.'),
+      'path': canonicalize(path.join(d.sandbox, appPath, 'pubspec.lock'))
     }, exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/list_package_dirs/missing_pubspec_test.dart b/test/list_package_dirs/missing_pubspec_test.dart
index 384f003..5de6761 100644
--- a/test/list_package_dirs/missing_pubspec_test.dart
+++ b/test/list_package_dirs/missing_pubspec_test.dart
@@ -11,18 +11,18 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   // This is a regression test for #20065.
-  test("reports a missing pubspec error using JSON", () async {
+  test('reports a missing pubspec error using JSON', () async {
     await d.dir(appPath).create();
 
     await runPub(args: [
-      "list-package-dirs",
-      "--format=json"
+      'list-package-dirs',
+      '--format=json'
     ], outputJson: {
-      "error": 'Could not find a file named "pubspec.yaml" in "'
+      'error': 'Could not find a file named "pubspec.yaml" in "'
           '${canonicalize(path.join(d.sandbox, appPath))}".',
-      "path": canonicalize(path.join(d.sandbox, appPath, "pubspec.yaml"))
+      'path': canonicalize(path.join(d.sandbox, appPath, 'pubspec.yaml'))
     }, exitCode: exit_codes.NO_INPUT);
   });
 }
diff --git a/test/list_package_dirs/no_lockfile_test.dart b/test/list_package_dirs/no_lockfile_test.dart
index eee42b9..a7b1534 100644
--- a/test/list_package_dirs/no_lockfile_test.dart
+++ b/test/list_package_dirs/no_lockfile_test.dart
@@ -9,15 +9,15 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('with no lockfile, exits with error', () async {
     await d.dir(appPath, [d.appPubspec()]).create();
 
     await runPub(args: [
-      "list-package-dirs",
-      "--format=json"
+      'list-package-dirs',
+      '--format=json'
     ], outputJson: {
-      "error": 'Package "myapp" has no lockfile. Please run "pub get" first.'
+      'error': 'Package "myapp" has no lockfile. Please run "pub get" first.'
     }, exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/list_package_dirs/pubspec_error_test.dart b/test/list_package_dirs/pubspec_error_test.dart
index d12143c..3aff48b 100644
--- a/test/list_package_dirs/pubspec_error_test.dart
+++ b/test/list_package_dirs/pubspec_error_test.dart
@@ -11,16 +11,16 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
-  test("reports the pubspec path when there is an error in it", () async {
-    await d.dir(appPath, [d.file("pubspec.yaml", "some bad yaml")]).create();
+void main() {
+  test('reports the pubspec path when there is an error in it', () async {
+    await d.dir(appPath, [d.file('pubspec.yaml', 'some bad yaml')]).create();
 
     await runPub(args: [
-      "list-package-dirs",
-      "--format=json"
+      'list-package-dirs',
+      '--format=json'
     ], outputJson: {
-      "error": contains('Error on line 1'),
-      "path": canonicalize(path.join(d.sandbox, appPath, "pubspec.yaml"))
+      'error': contains('Error on line 1'),
+      'path': canonicalize(path.join(d.sandbox, appPath, 'pubspec.yaml'))
     }, exitCode: exit_codes.DATA);
   });
 }
diff --git a/test/lock_file_test.dart b/test/lock_file_test.dart
index a883bd8..fa015a6 100644
--- a/test/lock_file_test.dart
+++ b/test/lock_file_test.dart
@@ -12,25 +12,31 @@
 import 'package:yaml/yaml.dart';
 
 class FakeSource extends Source {
+  @override
   final String name = 'fake';
 
+  @override
   BoundSource bind(SystemCache cache) =>
-      throw UnsupportedError("Cannot download fake packages.");
+      throw UnsupportedError('Cannot download fake packages.');
 
+  @override
   PackageRef parseRef(String name, description, {String containingPath}) {
     if (!description.endsWith(' desc')) throw FormatException('Bad');
     return PackageRef(name, this, description);
   }
 
+  @override
   PackageId parseId(String name, Version version, description,
       {String containingPath}) {
     if (!description.endsWith(' desc')) throw FormatException('Bad');
     return PackageId(name, this, version, description);
   }
 
+  @override
   bool descriptionsEqual(description1, description2) =>
       description1 == description2;
 
+  @override
   int hashDescription(description) => description.hashCode;
 
   String packageName(String description) {
@@ -39,7 +45,7 @@
   }
 }
 
-main() {
+void main() {
   var sources = SourceRegistry();
   var fakeSource = FakeSource();
   sources.register(fakeSource);
@@ -84,7 +90,7 @@
         expect(foo.description, equals('foo desc'));
       });
 
-      test("allows an unknown source", () {
+      test('allows an unknown source', () {
         var lockFile = LockFile.parse('''
 packages:
   foo:
@@ -96,14 +102,14 @@
         expect(foo.source, equals(sources['bad']));
       });
 
-      test("allows an empty dependency map", () {
+      test('allows an empty dependency map', () {
         var lockFile = LockFile.parse('''
 packages:
 ''', sources);
         expect(lockFile.packages, isEmpty);
       });
 
-      test("allows an old-style SDK constraint", () {
+      test('allows an old-style SDK constraint', () {
         var lockFile = LockFile.parse('sdk: ">=1.2.3 <4.0.0"', sources);
         expect(lockFile.sdkConstraints,
             containsPair('dart', VersionConstraint.parse('>=1.2.3 <4.0.0')));
@@ -111,7 +117,7 @@
         expect(lockFile.sdkConstraints, isNot(contains('fuchsia')));
       });
 
-      test("allows new-style SDK constraints", () {
+      test('allows new-style SDK constraints', () {
         var lockFile = LockFile.parse('''
 sdks:
   dart: ">=1.2.3 <4.0.0"
@@ -126,7 +132,7 @@
             containsPair('fuchsia', VersionConstraint.parse('^5.6.7')));
       });
 
-      test("throws if the top level is not a map", () {
+      test('throws if the top level is not a map', () {
         expect(() {
           LockFile.parse('''
 not a map
@@ -142,7 +148,7 @@
         }, throwsFormatException);
       });
 
-      test("throws if the version is missing", () {
+      test('throws if the version is missing', () {
         expect(() {
           LockFile.parse('''
 packages:
@@ -153,7 +159,7 @@
         }, throwsFormatException);
       });
 
-      test("throws if the version is invalid", () {
+      test('throws if the version is invalid', () {
         expect(() {
           LockFile.parse('''
 packages:
@@ -165,7 +171,7 @@
         }, throwsFormatException);
       });
 
-      test("throws if the source is missing", () {
+      test('throws if the source is missing', () {
         expect(() {
           LockFile.parse('''
 packages:
@@ -176,7 +182,7 @@
         }, throwsFormatException);
       });
 
-      test("throws if the description is missing", () {
+      test('throws if the description is missing', () {
         expect(() {
           LockFile.parse('''
 packages:
@@ -187,7 +193,7 @@
         }, throwsFormatException);
       });
 
-      test("throws if the description is invalid", () {
+      test('throws if the description is invalid', () {
         expect(() {
           LockFile.parse('''
 packages:
@@ -204,7 +210,7 @@
             () => LockFile.parse('sdk: 1.0', sources), throwsFormatException);
       });
 
-      test("throws if the old-style SDK constraint is invalid", () {
+      test('throws if the old-style SDK constraint is invalid', () {
         expect(
             () => LockFile.parse('sdk: oops', sources), throwsFormatException);
       });
@@ -222,7 +228,7 @@
         }, throwsFormatException);
       });
 
-      test("throws if an sdk constraint is invalid", () {
+      test('throws if an sdk constraint is invalid', () {
         expect(() => LockFile.parse('sdks: {dart: oops}', sources),
             throwsFormatException);
         expect(() {
@@ -230,7 +236,7 @@
         }, throwsFormatException);
       });
 
-      test("ignores extra stuff in file", () {
+      test('ignores extra stuff in file', () {
         LockFile.parse('''
 extra:
   some: stuff
diff --git a/test/must_pub_get_test.dart b/test/must_pub_get_test.dart
index 1d0505b..782a0d5 100644
--- a/test/must_pub_get_test.dart
+++ b/test/must_pub_get_test.dart
@@ -14,26 +14,26 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   setUp(() async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
-      builder.serve("foo", "2.0.0");
+      builder.serve('foo', '1.0.0');
+      builder.serve('foo', '2.0.0');
     });
 
     await d.dir(appPath, [
       d.appPubspec(),
-      d.dir("web", []),
-      d.dir("bin", [d.file("script.dart", "main() => print('hello!');")])
+      d.dir('web', []),
+      d.dir('bin', [d.file('script.dart', "main() => print('hello!');")])
     ]).create();
 
     await pubGet();
   });
 
-  group("requires the user to run pub get first if", () {
+  group('requires the user to run pub get first if', () {
     group("there's no lockfile", () {
       setUp(() {
-        deleteEntry(p.join(d.sandbox, "myapp/pubspec.lock"));
+        deleteEntry(p.join(d.sandbox, 'myapp/pubspec.lock'));
       });
 
       _requiresPubGet(
@@ -42,7 +42,7 @@
 
     group("there's no .packages", () {
       setUp(() {
-        deleteEntry(p.join(d.sandbox, "myapp/.packages"));
+        deleteEntry(p.join(d.sandbox, 'myapp/.packages'));
       });
 
       _requiresPubGet('No .packages file found, please run "pub get" first.');
@@ -50,115 +50,115 @@
 
     group("there's no package_config.json", () {
       setUp(() {
-        deleteEntry(p.join(d.sandbox, "myapp/.dart_tool/package_config.json"));
+        deleteEntry(p.join(d.sandbox, 'myapp/.dart_tool/package_config.json'));
       });
 
       _requiresPubGet(
           'No .dart_tool/package_config.json file found, please run "pub get" first.');
     });
 
-    group("the pubspec has a new dependency", () {
+    group('the pubspec has a new dependency', () {
       setUp(() async {
-        await d.dir("foo", [d.libPubspec("foo", "1.0.0")]).create();
+        await d.dir('foo', [d.libPubspec('foo', '1.0.0')]).create();
 
         await d.dir(appPath, [
           d.appPubspec({
-            "foo": {"path": "../foo"}
+            'foo': {'path': '../foo'}
           })
         ]).create();
 
         // Ensure that the pubspec looks newer than the lockfile.
-        await _touch("pubspec.yaml");
+        await _touch('pubspec.yaml');
       });
 
       _requiresPubGet('The pubspec.yaml file has changed since the '
           'pubspec.lock file was generated, please run "pub get" again.');
     });
 
-    group("the lockfile has a dependency from the wrong source", () {
+    group('the lockfile has a dependency from the wrong source', () {
       setUp(() async {
         await d.dir(appPath, [
-          d.appPubspec({"foo": "1.0.0"})
+          d.appPubspec({'foo': '1.0.0'})
         ]).create();
 
         await pubGet();
 
-        await createLockFile(appPath, sandbox: ["foo"]);
+        await createLockFile(appPath, sandbox: ['foo']);
 
         // Ensure that the pubspec looks newer than the lockfile.
-        await _touch("pubspec.yaml");
+        await _touch('pubspec.yaml');
       });
 
       _requiresPubGet('The pubspec.yaml file has changed since the '
           'pubspec.lock file was generated, please run "pub get" again.');
     });
 
-    group("the lockfile has a dependency from an unknown source", () {
+    group('the lockfile has a dependency from an unknown source', () {
       setUp(() async {
         await d.dir(appPath, [
-          d.appPubspec({"foo": "1.0.0"})
+          d.appPubspec({'foo': '1.0.0'})
         ]).create();
 
         await pubGet();
 
         await d.dir(appPath, [
           d.file(
-              "pubspec.lock",
+              'pubspec.lock',
               yaml({
-                "packages": {
-                  "foo": {
-                    "description": "foo",
-                    "version": "1.0.0",
-                    "source": "sdk"
+                'packages': {
+                  'foo': {
+                    'description': 'foo',
+                    'version': '1.0.0',
+                    'source': 'sdk'
                   }
                 }
               }))
         ]).create();
 
         // Ensure that the pubspec looks newer than the lockfile.
-        await _touch("pubspec.yaml");
+        await _touch('pubspec.yaml');
       });
 
       _requiresPubGet('The pubspec.yaml file has changed since the '
           'pubspec.lock file was generated, please run "pub get" again.');
     });
 
-    group("the lockfile has a dependency with the wrong description", () {
+    group('the lockfile has a dependency with the wrong description', () {
       setUp(() async {
-        await d.dir("bar", [d.libPubspec("foo", "1.0.0")]).create();
+        await d.dir('bar', [d.libPubspec('foo', '1.0.0')]).create();
 
         await d.dir(appPath, [
           d.appPubspec({
-            "foo": {"path": "../bar"}
+            'foo': {'path': '../bar'}
           })
         ]).create();
 
         await pubGet();
 
-        await createLockFile(appPath, sandbox: ["foo"]);
+        await createLockFile(appPath, sandbox: ['foo']);
 
         // Ensure that the pubspec looks newer than the lockfile.
-        await _touch("pubspec.yaml");
+        await _touch('pubspec.yaml');
       });
 
       _requiresPubGet('The pubspec.yaml file has changed since the '
           'pubspec.lock file was generated, please run "pub get" again.');
     });
 
-    group("the pubspec has an incompatible version of a dependency", () {
+    group('the pubspec has an incompatible version of a dependency', () {
       setUp(() async {
         await d.dir(appPath, [
-          d.appPubspec({"foo": "1.0.0"})
+          d.appPubspec({'foo': '1.0.0'})
         ]).create();
 
         await pubGet();
 
         await d.dir(appPath, [
-          d.appPubspec({"foo": "2.0.0"})
+          d.appPubspec({'foo': '2.0.0'})
         ]).create();
 
         // Ensure that the pubspec looks newer than the lockfile.
-        await _touch("pubspec.yaml");
+        await _touch('pubspec.yaml');
       });
 
       _requiresPubGet('The pubspec.yaml file has changed since the '
@@ -166,11 +166,11 @@
     });
 
     group(
-        "the lockfile is pointing to an unavailable package with a newer "
-        "pubspec", () {
+        'the lockfile is pointing to an unavailable package with a newer '
+        'pubspec', () {
       setUp(() async {
         await d.dir(appPath, [
-          d.appPubspec({"foo": "1.0.0"})
+          d.appPubspec({'foo': '1.0.0'})
         ]).create();
 
         await pubGet();
@@ -178,7 +178,7 @@
         deleteEntry(p.join(d.sandbox, cachePath));
 
         // Ensure that the pubspec looks newer than the lockfile.
-        await _touch("pubspec.yaml");
+        await _touch('pubspec.yaml');
       });
 
       _requiresPubGet('The pubspec.yaml file has changed since the '
@@ -186,11 +186,11 @@
     });
 
     group(
-        "the lockfile is pointing to an unavailable package with an older "
-        ".packages", () {
+        'the lockfile is pointing to an unavailable package with an older '
+        '.packages', () {
       setUp(() async {
         await d.dir(appPath, [
-          d.appPubspec({"foo": "1.0.0"})
+          d.appPubspec({'foo': '1.0.0'})
         ]).create();
 
         await pubGet();
@@ -198,7 +198,7 @@
         deleteEntry(p.join(d.sandbox, cachePath));
 
         // Ensure that the lockfile looks newer than the .packages file.
-        await _touch("pubspec.lock");
+        await _touch('pubspec.lock');
       });
 
       _requiresPubGet('The pubspec.lock file has changed since the .packages '
@@ -207,11 +207,11 @@
 
     group("the lockfile has a package that the .packages file doesn't", () {
       setUp(() async {
-        await d.dir("foo", [d.libPubspec("foo", "1.0.0")]).create();
+        await d.dir('foo', [d.libPubspec('foo', '1.0.0')]).create();
 
         await d.dir(appPath, [
           d.appPubspec({
-            "foo": {"path": "../foo"}
+            'foo': {'path': '../foo'}
           })
         ]).create();
 
@@ -220,69 +220,69 @@
         await createPackagesFile(appPath);
 
         // Ensure that the pubspec looks newer than the lockfile.
-        await _touch("pubspec.lock");
+        await _touch('pubspec.lock');
       });
 
       _requiresPubGet('The pubspec.lock file has changed since the .packages '
           'file was generated, please run "pub get" again.');
     });
 
-    group("the .packages file has a package with a non-file URI", () {
+    group('the .packages file has a package with a non-file URI', () {
       setUp(() async {
-        await d.dir("foo", [d.libPubspec("foo", "1.0.0")]).create();
+        await d.dir('foo', [d.libPubspec('foo', '1.0.0')]).create();
 
         await d.dir(appPath, [
           d.appPubspec({
-            "foo": {"path": "../foo"}
+            'foo': {'path': '../foo'}
           })
         ]).create();
 
         await pubGet();
 
         await d.dir(appPath, [
-          d.file(".packages", """
+          d.file('.packages', '''
 myapp:lib
 foo:http://example.com/
-""")
+''')
         ]).create();
 
         // Ensure that the pubspec looks newer than the lockfile.
-        await _touch("pubspec.lock");
+        await _touch('pubspec.lock');
       });
 
       _requiresPubGet('The pubspec.lock file has changed since the .packages '
           'file was generated, please run "pub get" again.');
     });
 
-    group("the .packages file points to the wrong place", () {
+    group('the .packages file points to the wrong place', () {
       setUp(() async {
-        await d.dir("bar", [d.libPubspec("foo", "1.0.0")]).create();
+        await d.dir('bar', [d.libPubspec('foo', '1.0.0')]).create();
 
         await d.dir(appPath, [
           d.appPubspec({
-            "foo": {"path": "../bar"}
+            'foo': {'path': '../bar'}
           })
         ]).create();
 
         await pubGet();
 
-        await createPackagesFile(appPath, sandbox: ["foo"]);
+        await createPackagesFile(appPath, sandbox: ['foo']);
 
         // Ensure that the pubspec looks newer than the lockfile.
-        await _touch("pubspec.lock");
+        await _touch('pubspec.lock');
       });
 
       _requiresPubGet('The pubspec.lock file has changed since the .packages '
           'file was generated, please run "pub get" again.');
     });
 
-    group("the package_config.json file points to the wrong place", () {
+    group('the package_config.json file points to the wrong place', () {
       setUp(() async {
-        await d.dir("bar", [d.libPubspec("foo", "1.0.0")]).create();
+        await d.dir('bar', [d.libPubspec('foo', '1.0.0')]).create();
 
         await d.dir(appPath, [
           d.appPubspec({
-            "foo": {"path": "../bar"}
+            'foo': {'path': '../bar'}
           })
         ]).create();
 
@@ -302,7 +302,7 @@
         ]).create();
 
         // Ensure that the pubspec looks newer than the lockfile.
-        await _touch("pubspec.lock");
+        await _touch('pubspec.lock');
       });
 
       _requiresPubGet('The pubspec.lock file has changed since the '
@@ -315,70 +315,70 @@
         // Avoid using a path dependency because it triggers the full validation
         // logic. We want to be sure SDK-validation works without that logic.
         globalPackageServer.add((builder) {
-          builder.serve("foo", "3.0.0", pubspec: {
-            "environment": {"sdk": ">=1.0.0 <2.0.0"}
+          builder.serve('foo', '3.0.0', pubspec: {
+            'environment': {'sdk': '>=1.0.0 <2.0.0'}
           });
         });
 
         await d.dir(appPath, [
-          d.appPubspec({"foo": "3.0.0"})
+          d.appPubspec({'foo': '3.0.0'})
         ]).create();
 
-        await pubGet(environment: {"_PUB_TEST_SDK_VERSION": "1.2.3+4"});
+        await pubGet(environment: {'_PUB_TEST_SDK_VERSION': '1.2.3+4'});
       });
 
       _requiresPubGet("Dart 0.1.2+3 is incompatible with your dependencies' "
-          "SDK constraints. Please run \"pub get\" again.");
+          'SDK constraints. Please run \"pub get\" again.');
     });
 
     test(
         "the lock file's Flutter SDK constraint doesn't match the "
-        "current Flutter SDK", () async {
+        'current Flutter SDK', () async {
       // Avoid using a path dependency because it triggers the full validation
       // logic. We want to be sure SDK-validation works without that logic.
       globalPackageServer.add((builder) {
-        builder.serve("foo", "3.0.0", pubspec: {
-          "environment": {"flutter": ">=1.0.0 <2.0.0"}
+        builder.serve('foo', '3.0.0', pubspec: {
+          'environment': {'flutter': '>=1.0.0 <2.0.0'}
         });
       });
 
       await d.dir('flutter', [d.file('version', '1.2.3')]).create();
 
       await d.dir(appPath, [
-        d.appPubspec({"foo": "3.0.0"})
+        d.appPubspec({'foo': '3.0.0'})
       ]).create();
 
-      await pubGet(environment: {"FLUTTER_ROOT": p.join(d.sandbox, 'flutter')});
+      await pubGet(environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')});
 
       await d.dir('flutter', [d.file('version', '2.4.6')]).create();
 
       // Run pub manually here because otherwise we don't have access to
       // d.sandbox.
       await runPub(
-          args: ["run", "script"],
-          environment: {"FLUTTER_ROOT": p.join(d.sandbox, 'flutter')},
+          args: ['run', 'script'],
+          environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')},
           error: "Flutter 2.4.6 is incompatible with your dependencies' SDK "
-              "constraints. Please run \"pub get\" again.",
+              'constraints. Please run "pub get" again.',
           exitCode: exit_codes.DATA);
     });
 
     group("a path dependency's dependency doesn't match the lockfile", () {
       setUp(() async {
-        await d.dir("bar", [
-          d.libPubspec("bar", "1.0.0", deps: {"foo": "1.0.0"})
+        await d.dir('bar', [
+          d.libPubspec('bar', '1.0.0', deps: {'foo': '1.0.0'})
         ]).create();
 
         await d.dir(appPath, [
           d.appPubspec({
-            "bar": {"path": "../bar"}
+            'bar': {'path': '../bar'}
           })
         ]).create();
 
         await pubGet();
 
         // Update bar's pubspec without touching the app's.
-        await d.dir("bar", [
-          d.libPubspec("bar", "1.0.0", deps: {"foo": "2.0.0"})
+        await d.dir('bar', [
+          d.libPubspec('bar', '1.0.0', deps: {'foo': '2.0.0'})
         ]).create();
       });
 
@@ -391,11 +391,11 @@
         "a path dependency's language version doesn't match the package_config.json",
         () {
       setUp(() async {
-        await d.dir("bar", [
+        await d.dir('bar', [
           d.libPubspec(
-            "bar",
-            "1.0.0",
-            deps: {"foo": "1.0.0"},
+            'bar',
+            '1.0.0',
+            deps: {'foo': '1.0.0'},
             // Creates language version requirement 0.0
             sdk: '>= 0.0.1 <=0.9.9', // tests runs with '0.1.2+3'
           ),
@@ -403,18 +403,18 @@
 
         await d.dir(appPath, [
           d.appPubspec({
-            "bar": {"path": "../bar"}
+            'bar': {'path': '../bar'}
           })
         ]).create();
 
         await pubGet();
 
         // Update bar's pubspec without touching the app's.
-        await d.dir("bar", [
+        await d.dir('bar', [
           d.libPubspec(
-            "bar",
-            "1.0.0",
-            deps: {"foo": "1.0.0"},
+            'bar',
+            '1.0.0',
+            deps: {'foo': '1.0.0'},
             // Creates language version requirement 0.1
             sdk: '>= 0.1.0 <=0.9.9', // tests runs with '0.1.2+3'
           ),
@@ -429,18 +429,18 @@
 
   group("doesn't require the user to run pub get first if", () {
     group(
-        "the pubspec is older than the lockfile which is older than the "
-        "packages file, even if the contents are wrong", () {
+        'the pubspec is older than the lockfile which is older than the '
+        'packages file, even if the contents are wrong', () {
       setUp(() async {
         await d.dir(appPath, [
-          d.appPubspec({"foo": "1.0.0"})
+          d.appPubspec({'foo': '1.0.0'})
         ]).create();
         // Ensure we get a new mtime (mtime is only reported with 1s precision)
         await _touch('pubspec.yaml');
 
-        await _touch("pubspec.lock");
-        await _touch(".packages");
-        await _touch(".dart_tool/package_config.json");
+        await _touch('pubspec.lock');
+        await _touch('.packages');
+        await _touch('.dart_tool/package_config.json');
       });
 
       _runsSuccessfully(runDeps: false);
@@ -449,33 +449,33 @@
     group("the pubspec is newer than the lockfile, but they're up-to-date", () {
       setUp(() async {
         await d.dir(appPath, [
-          d.appPubspec({"foo": "1.0.0"})
+          d.appPubspec({'foo': '1.0.0'})
         ]).create();
 
         await pubGet();
 
-        await _touch("pubspec.yaml");
+        await _touch('pubspec.yaml');
       });
 
       _runsSuccessfully();
     });
 
     // Regression test for #1416
-    group("a path dependency has a dependency on the root package", () {
+    group('a path dependency has a dependency on the root package', () {
       setUp(() async {
-        await d.dir("foo", [
-          d.libPubspec("foo", "1.0.0", deps: {"myapp": "any"})
+        await d.dir('foo', [
+          d.libPubspec('foo', '1.0.0', deps: {'myapp': 'any'})
         ]).create();
 
         await d.dir(appPath, [
           d.appPubspec({
-            "foo": {"path": "../foo"}
+            'foo': {'path': '../foo'}
           })
         ]).create();
 
         await pubGet();
 
-        await _touch("pubspec.lock");
+        await _touch('pubspec.lock');
       });
 
       _runsSuccessfully();
@@ -486,12 +486,12 @@
         () {
       setUp(() async {
         await d.dir(appPath, [
-          d.appPubspec({"foo": "1.0.0"})
+          d.appPubspec({'foo': '1.0.0'})
         ]).create();
 
         await pubGet();
 
-        await _touch("pubspec.lock");
+        await _touch('pubspec.lock');
       });
 
       _runsSuccessfully();
@@ -500,49 +500,49 @@
     group("an overridden dependency's SDK constraint is unmatched", () {
       setUp(() async {
         globalPackageServer.add((builder) {
-          builder.serve("bar", "1.0.0", pubspec: {
-            "environment": {"sdk": "0.0.0-fake"}
+          builder.serve('bar', '1.0.0', pubspec: {
+            'environment': {'sdk': '0.0.0-fake'}
           });
         });
 
         await d.dir(appPath, [
           d.pubspec({
-            "name": "myapp",
-            "dependency_overrides": {"bar": "1.0.0"}
+            'name': 'myapp',
+            'dependency_overrides': {'bar': '1.0.0'}
           })
         ]).create();
 
         await pubGet();
 
-        await _touch("pubspec.lock");
+        await _touch('pubspec.lock');
       });
 
       _runsSuccessfully();
     });
 
-    test("the lock file has a Flutter SDK but Flutter is unavailable",
+    test('the lock file has a Flutter SDK but Flutter is unavailable',
         () async {
       // Avoid using a path dependency because it triggers the full validation
       // logic. We want to be sure SDK-validation works without that logic.
       globalPackageServer.add((builder) {
-        builder.serve("foo", "3.0.0", pubspec: {
-          "environment": {"flutter": ">=1.0.0 <2.0.0"}
+        builder.serve('foo', '3.0.0', pubspec: {
+          'environment': {'flutter': '>=1.0.0 <2.0.0'}
         });
       });
 
       await d.dir('flutter', [d.file('version', '1.2.3')]).create();
 
       await d.dir(appPath, [
-        d.appPubspec({"foo": "3.0.0"})
+        d.appPubspec({'foo': '3.0.0'})
       ]).create();
 
-      await pubGet(environment: {"FLUTTER_ROOT": p.join(d.sandbox, 'flutter')});
+      await pubGet(environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')});
 
       await d.dir('flutter', [d.file('version', '2.4.6')]).create();
 
       // Run pub manually here because otherwise we don't have access to
       // d.sandbox.
-      await runPub(args: ["run", "bin/script.dart"]);
+      await runPub(args: ['run', 'bin/script.dart']);
     });
   });
 }
@@ -550,10 +550,10 @@
 /// Runs every command that care about the world being up-to-date, and asserts
 /// that it prints [message] as part of its error.
 void _requiresPubGet(String message) {
-  for (var command in ["run", "deps"]) {
-    test("for pub $command", () {
+  for (var command in ['run', 'deps']) {
+    test('for pub $command', () {
       var args = [command];
-      if (command == "run") args.add("script");
+      if (command == 'run') args.add('script');
 
       return runPub(
           args: args, error: contains(message), exitCode: exit_codes.DATA);
@@ -567,26 +567,26 @@
 /// sometimes not desirable, since it uses slightly stronger checks for pubspec
 /// and lockfile consistency.
 void _runsSuccessfully({bool runDeps = true}) {
-  var commands = ["run"];
-  if (runDeps) commands.add("deps");
+  var commands = ['run'];
+  if (runDeps) commands.add('deps');
 
   for (var command in commands) {
-    test("for pub $command", () async {
+    test('for pub $command', () async {
       var args = [command];
-      if (command == "run") args.add("bin/script.dart");
+      if (command == 'run') args.add('bin/script.dart');
 
       await runPub(args: args);
 
       // If pub determines that everything is up-to-date, it should set the
       // mtimes to indicate that.
       var pubspecModified =
-          File(p.join(d.sandbox, "myapp/pubspec.yaml")).lastModifiedSync();
+          File(p.join(d.sandbox, 'myapp/pubspec.yaml')).lastModifiedSync();
       var lockFileModified =
-          File(p.join(d.sandbox, "myapp/pubspec.lock")).lastModifiedSync();
+          File(p.join(d.sandbox, 'myapp/pubspec.lock')).lastModifiedSync();
       var packagesModified =
-          File(p.join(d.sandbox, "myapp/.packages")).lastModifiedSync();
+          File(p.join(d.sandbox, 'myapp/.packages')).lastModifiedSync();
       var packageConfigModified =
-          File(p.join(d.sandbox, "myapp/.dart_tool/package_config.json"))
+          File(p.join(d.sandbox, 'myapp/.dart_tool/package_config.json'))
               .lastModifiedSync();
 
       expect(!pubspecModified.isAfter(lockFileModified), isTrue);
@@ -602,6 +602,6 @@
   // 1s seems to be the finest granularity that dart:io reports.
   await Future.delayed(Duration(seconds: 1));
 
-  path = p.join(d.sandbox, "myapp", path);
+  path = p.join(d.sandbox, 'myapp', path);
   touch(path);
 }
diff --git a/test/no_packages_dir_test.dart b/test/no_packages_dir_test.dart
index 0f72a51..3a88bc5 100644
--- a/test/no_packages_dir_test.dart
+++ b/test/no_packages_dir_test.dart
@@ -7,7 +7,7 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test('does not touch directories named "packages"', () async {
       await d.dir(appPath, [
diff --git a/test/oauth2/logout_test.dart b/test/oauth2/logout_test.dart
index ee9ead3..4489f79 100644
--- a/test/oauth2/logout_test.dart
+++ b/test/oauth2/logout_test.dart
@@ -8,7 +8,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('with an existing credentials.json, deletes it.', () async {
     var server = await ShelfTestServer.create();
     await d
diff --git a/test/oauth2/utils.dart b/test/oauth2/utils.dart
index 4079861..464e2fa 100644
--- a/test/oauth2/utils.dart
+++ b/test/oauth2/utils.dart
@@ -14,7 +14,7 @@
 import 'package:pub/src/utils.dart';
 
 Future authorizePub(TestProcess pub, ShelfTestServer server,
-    [String accessToken = "access token"]) async {
+    [String accessToken = 'access token']) async {
   await expectLater(
       pub.stdout,
       emits('Pub needs your authorization to upload packages on your '
@@ -45,7 +45,7 @@
     expect(body, matches(RegExp(r'(^|&)code=access\+code(&|$)')));
 
     return shelf.Response.ok(
-        jsonEncode({"access_token": accessToken, "token_type": "bearer"}),
+        jsonEncode({'access_token': accessToken, 'token_type': 'bearer'}),
         headers: {'content-type': 'application/json'});
   });
 }
@@ -55,7 +55,7 @@
 Uri _addQueryParameters(Uri url, Map<String, String> parameters) {
   var queryMap = queryToMap(url.query);
   queryMap.addAll(parameters);
-  return url.resolve("?${_mapToQuery(queryMap)}");
+  return url.resolve('?${_mapToQuery(queryMap)}');
 }
 
 /// Convert a [Map] from parameter names to values to a URL query string.
@@ -70,6 +70,6 @@
   });
   return pairs.map((pair) {
     if (pair[1] == null) return pair[0];
-    return "${pair[0]}=${pair[1]}";
-  }).join("&");
+    return '${pair[0]}=${pair[1]}';
+  }).join('&');
 }
diff --git a/test/oauth2/with_a_malformed_credentials_authenticates_again_test.dart b/test/oauth2/with_a_malformed_credentials_authenticates_again_test.dart
index ef93ac5..838f89f 100644
--- a/test/oauth2/with_a_malformed_credentials_authenticates_again_test.dart
+++ b/test/oauth2/with_a_malformed_credentials_authenticates_again_test.dart
@@ -10,7 +10,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   test(
       'with a malformed credentials.json, authenticates again and '
       'saves credentials.json', () async {
@@ -21,7 +21,7 @@
 
     var pub = await startPublish(server);
     await confirmPublish(pub);
-    await authorizePub(pub, server, "new access token");
+    await authorizePub(pub, server, 'new access token');
 
     server.handler.expect('GET', '/api/packages/versions/new', (request) {
       expect(request.headers,
diff --git a/test/oauth2/with_a_pre_existing_credentials_does_not_authenticate_test.dart b/test/oauth2/with_a_pre_existing_credentials_does_not_authenticate_test.dart
index 820f441..40ce91e 100644
--- a/test/oauth2/with_a_pre_existing_credentials_does_not_authenticate_test.dart
+++ b/test/oauth2/with_a_pre_existing_credentials_does_not_authenticate_test.dart
@@ -9,7 +9,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('with a pre-existing credentials.json does not authenticate', () async {
     await d.validPackage.create();
 
diff --git a/test/oauth2/with_a_server_rejected_refresh_token_authenticates_again_test.dart b/test/oauth2/with_a_server_rejected_refresh_token_authenticates_again_test.dart
index 3c1c09a..a57bcf2 100644
--- a/test/oauth2/with_a_server_rejected_refresh_token_authenticates_again_test.dart
+++ b/test/oauth2/with_a_server_rejected_refresh_token_authenticates_again_test.dart
@@ -13,7 +13,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   // Regression test for issue 8849.
   test(
       'with a server-rejected refresh token, authenticates again and '
@@ -32,7 +32,7 @@
     server.handler.expect('POST', '/token', (request) {
       return request.read().drain().then((_) {
         return shelf.Response(400,
-            body: jsonEncode({"error": "invalid_request"}),
+            body: jsonEncode({'error': 'invalid_request'}),
             headers: {'content-type': 'application/json'});
       });
     });
diff --git a/test/oauth2/with_an_expired_credentials_refreshes_and_saves_test.dart b/test/oauth2/with_an_expired_credentials_refreshes_and_saves_test.dart
index b4d7943..3290846 100644
--- a/test/oauth2/with_an_expired_credentials_refreshes_and_saves_test.dart
+++ b/test/oauth2/with_an_expired_credentials_refreshes_and_saves_test.dart
@@ -11,7 +11,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test(
       'with an expired credentials.json, refreshes and saves the '
       'refreshed access token to credentials.json', () async {
@@ -34,7 +34,7 @@
 
         return shelf.Response.ok(
             jsonEncode(
-                {"access_token": "new access token", "token_type": "bearer"}),
+                {'access_token': 'new access token', 'token_type': 'bearer'}),
             headers: {'content-type': 'application/json'});
       });
     });
diff --git a/test/oauth2/with_an_expired_credentials_without_a_refresh_token_authenticates_again_test.dart b/test/oauth2/with_an_expired_credentials_without_a_refresh_token_authenticates_again_test.dart
index ccd6fa8..75a37d4 100644
--- a/test/oauth2/with_an_expired_credentials_without_a_refresh_token_authenticates_again_test.dart
+++ b/test/oauth2/with_an_expired_credentials_without_a_refresh_token_authenticates_again_test.dart
@@ -10,7 +10,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   test(
       'with an expired credentials.json without a refresh token, '
       'authenticates again and saves credentials.json', () async {
@@ -29,7 +29,7 @@
         pub.stderr,
         emits("Pub's authorization to upload packages has expired and "
             "can't be automatically refreshed."));
-    await authorizePub(pub, server, "new access token");
+    await authorizePub(pub, server, 'new access token');
 
     server.handler.expect('GET', '/api/packages/versions/new', (request) {
       expect(request.headers,
diff --git a/test/oauth2/with_no_credentials_authenticates_and_saves_credentials_test.dart b/test/oauth2/with_no_credentials_authenticates_and_saves_credentials_test.dart
index c97350c..b781f02 100644
--- a/test/oauth2/with_no_credentials_authenticates_and_saves_credentials_test.dart
+++ b/test/oauth2/with_no_credentials_authenticates_and_saves_credentials_test.dart
@@ -10,7 +10,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   test(
       'with no credentials.json, authenticates and saves '
       'credentials.json', () async {
diff --git a/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart b/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart
index bb75e6b..20ca653 100644
--- a/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart
+++ b/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart
@@ -11,7 +11,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test(
       'with server-rejected credentials, authenticates again and saves '
       'credentials.json', () async {
diff --git a/test/package_config_file_test.dart b/test/package_config_file_test.dart
index 6e935d4..b579c21 100644
--- a/test/package_config_file_test.dart
+++ b/test/package_config_file_test.dart
@@ -9,19 +9,19 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test('package_config.json file is created', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.2.3",
-            deps: {'baz': '2.2.2'}, contents: [d.dir("lib", [])]);
-        builder.serve("bar", "3.2.1", contents: [d.dir("lib", [])]);
-        builder.serve("baz", "2.2.2",
-            deps: {"bar": "3.2.1"}, contents: [d.dir("lib", [])]);
+        builder.serve('foo', '1.2.3',
+            deps: {'baz': '2.2.2'}, contents: [d.dir('lib', [])]);
+        builder.serve('bar', '3.2.1', contents: [d.dir('lib', [])]);
+        builder.serve('baz', '2.2.2',
+            deps: {'bar': '3.2.1'}, contents: [d.dir('lib', [])]);
       });
 
       await d.dir(appPath, [
-        d.appPubspec({"foo": "1.2.3"}),
+        d.appPubspec({'foo': '1.2.3'}),
         d.dir('lib')
       ]).create();
 
@@ -51,15 +51,15 @@
 
     test('package_config.json file is overwritten', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.2.3",
-            deps: {'baz': '2.2.2'}, contents: [d.dir("lib", [])]);
-        builder.serve("bar", "3.2.1", contents: [d.dir("lib", [])]);
-        builder.serve("baz", "2.2.2",
-            deps: {"bar": "3.2.1"}, contents: [d.dir("lib", [])]);
+        builder.serve('foo', '1.2.3',
+            deps: {'baz': '2.2.2'}, contents: [d.dir('lib', [])]);
+        builder.serve('bar', '3.2.1', contents: [d.dir('lib', [])]);
+        builder.serve('baz', '2.2.2',
+            deps: {'bar': '3.2.1'}, contents: [d.dir('lib', [])]);
       });
 
       await d.dir(appPath, [
-        d.appPubspec({"foo": "1.2.3"}),
+        d.appPubspec({'foo': '1.2.3'}),
         d.dir('lib')
       ]).create();
 
@@ -100,7 +100,7 @@
 
     test('package_config.json file is not created if pub fails', () async {
       await d.dir(appPath, [
-        d.appPubspec({"foo": "1.2.3"}),
+        d.appPubspec({'foo': '1.2.3'}),
         d.dir('lib')
       ]).create();
 
@@ -119,24 +119,24 @@
         '.dart_tool/package_config.json file has relative path to path dependency',
         () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.2.3",
-            deps: {'baz': 'any'}, contents: [d.dir("lib", [])]);
-        builder.serve("baz", "9.9.9", deps: {}, contents: [d.dir("lib", [])]);
+        builder.serve('foo', '1.2.3',
+            deps: {'baz': 'any'}, contents: [d.dir('lib', [])]);
+        builder.serve('baz', '9.9.9', deps: {}, contents: [d.dir('lib', [])]);
       });
 
-      await d.dir("local_baz", [
-        d.libDir("baz", 'baz 3.2.1'),
-        d.libPubspec("baz", "3.2.1")
+      await d.dir('local_baz', [
+        d.libDir('baz', 'baz 3.2.1'),
+        d.libPubspec('baz', '3.2.1')
       ]).create();
 
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dependencies": {
-            "foo": "^1.2.3",
+          'name': 'myapp',
+          'dependencies': {
+            'foo': '^1.2.3',
           },
-          "dependency_overrides": {
-            "baz": {"path": "../local_baz"},
+          'dependency_overrides': {
+            'baz': {'path': '../local_baz'},
           }
         }),
         d.dir('lib')
@@ -165,14 +165,14 @@
     test('package_config.json has language version', () async {
       await servePackages((builder) {
         builder.serve(
-          "foo",
-          "1.2.3",
+          'foo',
+          '1.2.3',
           pubspec: {
             'environment': {
               'sdk': '>=0.0.1 <=0.2.2+2', // tests runs with '0.1.2+3'
             },
           },
-          contents: [d.dir("lib", [])],
+          contents: [d.dir('lib', [])],
         );
       });
 
diff --git a/test/package_list_files_test.dart b/test/package_list_files_test.dart
index b4d81c9..2d08108 100644
--- a/test/package_list_files_test.dart
+++ b/test/package_list_files_test.dart
@@ -15,7 +15,7 @@
 String root;
 Entrypoint entrypoint;
 
-main() {
+void main() {
   group('not in a git repo', () {
     setUp(() async {
       await d.appDir().create();
@@ -76,7 +76,7 @@
           ]));
     });
 
-    test("ignores files that are gitignored if desired", () async {
+    test('ignores files that are gitignored if desired', () async {
       await d.dir(appPath, [
         d.file('.gitignore', '*.txt'),
         d.file('file1.txt', 'contents'),
@@ -109,7 +109,7 @@
 
     test(
         "ignores files that are gitignored even if the package isn't "
-        "the repo root", () async {
+        'the repo root', () async {
       await d.dir(appPath, [
         d.dir('sub', [
           d.appPubspec(),
@@ -145,21 +145,21 @@
           ]));
     });
 
-    group("with a submodule", () {
+    group('with a submodule', () {
       setUp(() async {
-        await d.git("submodule", [
-          d.file(".gitignore", "*.txt"),
+        await d.git('submodule', [
+          d.file('.gitignore', '*.txt'),
           d.file('file2.text', 'contents')
         ]).create();
 
-        await repo.runGit(["submodule", "add", "../submodule"]);
+        await repo.runGit(['submodule', 'add', '../submodule']);
 
         await d.file('$appPath/submodule/file1.txt', 'contents').create();
 
         createEntrypoint();
       });
 
-      test("ignores its .gitignore without useGitIgnore", () {
+      test('ignores its .gitignore without useGitIgnore', () {
         expect(
             entrypoint.root.listFiles(),
             unorderedEquals([
@@ -169,7 +169,7 @@
             ]));
       });
 
-      test("respects its .gitignore with useGitIgnore", () {
+      test('respects its .gitignore with useGitIgnore', () {
         expect(
             entrypoint.root.listFiles(useGitIgnore: true),
             unorderedEquals([
diff --git a/test/package_server.dart b/test/package_server.dart
index 53e65a8..6f02e3e 100644
--- a/test/package_server.dart
+++ b/test/package_server.dart
@@ -21,7 +21,7 @@
 ///
 /// Calls [callback] with a [PackageServerBuilder] that's used to specify
 /// which packages to serve.
-Future servePackages(void callback(PackageServerBuilder builder)) async {
+Future servePackages(void Function(PackageServerBuilder) callback) async {
   _globalPackageServer = await PackageServer.start(callback);
   globalServer = _globalPackageServer._inner;
 
@@ -71,7 +71,7 @@
   /// Calls [callback] with a [PackageServerBuilder] that's used to specify
   /// which packages to serve.
   static Future<PackageServer> start(
-      void callback(PackageServerBuilder builder)) async {
+      void Function(PackageServerBuilder) callback) async {
     var descriptorServer = await DescriptorServer.start();
     var server = PackageServer._(descriptorServer);
     descriptorServer.contents
@@ -86,7 +86,7 @@
   }
 
   /// Add to the current set of packages that are being served.
-  void add(void callback(PackageServerBuilder builder)) {
+  void add(void Function(PackageServerBuilder) callback) {
     callback(_builder);
 
     _servedApiPackageDir.contents.clear();
@@ -123,10 +123,10 @@
   /// Returns the path of [package] at [version], installed from this server, in
   /// the pub cache.
   String pathInCache(String package, String version) => p.join(
-      d.sandbox, cachePath, "hosted/localhost%58$port/$package-$version");
+      d.sandbox, cachePath, 'hosted/localhost%58$port/$package-$version');
 
   /// Replace the current set of packages that are being served.
-  void replace(void callback(PackageServerBuilder builder)) {
+  void replace(void Function(PackageServerBuilder) callback) {
     _builder._clear();
     add(callback);
   }
@@ -156,12 +156,12 @@
       {Map<String, dynamic> deps,
       Map<String, dynamic> pubspec,
       Iterable<d.Descriptor> contents}) {
-    var pubspecFields = <String, dynamic>{"name": name, "version": version};
+    var pubspecFields = <String, dynamic>{'name': name, 'version': version};
     if (pubspec != null) pubspecFields.addAll(pubspec);
-    if (deps != null) pubspecFields["dependencies"] = deps;
+    if (deps != null) pubspecFields['dependencies'] = deps;
 
-    contents ??= [d.libDir(name, "$name $version")];
-    contents = [d.file("pubspec.yaml", yaml(pubspecFields))]..addAll(contents);
+    contents ??= [d.libDir(name, '$name $version')];
+    contents = [d.file('pubspec.yaml', yaml(pubspecFields)), ...contents];
 
     var packages = _packages.putIfAbsent(name, () => []);
     packages.add(_ServedPackage(pubspecFields, contents));
diff --git a/test/packages_file_test.dart b/test/packages_file_test.dart
index 1585740..2050d59 100644
--- a/test/packages_file_test.dart
+++ b/test/packages_file_test.dart
@@ -9,19 +9,19 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test('.packages file is created', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.2.3",
-            deps: {'baz': '2.2.2'}, contents: [d.dir("lib", [])]);
-        builder.serve("bar", "3.2.1", contents: [d.dir("lib", [])]);
-        builder.serve("baz", "2.2.2",
-            deps: {"bar": "3.2.1"}, contents: [d.dir("lib", [])]);
+        builder.serve('foo', '1.2.3',
+            deps: {'baz': '2.2.2'}, contents: [d.dir('lib', [])]);
+        builder.serve('bar', '3.2.1', contents: [d.dir('lib', [])]);
+        builder.serve('baz', '2.2.2',
+            deps: {'bar': '3.2.1'}, contents: [d.dir('lib', [])]);
       });
 
       await d.dir(appPath, [
-        d.appPubspec({"foo": "1.2.3"}),
+        d.appPubspec({'foo': '1.2.3'}),
         d.dir('lib')
       ]).create();
 
@@ -29,26 +29,26 @@
 
       await d.dir(appPath, [
         d.packagesFile(
-            {"foo": "1.2.3", "bar": "3.2.1", "baz": "2.2.2", "myapp": "."}),
+            {'foo': '1.2.3', 'bar': '3.2.1', 'baz': '2.2.2', 'myapp': '.'}),
       ]).validate();
     });
 
     test('.packages file is overwritten', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.2.3",
-            deps: {'baz': '2.2.2'}, contents: [d.dir("lib", [])]);
-        builder.serve("bar", "3.2.1", contents: [d.dir("lib", [])]);
-        builder.serve("baz", "2.2.2",
-            deps: {"bar": "3.2.1"}, contents: [d.dir("lib", [])]);
+        builder.serve('foo', '1.2.3',
+            deps: {'baz': '2.2.2'}, contents: [d.dir('lib', [])]);
+        builder.serve('bar', '3.2.1', contents: [d.dir('lib', [])]);
+        builder.serve('baz', '2.2.2',
+            deps: {'bar': '3.2.1'}, contents: [d.dir('lib', [])]);
       });
 
       await d.dir(appPath, [
-        d.appPubspec({"foo": "1.2.3"}),
+        d.appPubspec({'foo': '1.2.3'}),
         d.dir('lib')
       ]).create();
 
       var oldFile = d.dir(appPath, [
-        d.packagesFile({"notFoo": "9.9.9"})
+        d.packagesFile({'notFoo': '9.9.9'})
       ]);
       await oldFile.create();
       await oldFile.validate(); // Sanity-check that file was created correctly.
@@ -57,13 +57,13 @@
 
       await d.dir(appPath, [
         d.packagesFile(
-            {"foo": "1.2.3", "bar": "3.2.1", "baz": "2.2.2", "myapp": "."})
+            {'foo': '1.2.3', 'bar': '3.2.1', 'baz': '2.2.2', 'myapp': '.'})
       ]).validate();
     });
 
     test('.packages file is not created if pub command fails', () async {
       await d.dir(appPath, [
-        d.appPubspec({"foo": "1.2.3"}),
+        d.appPubspec({'foo': '1.2.3'}),
         d.dir('lib')
       ]).create();
 
@@ -78,24 +78,24 @@
 
     test('.packages file has relative path to path dependency', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.2.3",
-            deps: {'baz': 'any'}, contents: [d.dir("lib", [])]);
-        builder.serve("baz", "9.9.9", deps: {}, contents: [d.dir("lib", [])]);
+        builder.serve('foo', '1.2.3',
+            deps: {'baz': 'any'}, contents: [d.dir('lib', [])]);
+        builder.serve('baz', '9.9.9', deps: {}, contents: [d.dir('lib', [])]);
       });
 
-      await d.dir("local_baz", [
-        d.libDir("baz", 'baz 3.2.1'),
-        d.libPubspec("baz", "3.2.1")
+      await d.dir('local_baz', [
+        d.libDir('baz', 'baz 3.2.1'),
+        d.libPubspec('baz', '3.2.1')
       ]).create();
 
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dependencies": {
-            "foo": "^1.2.3",
+          'name': 'myapp',
+          'dependencies': {
+            'foo': '^1.2.3',
           },
-          "dependency_overrides": {
-            "baz": {"path": "../local_baz"},
+          'dependency_overrides': {
+            'baz': {'path': '../local_baz'},
           }
         }),
         d.dir('lib')
@@ -104,7 +104,7 @@
       await pubCommand(command);
 
       await d.dir(appPath, [
-        d.packagesFile({"myapp": ".", "baz": "../local_baz", "foo": "1.2.3"}),
+        d.packagesFile({'myapp': '.', 'baz': '../local_baz', 'foo': '1.2.3'}),
       ]).validate();
     });
   });
diff --git a/test/pub_get_and_upgrade_test.dart b/test/pub_get_and_upgrade_test.dart
index 905a0eb..2115680 100644
--- a/test/pub_get_and_upgrade_test.dart
+++ b/test/pub_get_and_upgrade_test.dart
@@ -9,7 +9,7 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     group('requires', () {
       test('a pubspec', () async {
@@ -24,7 +24,7 @@
       test('a pubspec with a "name" key', () async {
         await d.dir(appPath, [
           d.pubspec({
-            "dependencies": {"foo": null}
+            'dependencies': {'foo': null}
           })
         ]).create();
 
@@ -38,14 +38,14 @@
       // The package should use the name in the pubspec, not the name of the
       // directory.
       await d.dir(appPath, [
-        d.pubspec({"name": "myapp_name"}),
+        d.pubspec({'name': 'myapp_name'}),
         d.libDir('myapp_name')
       ]).create();
 
       await pubCommand(command);
 
-      await d.dir("myapp", [
-        d.packagesFile({"myapp_name": "."})
+      await d.dir('myapp', [
+        d.packagesFile({'myapp_name': '.'})
       ]).validate();
     });
 
@@ -55,17 +55,17 @@
       await d.dir('deps', [
         d.dir('foo', [
           d.pubspec({
-            "name": "foo",
-            "dependencies": {
-              "baz": {"path": "../baz1"}
+            'name': 'foo',
+            'dependencies': {
+              'baz': {'path': '../baz1'}
             }
           })
         ]),
         d.dir('bar', [
           d.pubspec({
-            "name": "bar",
-            "dependencies": {
-              "baz": {"path": "../baz2"}
+            'name': 'bar',
+            'dependencies': {
+              'baz': {'path': '../baz2'}
             }
           })
         ]),
@@ -75,19 +75,19 @@
 
       await d.dir(appPath, [
         d.appPubspec({
-          "foo": {"path": "../deps/foo"},
-          "bar": {"path": "../deps/bar"}
+          'foo': {'path': '../deps/foo'},
+          'bar': {'path': '../deps/bar'}
         })
       ]).create();
 
       await pubCommand(command,
-          error: RegExp(r"bar from path is incompatible with foo from path"));
+          error: RegExp(r'bar from path is incompatible with foo from path'));
     });
 
     test('does not allow a dependency on itself', () async {
       await d.dir(appPath, [
         d.appPubspec({
-          "myapp": {"path": "."}
+          'myapp': {'path': '.'}
         })
       ]).create();
 
@@ -99,9 +99,9 @@
     test('does not allow a dev dependency on itself', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dev_dependencies": {
-            "myapp": {"path": "."}
+          'name': 'myapp',
+          'dev_dependencies': {
+            'myapp': {'path': '.'}
           }
         })
       ]).create();
diff --git a/test/pub_test.dart b/test/pub_test.dart
index baabc25..ab59f71 100644
--- a/test/pub_test.dart
+++ b/test/pub_test.dart
@@ -6,7 +6,7 @@
 
 import 'test_pub.dart';
 
-main() {
+void main() {
   test('running pub with no command displays usage', () {
     return runPub(args: [], output: """
         Pub is a package manager for Dart.
diff --git a/test/pub_uploader_test.dart b/test/pub_uploader_test.dart
index ea1a438..5f460a5 100644
--- a/test/pub_uploader_test.dart
+++ b/test/pub_uploader_test.dart
@@ -33,11 +33,11 @@
 Future<TestProcess> startPubUploader(
     ShelfTestServer server, List<String> args) {
   var tokenEndpoint = server.url.resolve('/token').toString();
-  var allArgs = ['uploader', '--server', tokenEndpoint]..addAll(args);
+  var allArgs = ['uploader', '--server', tokenEndpoint, ...args];
   return startPub(args: allArgs, tokenEndpoint: tokenEndpoint);
 }
 
-main() {
+void main() {
   group('displays usage', () {
     test('when run with no arguments', () {
       return runPub(
@@ -164,7 +164,7 @@
         await startPubUploader(server, ['--package', 'pkg', 'add', 'email']);
 
     server.handler.expect('POST', '/api/packages/pkg/uploaders',
-        (request) => shelf.Response.ok("{not json"));
+        (request) => shelf.Response.ok('{not json'));
 
     expect(
         pub.stderr,
@@ -180,7 +180,7 @@
         await startPubUploader(server, ['--package', 'pkg', 'remove', 'email']);
 
     server.handler.expect('DELETE', '/api/packages/pkg/uploaders/email',
-        (request) => shelf.Response.ok("{not json"));
+        (request) => shelf.Response.ok('{not json'));
 
     expect(
         pub.stderr,
diff --git a/test/pubspec_test.dart b/test/pubspec_test.dart
index 80bff9d..9bb51bc 100644
--- a/test/pubspec_test.dart
+++ b/test/pubspec_test.dart
@@ -12,36 +12,42 @@
 import 'package:test/test.dart';
 
 class FakeSource extends Source {
-  final String name = "fake";
+  @override
+  final String name = 'fake';
 
+  @override
   BoundSource bind(SystemCache cache) =>
-      throw UnsupportedError("Cannot download fake packages.");
+      throw UnsupportedError('Cannot download fake packages.');
 
+  @override
   PackageRef parseRef(String name, description, {String containingPath}) {
     if (description != 'ok') throw FormatException('Bad');
     return PackageRef(name, this, description);
   }
 
+  @override
   PackageId parseId(String name, Version version, description,
           {String containingPath}) =>
       PackageId(name, this, version, description);
 
+  @override
   bool descriptionsEqual(description1, description2) =>
       description1 == description2;
 
+  @override
   int hashDescription(description) => description.hashCode;
 
   String packageName(description) => 'foo';
 }
 
-main() {
+void main() {
   group('parse()', () {
     var sources = SourceRegistry();
     sources.register(FakeSource());
 
     var throwsPubspecException = throwsA(const TypeMatcher<PubspecException>());
 
-    void expectPubspecException(String contents, fn(Pubspec pubspec),
+    void expectPubspecException(String contents, void Function(Pubspec) fn,
         [String expectedContains]) {
       var expectation = const TypeMatcher<PubspecException>();
       if (expectedContains != null) {
@@ -60,19 +66,19 @@
 
     test(
         "eagerly throws an error if the pubspec name doesn't match the "
-        "expected name", () {
-      expect(() => Pubspec.parse("name: foo", sources, expectedName: 'bar'),
+        'expected name', () {
+      expect(() => Pubspec.parse('name: foo', sources, expectedName: 'bar'),
           throwsPubspecException);
     });
 
     test(
         "eagerly throws an error if the pubspec doesn't have a name and an "
-        "expected name is passed", () {
-      expect(() => Pubspec.parse("{}", sources, expectedName: 'bar'),
+        'expected name is passed', () {
+      expect(() => Pubspec.parse('{}', sources, expectedName: 'bar'),
           throwsPubspecException);
     });
 
-    test("allows a version constraint for dependencies", () {
+    test('allows a version constraint for dependencies', () {
       var pubspec = Pubspec.parse('''
 dependencies:
   foo:
@@ -87,7 +93,7 @@
       expect(foo.constraint.allows(Version(3, 4, 5)), isFalse);
     });
 
-    test("allows an empty dependencies map", () {
+    test('allows an empty dependencies map', () {
       var pubspec = Pubspec.parse('''
 dependencies:
 ''', sources);
@@ -95,7 +101,7 @@
       expect(pubspec.dependencies, isEmpty);
     });
 
-    test("allows a version constraint for dev dependencies", () {
+    test('allows a version constraint for dev dependencies', () {
       var pubspec = Pubspec.parse('''
 dev_dependencies:
   foo:
@@ -110,7 +116,7 @@
       expect(foo.constraint.allows(Version(3, 4, 5)), isFalse);
     });
 
-    test("allows an empty dev dependencies map", () {
+    test('allows an empty dev dependencies map', () {
       var pubspec = Pubspec.parse('''
 dev_dependencies:
 ''', sources);
@@ -118,7 +124,7 @@
       expect(pubspec.devDependencies, isEmpty);
     });
 
-    test("allows a version constraint for dependency overrides", () {
+    test('allows a version constraint for dependency overrides', () {
       var pubspec = Pubspec.parse('''
 dependency_overrides:
   foo:
@@ -133,7 +139,7 @@
       expect(foo.constraint.allows(Version(3, 4, 5)), isFalse);
     });
 
-    test("allows an empty dependency overrides map", () {
+    test('allows an empty dependency overrides map', () {
       var pubspec = Pubspec.parse('''
 dependency_overrides:
 ''', sources);
@@ -141,7 +147,7 @@
       expect(pubspec.dependencyOverrides, isEmpty);
     });
 
-    test("allows an unknown source", () {
+    test('allows an unknown source', () {
       var pubspec = Pubspec.parse('''
 dependencies:
   foo:
@@ -153,7 +159,7 @@
       expect(foo.source, equals(sources['unknown']));
     });
 
-    test("allows a default source", () {
+    test('allows a default source', () {
       var pubspec = Pubspec.parse('''
 dependencies:
   foo:
@@ -165,7 +171,7 @@
       expect(foo.source, equals(sources['hosted']));
     });
 
-    test("throws if it dependes on itself", () {
+    test('throws if it dependes on itself', () {
       expectPubspecException('''
 name: myapp
 dependencies:
@@ -174,7 +180,7 @@
 ''', (pubspec) => pubspec.dependencies);
     });
 
-    test("throws if it has a dev dependency on itself", () {
+    test('throws if it has a dev dependency on itself', () {
       expectPubspecException('''
 name: myapp
 dev_dependencies:
@@ -183,7 +189,7 @@
 ''', (pubspec) => pubspec.devDependencies);
     });
 
-    test("throws if it has an override on itself", () {
+    test('throws if it has an override on itself', () {
       expectPubspecException('''
 name: myapp
 dependency_overrides:
@@ -200,7 +206,7 @@
 ''', (pubspec) => pubspec.dependencies);
     });
 
-    test("throws if dependency version is not a string", () {
+    test('throws if dependency version is not a string', () {
       expectPubspecException('''
 dependencies:
   foo:
@@ -209,7 +215,7 @@
 ''', (pubspec) => pubspec.dependencies);
     });
 
-    test("throws if version is not a version constraint", () {
+    test('throws if version is not a version constraint', () {
       expectPubspecException('''
 dependencies:
   foo:
@@ -223,12 +229,12 @@
           'name: [not, a, string]', (pubspec) => pubspec.name);
     });
 
-    test("throws if version is not a string", () {
+    test('throws if version is not a string', () {
       expectPubspecException('version: [2, 0, 0]', (pubspec) => pubspec.version,
           '"version" field must be a string');
     });
 
-    test("throws if version is malformed (looking like a double)", () {
+    test('throws if version is malformed (looking like a double)', () {
       expectPubspecException(
           'version: 2.1',
           (pubspec) => pubspec.version,
@@ -236,7 +242,7 @@
               'and patch. Instead of "2.1", consider "2.1.0"');
     });
 
-    test("throws if version is malformed (looking like an int)", () {
+    test('throws if version is malformed (looking like an int)', () {
       expectPubspecException(
           'version: 2',
           (pubspec) => pubspec.version,
@@ -244,12 +250,12 @@
               'and patch. Instead of "2", consider "2.0.0"');
     });
 
-    test("throws if version is not a version", () {
+    test('throws if version is not a version', () {
       expectPubspecException(
           'version: not version', (pubspec) => pubspec.version);
     });
 
-    test("allows comment-only files", () {
+    test('allows comment-only files', () {
       var pubspec = Pubspec.parse('''
 # No external dependencies yet
 # Including for completeness
@@ -260,7 +266,7 @@
       expect(pubspec.dependencies, isEmpty);
     });
 
-    test("throws a useful error for unresolvable path dependencies", () {
+    test('throws a useful error for unresolvable path dependencies', () {
       expectPubspecException(
           '''
 name: pkg
@@ -273,8 +279,8 @@
               'local pubspec.');
     });
 
-    group("git dependencies", () {
-      test("path must be a string", () {
+    group('git dependencies', () {
+      test('path must be a string', () {
         expectPubspecException('''
 dependencies:
   foo:
@@ -284,7 +290,7 @@
 ''', (pubspec) => pubspec.dependencies);
       });
 
-      test("path must be relative", () {
+      test('path must be relative', () {
         expectPubspecException('''
 dependencies:
   foo:
@@ -302,7 +308,7 @@
 ''', (pubspec) => pubspec.dependencies);
       });
 
-      test("path must be within the repository", () {
+      test('path must be within the repository', () {
         expectPubspecException('''
 dependencies:
   foo:
@@ -313,7 +319,7 @@
       });
     });
 
-    group("environment", () {
+    group('environment', () {
       /// Checking for the default SDK constraint based on the current SDK.
       void expectDefaultSdkConstraint(Pubspec pubspec) {
         var sdkVersionString = sdk.version.toString();
@@ -334,21 +340,21 @@
         }
       }
 
-      test("allows an omitted environment", () {
+      test('allows an omitted environment', () {
         var pubspec = Pubspec.parse('name: testing', sources);
         expectDefaultSdkConstraint(pubspec);
         expect(pubspec.sdkConstraints, isNot(contains('flutter')));
         expect(pubspec.sdkConstraints, isNot(contains('fuchsia')));
       });
 
-      test("default SDK constraint can be omitted with empty environment", () {
+      test('default SDK constraint can be omitted with empty environment', () {
         var pubspec = Pubspec.parse('', sources);
         expectDefaultSdkConstraint(pubspec);
         expect(pubspec.sdkConstraints, isNot(contains('flutter')));
         expect(pubspec.sdkConstraints, isNot(contains('fuchsia')));
       });
 
-      test("defaults the upper constraint for the SDK", () {
+      test('defaults the upper constraint for the SDK', () {
         var pubspec = Pubspec.parse('''
   name: test
   environment:
@@ -360,14 +366,14 @@
       });
 
       test(
-          "default upper constraint for the SDK applies only if compatibile "
-          "with the lower bound", () {
+          'default upper constraint for the SDK applies only if compatibile '
+          'with the lower bound', () {
         var pubspec = Pubspec.parse('''
   environment:
     sdk: ">3.0.0"
   ''', sources);
         expect(pubspec.sdkConstraints,
-            containsPair('dart', VersionConstraint.parse(">3.0.0")));
+            containsPair('dart', VersionConstraint.parse('>3.0.0')));
         expect(pubspec.sdkConstraints, isNot(contains('flutter')));
         expect(pubspec.sdkConstraints, isNot(contains('fuchsia')));
       });
@@ -377,7 +383,7 @@
             'environment: []', (pubspec) => pubspec.sdkConstraints);
       });
 
-      test("allows a version constraint for the SDKs", () {
+      test('allows a version constraint for the SDKs', () {
         var pubspec = Pubspec.parse('''
 environment:
   sdk: ">=1.2.3 <2.3.4"
@@ -385,11 +391,11 @@
   fuchsia: ^5.6.7
 ''', sources);
         expect(pubspec.sdkConstraints,
-            containsPair('dart', VersionConstraint.parse(">=1.2.3 <2.3.4")));
+            containsPair('dart', VersionConstraint.parse('>=1.2.3 <2.3.4')));
         expect(pubspec.sdkConstraints,
-            containsPair('flutter', VersionConstraint.parse("^0.1.2")));
+            containsPair('flutter', VersionConstraint.parse('^0.1.2')));
         expect(pubspec.sdkConstraints,
-            containsPair('fuchsia', VersionConstraint.parse("^5.6.7")));
+            containsPair('fuchsia', VersionConstraint.parse('^5.6.7')));
       });
 
       test("throws if the sdk isn't a string", () {
@@ -411,49 +417,49 @@
       });
     });
 
-    group("publishTo", () {
-      test("defaults to null if omitted", () {
+    group('publishTo', () {
+      test('defaults to null if omitted', () {
         var pubspec = Pubspec.parse('', sources);
         expect(pubspec.publishTo, isNull);
       });
 
-      test("throws if not a string", () {
+      test('throws if not a string', () {
         expectPubspecException(
             'publish_to: 123', (pubspec) => pubspec.publishTo);
       });
 
-      test("allows a URL", () {
+      test('allows a URL', () {
         var pubspec = Pubspec.parse('''
 publish_to: http://example.com
 ''', sources);
-        expect(pubspec.publishTo, equals("http://example.com"));
+        expect(pubspec.publishTo, equals('http://example.com'));
       });
 
-      test("allows none", () {
+      test('allows none', () {
         var pubspec = Pubspec.parse('''
 publish_to: none
 ''', sources);
-        expect(pubspec.publishTo, equals("none"));
+        expect(pubspec.publishTo, equals('none'));
       });
 
-      test("throws on other strings", () {
+      test('throws on other strings', () {
         expectPubspecException('publish_to: http://bad.url:not-port',
             (pubspec) => pubspec.publishTo);
       });
 
-      test("throws on non-absolute URLs", () {
+      test('throws on non-absolute URLs', () {
         expectPubspecException(
             'publish_to: pub.dartlang.org', (pubspec) => pubspec.publishTo);
       });
     });
 
-    group("executables", () {
-      test("defaults to an empty map if omitted", () {
+    group('executables', () {
+      test('defaults to an empty map if omitted', () {
         var pubspec = Pubspec.parse('', sources);
         expect(pubspec.executables, isEmpty);
       });
 
-      test("allows simple names for keys and most characters in values", () {
+      test('allows simple names for keys and most characters in values', () {
         var pubspec = Pubspec.parse('''
 executables:
   abcDEF-123_: "abc DEF-123._"
@@ -461,12 +467,12 @@
         expect(pubspec.executables['abcDEF-123_'], equals('abc DEF-123._'));
       });
 
-      test("throws if not a map", () {
+      test('throws if not a map', () {
         expectPubspecException(
             'executables: not map', (pubspec) => pubspec.executables);
       });
 
-      test("throws if key is not a string", () {
+      test('throws if key is not a string', () {
         expectPubspecException(
             'executables: {123: value}', (pubspec) => pubspec.executables);
       });
@@ -476,22 +482,22 @@
             'executables: {funny/name: ok}', (pubspec) => pubspec.executables);
       });
 
-      test("throws if a value is not a string", () {
+      test('throws if a value is not a string', () {
         expectPubspecException(
             'executables: {command: 123}', (pubspec) => pubspec.executables);
       });
 
-      test("throws if a value contains a path separator", () {
+      test('throws if a value contains a path separator', () {
         expectPubspecException('executables: {command: funny_name/part}',
             (pubspec) => pubspec.executables);
       });
 
-      test("throws if a value contains a windows path separator", () {
+      test('throws if a value contains a windows path separator', () {
         expectPubspecException(r'executables: {command: funny_name\part}',
             (pubspec) => pubspec.executables);
       });
 
-      test("uses the key if the value is null", () {
+      test('uses the key if the value is null', () {
         var pubspec = Pubspec.parse('''
 executables:
   command:
@@ -500,8 +506,8 @@
       });
     });
 
-    group("features", () {
-      test("can be null", () {
+    group('features', () {
+      test('can be null', () {
         var pubspec = Pubspec.parse('features:', sources);
         expect(pubspec.features, isEmpty);
       });
@@ -510,7 +516,7 @@
         expectPubspecException('features: 12', (pubspec) => pubspec.features);
       });
 
-      test("throws if it has non-string keys", () {
+      test('throws if it has non-string keys', () {
         expectPubspecException(
             'features: {1: {}}', (pubspec) => pubspec.features);
       });
@@ -520,7 +526,7 @@
             'features: {foo-bar: {}}', (pubspec) => pubspec.features);
       });
 
-      test("allows null values", () {
+      test('allows null values', () {
         var pubspec = Pubspec.parse('''
 features:
   foobar:
@@ -552,7 +558,7 @@
             'features: {foobar: 1}', (pubspec) => pubspec.features);
       });
 
-      test("allows a valid environment", () {
+      test('allows a valid environment', () {
         var pubspec = Pubspec.parse('''
 features:
   foobar:
@@ -566,11 +572,11 @@
 
         var feature = pubspec.features['foobar'];
         expect(feature.sdkConstraints,
-            containsPair('dart', VersionConstraint.parse("^1.0.0")));
+            containsPair('dart', VersionConstraint.parse('^1.0.0')));
         expect(feature.sdkConstraints,
-            containsPair('flutter', VersionConstraint.parse("^2.0.0")));
+            containsPair('flutter', VersionConstraint.parse('^2.0.0')));
         expect(feature.sdkConstraints,
-            containsPair('fuchsia', VersionConstraint.parse("^3.0.0")));
+            containsPair('fuchsia', VersionConstraint.parse('^3.0.0')));
       });
 
       test("throws if the default value isn't a boolean", () {
@@ -578,7 +584,7 @@
             'features: {foobar: {default: 12}}', (pubspec) => pubspec.features);
       });
 
-      test("allows a default boolean", () {
+      test('allows a default boolean', () {
         var pubspec =
             Pubspec.parse('features: {foobar: {default: false}}', sources);
 
@@ -586,7 +592,7 @@
         expect(pubspec.features['foobar'].onByDefault, isFalse);
       });
 
-      test("parses valid dependency specifications", () {
+      test('parses valid dependency specifications', () {
         var pubspec = Pubspec.parse('''
 features:
   foobar:
@@ -609,24 +615,24 @@
             equals(VersionConstraint.parse('^2.0.0')));
       });
 
-      group("requires", () {
-        test("can be null", () {
+      group('requires', () {
+        test('can be null', () {
           var pubspec =
               Pubspec.parse('features: {foobar: {requires: null}}', sources);
           expect(pubspec.features['foobar'].requires, isEmpty);
         });
 
-        test("must be a list", () {
+        test('must be a list', () {
           expectPubspecException('features: {foobar: {requires: baz}, baz: {}}',
               (pubspec) => pubspec.features);
         });
 
-        test("must be a string list", () {
+        test('must be a string list', () {
           expectPubspecException('features: {foobar: {requires: [12]}}',
               (pubspec) => pubspec.features);
         });
 
-        test("must refer to features that exist in the pubspec", () {
+        test('must refer to features that exist in the pubspec', () {
           expectPubspecException('features: {foobar: {requires: [baz]}}',
               (pubspec) => pubspec.features);
         });
diff --git a/test/real_version_test.dart b/test/real_version_test.dart
index 0a87b18..cdb6760 100644
--- a/test/real_version_test.dart
+++ b/test/real_version_test.dart
@@ -11,7 +11,7 @@
 import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:pub/src/sdk.dart';
 
-main() {
+void main() {
   // This test is a bit funny.
   //
   // Pub parses the "version" file that gets generated and shipped with the SDK.
@@ -25,10 +25,10 @@
   test('parse the real SDK "version" file', () async {
     // Get the path to the pub binary in the SDK.
     var pubPath = path.join(
-        sdk.rootDirectory, 'bin', Platform.isWindows ? "pub.bat" : "pub");
+        sdk.rootDirectory, 'bin', Platform.isWindows ? 'pub.bat' : 'pub');
 
     var pub = await TestProcess.start(pubPath, ['version']);
-    expect(pub.stdout, emits(startsWith("Pub")));
+    expect(pub.stdout, emits(startsWith('Pub')));
     await pub.shouldExit(exit_codes.SUCCESS);
   });
 }
diff --git a/test/run/allows_dart_extension_test.dart b/test/run/allows_dart_extension_test.dart
index 1bafec2..1e13666 100644
--- a/test/run/allows_dart_extension_test.dart
+++ b/test/run/allows_dart_extension_test.dart
@@ -17,17 +17,17 @@
 }
 """;
 
-main() {
+void main() {
   test('allows a ".dart" extension on the argument', () async {
     await d.dir(appPath, [
       d.appPubspec(),
-      d.dir("bin", [d.file("script.dart", SCRIPT)])
+      d.dir('bin', [d.file('script.dart', SCRIPT)])
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["script.dart"]);
-    expect(pub.stdout, emits("stdout output"));
-    expect(pub.stderr, emits("stderr output"));
+    var pub = await pubRun(args: ['script.dart']);
+    expect(pub.stdout, emits('stdout output'));
+    expect(pub.stderr, emits('stderr output'));
     await pub.shouldExit(123);
   });
 }
diff --git a/test/run/app_can_read_from_stdin_test.dart b/test/run/app_can_read_from_stdin_test.dart
index 8d314c6..f6afc16 100644
--- a/test/run/app_can_read_from_stdin_test.dart
+++ b/test/run/app_can_read_from_stdin_test.dart
@@ -7,12 +7,12 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('the spawned application can read line-by-line from stdin', () async {
     await d.dir(appPath, [
       d.appPubspec(),
-      d.dir("bin", [
-        d.file("script.dart", """
+      d.dir('bin', [
+        d.file('script.dart', """
           import 'dart:io';
 
           main() {
@@ -28,22 +28,22 @@
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["bin/script"]);
+    var pub = await pubRun(args: ['bin/script']);
 
-    await expectLater(pub.stdout, emits("started"));
-    pub.stdin.writeln("first");
-    await expectLater(pub.stdout, emits("between"));
-    pub.stdin.writeln("second");
-    expect(pub.stdout, emits("first"));
-    expect(pub.stdout, emits("second"));
+    await expectLater(pub.stdout, emits('started'));
+    pub.stdin.writeln('first');
+    await expectLater(pub.stdout, emits('between'));
+    pub.stdin.writeln('second');
+    expect(pub.stdout, emits('first'));
+    expect(pub.stdout, emits('second'));
     await pub.shouldExit(0);
   });
 
   test('the spawned application can read streamed from stdin', () async {
     await d.dir(appPath, [
       d.appPubspec(),
-      d.dir("bin", [
-        d.file("script.dart", """
+      d.dir('bin', [
+        d.file('script.dart', """
           import 'dart:io';
 
           main() {
@@ -55,15 +55,15 @@
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["bin/script"]);
+    var pub = await pubRun(args: ['bin/script']);
 
-    await expectLater(pub.stdout, emits("started"));
-    pub.stdin.writeln("first");
-    await expectLater(pub.stdout, emits("first"));
-    pub.stdin.writeln("second");
-    await expectLater(pub.stdout, emits("second"));
-    pub.stdin.writeln("third");
-    await expectLater(pub.stdout, emits("third"));
+    await expectLater(pub.stdout, emits('started'));
+    pub.stdin.writeln('first');
+    await expectLater(pub.stdout, emits('first'));
+    pub.stdin.writeln('second');
+    await expectLater(pub.stdout, emits('second'));
+    pub.stdin.writeln('third');
+    await expectLater(pub.stdout, emits('third'));
     await pub.stdin.close();
     await pub.shouldExit(0);
   });
diff --git a/test/run/errors_if_no_executable_is_given_test.dart b/test/run/errors_if_no_executable_is_given_test.dart
index 88e3883..666b608 100644
--- a/test/run/errors_if_no_executable_is_given_test.dart
+++ b/test/run/errors_if_no_executable_is_given_test.dart
@@ -9,7 +9,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('Errors if the executable does not exist.', () async {
     await d.dir(appPath, [d.appPubspec()]).create();
 
diff --git a/test/run/errors_if_only_transitive_dependency_test.dart b/test/run/errors_if_only_transitive_dependency_test.dart
index 2af0bb4..9a324e9 100644
--- a/test/run/errors_if_only_transitive_dependency_test.dart
+++ b/test/run/errors_if_only_transitive_dependency_test.dart
@@ -9,28 +9,28 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('Errors if the script is in a non-immediate dependency.', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("bar.dart", "main() => print('foobar');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")])
     ]).create();
 
-    await d.dir("bar", [
-      d.libPubspec("bar", "1.0.0", deps: {
-        "foo": {"path": "../foo"}
+    await d.dir('bar', [
+      d.libPubspec('bar', '1.0.0', deps: {
+        'foo': {'path': '../foo'}
       })
     ]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "bar": {"path": "../bar"}
+        'bar': {'path': '../bar'}
       })
     ]).create();
 
     await pubGet();
 
-    var pub = await pubRun(args: ["foo:script"]);
+    var pub = await pubRun(args: ['foo:script']);
     expect(pub.stderr, emits('Package "foo" is not an immediate dependency.'));
     expect(pub.stderr,
         emits('Cannot run executables in transitive dependencies.'));
diff --git a/test/run/errors_if_path_in_dependency_test.dart b/test/run/errors_if_path_in_dependency_test.dart
index e60138d..c2213d2 100644
--- a/test/run/errors_if_path_in_dependency_test.dart
+++ b/test/run/errors_if_path_in_dependency_test.dart
@@ -9,7 +9,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test(
       'Errors if the executable is in a subdirectory in a '
       'dependency.', () async {
diff --git a/test/run/forwards_signal_posix_test.dart b/test/run/forwards_signal_posix_test.dart
index 01aed52..d8a7d05 100644
--- a/test/run/forwards_signal_posix_test.dart
+++ b/test/run/forwards_signal_posix_test.dart
@@ -33,17 +33,17 @@
 }
 """;
 
-main() {
+void main() {
   test('forwards signals to the inner script', () async {
     await d.dir(appPath, [
       d.appPubspec(),
-      d.dir("bin", [d.file("script.dart", SCRIPT)])
+      d.dir('bin', [d.file('script.dart', SCRIPT)])
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["bin/script"]);
+    var pub = await pubRun(args: ['bin/script']);
 
-    await expectLater(pub.stdout, emits("ready"));
+    await expectLater(pub.stdout, emits('ready'));
     for (var signal in _catchableSignals) {
       pub.signal(signal);
       await expectLater(pub.stdout, emits(signal.toString()));
diff --git a/test/run/includes_parent_directories_of_entrypoint_test.dart b/test/run/includes_parent_directories_of_entrypoint_test.dart
index 842ef61..a5887bc 100644
--- a/test/run/includes_parent_directories_of_entrypoint_test.dart
+++ b/test/run/includes_parent_directories_of_entrypoint_test.dart
@@ -17,24 +17,24 @@
 }
 """;
 
-main() {
+void main() {
   test(
       'allows assets in parent directories of the entrypoint to be'
       'accessed', () async {
     await d.dir(appPath, [
       d.appPubspec(),
-      d.dir("tool", [
-        d.file("a.dart", "var a = 'a';"),
-        d.dir("a", [
-          d.file("b.dart", "var b = 'b';"),
-          d.dir("b", [d.file("app.dart", SCRIPT)])
+      d.dir('tool', [
+        d.file('a.dart', "var a = 'a';"),
+        d.dir('a', [
+          d.file('b.dart', "var b = 'b';"),
+          d.dir('b', [d.file('app.dart', SCRIPT)])
         ])
       ])
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: [path.join("tool", "a", "b", "app")]);
-    expect(pub.stdout, emits("a b"));
+    var pub = await pubRun(args: [path.join('tool', 'a', 'b', 'app')]);
+    expect(pub.stdout, emits('a b'));
     await pub.shouldExit();
   });
 }
diff --git a/test/run/loads_package_imports_in_a_dependency_test.dart b/test/run/loads_package_imports_in_a_dependency_test.dart
index 2bc4db5..c3a2c03 100644
--- a/test/run/loads_package_imports_in_a_dependency_test.dart
+++ b/test/run/loads_package_imports_in_a_dependency_test.dart
@@ -7,29 +7,29 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('loads package imports in a dependency', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("lib", [d.file('foo.dart', "final value = 'foobar';")]),
-      d.dir("bin", [
-        d.file("bar.dart", """
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('lib', [d.file('foo.dart', "final value = 'foobar';")]),
+      d.dir('bin', [
+        d.file('bar.dart', '''
 import "package:foo/foo.dart";
 
 main() => print(value);
-""")
+''')
       ])
     ]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       })
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["foo:bar"]);
-    expect(pub.stdout, emits("foobar"));
+    var pub = await pubRun(args: ['foo:bar']);
+    expect(pub.stdout, emits('foobar'));
     await pub.shouldExit();
   });
 }
diff --git a/test/run/nonexistent_dependency_test.dart b/test/run/nonexistent_dependency_test.dart
index c365624..52aeac1 100644
--- a/test/run/nonexistent_dependency_test.dart
+++ b/test/run/nonexistent_dependency_test.dart
@@ -9,12 +9,12 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('Errors if the script is in an unknown package.', () async {
     await d.dir(appPath, [d.appPubspec()]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["foo:script"]);
+    var pub = await pubRun(args: ['foo:script']);
     expect(
         pub.stderr,
         emits('Could not find package "foo". Did you forget to add a '
diff --git a/test/run/nonexistent_script_in_dependency_test.dart b/test/run/nonexistent_script_in_dependency_test.dart
index e47cf20..136ccc1 100644
--- a/test/run/nonexistent_script_in_dependency_test.dart
+++ b/test/run/nonexistent_script_in_dependency_test.dart
@@ -10,19 +10,19 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('Errors if the script in a dependency does not exist.', () async {
-    await d.dir("foo", [d.libPubspec("foo", "1.0.0")]).create();
+    await d.dir('foo', [d.libPubspec('foo', '1.0.0')]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       })
     ]).create();
 
     await pubGet();
 
-    var pub = await pubRun(args: ["foo:script"]);
+    var pub = await pubRun(args: ['foo:script']);
     expect(
         pub.stderr,
         emits(
diff --git a/test/run/nonexistent_script_test.dart b/test/run/nonexistent_script_test.dart
index 53ee727..cf295c7 100644
--- a/test/run/nonexistent_script_test.dart
+++ b/test/run/nonexistent_script_test.dart
@@ -10,12 +10,12 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('Errors if the script does not exist.', () async {
     await d.dir(appPath, [d.appPubspec()]).create();
 
     await pubGet();
-    var pub = await pubRun(args: [p.join("bin", "script")]);
+    var pub = await pubRun(args: [p.join('bin', 'script')]);
     expect(
         pub.stderr, emits("Could not find ${p.join("bin", "script.dart")}."));
     await pub.shouldExit(exit_codes.NO_INPUT);
diff --git a/test/run/package_api_test.dart b/test/run/package_api_test.dart
index e79e841..3a3a8ad 100644
--- a/test/run/package_api_test.dart
+++ b/test/run/package_api_test.dart
@@ -21,54 +21,54 @@
   }
 """;
 
-main() {
+void main() {
   test('an untransformed application sees a file: package config', () async {
-    await d.dir("foo", [d.libPubspec("foo", "1.0.0")]).create();
+    await d.dir('foo', [d.libPubspec('foo', '1.0.0')]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       }),
-      d.dir("bin", [d.file("script.dart", _script)])
+      d.dir('bin', [d.file('script.dart', _script)])
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["bin/script"]);
+    var pub = await pubRun(args: ['bin/script']);
 
-    expect(pub.stdout, emits("null"));
+    expect(pub.stdout, emits('null'));
     expect(pub.stdout,
-        emits(p.toUri(p.join(d.sandbox, "myapp/.packages")).toString()));
+        emits(p.toUri(p.join(d.sandbox, 'myapp/.packages')).toString()));
     expect(pub.stdout,
-        emits(p.toUri(p.join(d.sandbox, "myapp/lib/resource.txt")).toString()));
+        emits(p.toUri(p.join(d.sandbox, 'myapp/lib/resource.txt')).toString()));
     expect(pub.stdout,
-        emits(p.toUri(p.join(d.sandbox, "foo/lib/resource.txt")).toString()));
+        emits(p.toUri(p.join(d.sandbox, 'foo/lib/resource.txt')).toString()));
     await pub.shouldExit(0);
   });
 
   test('a snapshotted application sees a file: package root', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", contents: [
-        d.dir("bin", [d.file("script.dart", _script)])
+      builder.serve('foo', '1.0.0', contents: [
+        d.dir('bin', [d.file('script.dart', _script)])
       ]);
     });
 
     await d.dir(appPath, [
-      d.appPubspec({"foo": "any"})
+      d.appPubspec({'foo': 'any'})
     ]).create();
 
     await pubGet();
 
-    var pub = await pubRun(args: ["foo:script"]);
+    var pub = await pubRun(args: ['foo:script']);
 
     expect(pub.stdout, emits('Precompiling executable...'));
     expect(pub.stdout, emits('Precompiled foo:script.'));
-    expect(pub.stdout, emits("null"));
+    expect(pub.stdout, emits('null'));
     expect(pub.stdout,
-        emits(p.toUri(p.join(d.sandbox, "myapp/.packages")).toString()));
+        emits(p.toUri(p.join(d.sandbox, 'myapp/.packages')).toString()));
     expect(pub.stdout,
-        emits(p.toUri(p.join(d.sandbox, "myapp/lib/resource.txt")).toString()));
+        emits(p.toUri(p.join(d.sandbox, 'myapp/lib/resource.txt')).toString()));
     var fooResourcePath = p.join(
-        globalPackageServer.pathInCache('foo', '1.0.0'), "lib/resource.txt");
+        globalPackageServer.pathInCache('foo', '1.0.0'), 'lib/resource.txt');
     expect(pub.stdout, emits(p.toUri(fooResourcePath).toString()));
     await pub.shouldExit(0);
   });
diff --git a/test/run/passes_along_arguments_test.dart b/test/run/passes_along_arguments_test.dart
index 88a0c6f..821ab66 100644
--- a/test/run/passes_along_arguments_test.dart
+++ b/test/run/passes_along_arguments_test.dart
@@ -7,26 +7,26 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-const SCRIPT = """
+const SCRIPT = '''
 main(List<String> args) {
   print(args.join(" "));
 }
-""";
+''';
 
-main() {
+void main() {
   test('passes arguments to the spawned script', () async {
     await d.dir(appPath, [
       d.appPubspec(),
-      d.dir("bin", [d.file("args.dart", SCRIPT)])
+      d.dir('bin', [d.file('args.dart', SCRIPT)])
     ]).create();
 
     await pubGet();
 
     // Use some args that would trip up pub's arg parser to ensure that it
     // isn't trying to look at them.
-    var pub = await pubRun(args: ["bin/args", "--verbose", "-m", "--", "help"]);
+    var pub = await pubRun(args: ['bin/args', '--verbose', '-m', '--', 'help']);
 
-    expect(pub.stdout, emits("--verbose -m -- help"));
+    expect(pub.stdout, emits('--verbose -m -- help'));
     await pub.shouldExit();
   });
 }
diff --git a/test/run/runs_app_in_directory_in_entrypoint_test.dart b/test/run/runs_app_in_directory_in_entrypoint_test.dart
index ccc1fa3..6f59943 100644
--- a/test/run/runs_app_in_directory_in_entrypoint_test.dart
+++ b/test/run/runs_app_in_directory_in_entrypoint_test.dart
@@ -9,23 +9,23 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('runs a Dart application in the entrypoint package', () async {
     await d.dir(appPath, [
       d.appPubspec(),
-      d.dir("tool", [
-        d.file("app.dart", "main() => print('tool');"),
-        d.dir("sub", [d.file("app.dart", "main() => print('sub');")])
+      d.dir('tool', [
+        d.file('app.dart', "main() => print('tool');"),
+        d.dir('sub', [d.file('app.dart', "main() => print('sub');")])
       ])
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: [path.join("tool", "app")]);
-    expect(pub.stdout, emits("tool"));
+    var pub = await pubRun(args: [path.join('tool', 'app')]);
+    expect(pub.stdout, emits('tool'));
     await pub.shouldExit();
 
-    pub = await pubRun(args: [path.join("tool", "sub", "app")]);
-    expect(pub.stdout, emits("sub"));
+    pub = await pubRun(args: [path.join('tool', 'sub', 'app')]);
+    expect(pub.stdout, emits('sub'));
     await pub.shouldExit();
   });
 }
diff --git a/test/run/runs_app_in_entrypoint_test.dart b/test/run/runs_app_in_entrypoint_test.dart
index e08c6d0..87690b9 100644
--- a/test/run/runs_app_in_entrypoint_test.dart
+++ b/test/run/runs_app_in_entrypoint_test.dart
@@ -17,17 +17,17 @@
 }
 """;
 
-main() {
+void main() {
   test('runs a Dart application in the entrypoint package', () async {
     await d.dir(appPath, [
       d.appPubspec(),
-      d.dir("bin", [d.file("script.dart", SCRIPT)])
+      d.dir('bin', [d.file('script.dart', SCRIPT)])
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["bin/script"]);
-    expect(pub.stdout, emits("stdout output"));
-    expect(pub.stderr, emits("stderr output"));
+    var pub = await pubRun(args: ['bin/script']);
+    expect(pub.stdout, emits('stdout output'));
+    expect(pub.stderr, emits('stderr output'));
     await pub.shouldExit(123);
   });
 }
diff --git a/test/run/runs_from_a_dependency_override_after_dependency_test.dart b/test/run/runs_from_a_dependency_override_after_dependency_test.dart
index b283169..69b0b51 100644
--- a/test/run/runs_from_a_dependency_override_after_dependency_test.dart
+++ b/test/run/runs_from_a_dependency_override_after_dependency_test.dart
@@ -7,7 +7,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   // Regression test for issue 23113
   test('runs a named Dart application in a dependency', () async {
     await servePackages((builder) {
@@ -15,38 +15,38 @@
         'name': 'foo',
         'version': '1.0.0'
       }, contents: [
-        d.dir("bin", [d.file("bar.dart", "main() => print('foobar');")])
+        d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")])
       ]);
     });
 
     await d.dir(appPath, [
-      d.appPubspec({"foo": null})
+      d.appPubspec({'foo': null})
     ]).create();
 
     await pubGet(args: ['--precompile']);
 
-    var pub = await pubRun(args: ["foo:bar"]);
-    expect(pub.stdout, emits("foobar"));
+    var pub = await pubRun(args: ['foo:bar']);
+    expect(pub.stdout, emits('foobar'));
     await pub.shouldExit();
 
-    await d.dir("foo", [
-      d.libPubspec("foo", "2.0.0"),
-      d.dir("bin", [d.file("bar.dart", "main() => print('different');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '2.0.0'),
+      d.dir('bin', [d.file('bar.dart', "main() => print('different');")])
     ]).create();
 
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dependencies": {
-          "foo": {"path": "../foo"}
+        'name': 'myapp',
+        'dependencies': {
+          'foo': {'path': '../foo'}
         }
       })
     ]).create();
 
     await pubGet();
 
-    pub = await pubRun(args: ["foo:bar"]);
-    expect(pub.stdout, emits("different"));
+    pub = await pubRun(args: ['foo:bar']);
+    expect(pub.stdout, emits('different'));
     await pub.shouldExit();
   });
 }
diff --git a/test/run/runs_named_app_in_dependency_test.dart b/test/run/runs_named_app_in_dependency_test.dart
index 835106f..96053e8 100644
--- a/test/run/runs_named_app_in_dependency_test.dart
+++ b/test/run/runs_named_app_in_dependency_test.dart
@@ -7,22 +7,22 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('runs a named Dart application in a dependency', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("bar.dart", "main() => print('foobar');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")])
     ]).create();
 
     await d.dir(appPath, [
       d.appPubspec({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       })
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["foo:bar"]);
-    expect(pub.stdout, emits("foobar"));
+    var pub = await pubRun(args: ['foo:bar']);
+    expect(pub.stdout, emits('foobar'));
     await pub.shouldExit();
   });
 }
diff --git a/test/run/runs_named_app_in_dev_dependency_test.dart b/test/run/runs_named_app_in_dev_dependency_test.dart
index 8ea3751..fb819ad 100644
--- a/test/run/runs_named_app_in_dev_dependency_test.dart
+++ b/test/run/runs_named_app_in_dev_dependency_test.dart
@@ -7,25 +7,25 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('runs a named Dart application in a dev dependency', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("bar.dart", "main() => print('foobar');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")])
     ]).create();
 
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dev_dependencies": {
-          "foo": {"path": "../foo"}
+        'name': 'myapp',
+        'dev_dependencies': {
+          'foo': {'path': '../foo'}
         }
       })
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["foo:bar"]);
-    expect(pub.stdout, emits("foobar"));
+    var pub = await pubRun(args: ['foo:bar']);
+    expect(pub.stdout, emits('foobar'));
     await pub.shouldExit();
   });
 }
diff --git a/test/run/runs_shorthand_app_in_dependency_test.dart b/test/run/runs_shorthand_app_in_dependency_test.dart
index 69df8b3..9585209 100644
--- a/test/run/runs_shorthand_app_in_dependency_test.dart
+++ b/test/run/runs_shorthand_app_in_dependency_test.dart
@@ -7,25 +7,25 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('runs a shorthand Dart application in a dependency', () async {
-    await d.dir("foo", [
-      d.libPubspec("foo", "1.0.0"),
-      d.dir("bin", [d.file("foo.dart", "main() => print('foo');")])
+    await d.dir('foo', [
+      d.libPubspec('foo', '1.0.0'),
+      d.dir('bin', [d.file('foo.dart', "main() => print('foo');")])
     ]).create();
 
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dependencies": {
-          "foo": {"path": "../foo"}
+        'name': 'myapp',
+        'dependencies': {
+          'foo': {'path': '../foo'}
         }
       })
     ]).create();
 
     await pubGet();
-    var pub = await pubRun(args: ["foo"]);
-    expect(pub.stdout, emits("foo"));
+    var pub = await pubRun(args: ['foo']);
+    expect(pub.stdout, emits('foo'));
     await pub.shouldExit();
   });
 }
diff --git a/test/run/runs_the_script_in_checked_mode_test.dart b/test/run/runs_the_script_in_checked_mode_test.dart
index 68ec58f..8b4010a 100644
--- a/test/run/runs_the_script_in_checked_mode_test.dart
+++ b/test/run/runs_the_script_in_checked_mode_test.dart
@@ -7,7 +7,7 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
+void main() {
   test('runs the script with assertions enabled', () async {
     await d.dir(appPath, [
       d.appPubspec(),
diff --git a/test/run/runs_the_script_in_unchecked_mode_test.dart b/test/run/runs_the_script_in_unchecked_mode_test.dart
index 588a8db..2652706 100644
--- a/test/run/runs_the_script_in_unchecked_mode_test.dart
+++ b/test/run/runs_the_script_in_unchecked_mode_test.dart
@@ -14,7 +14,7 @@
 }
 ''';
 
-main() {
+void main() {
   test('runs the script without assertions by default', () async {
     await d.dir(appPath, [
       d.appPubspec(),
diff --git a/test/sdk_test.dart b/test/sdk_test.dart
index 02c3acb..696a5cd 100644
--- a/test/sdk_test.dart
+++ b/test/sdk_test.dart
@@ -12,7 +12,7 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     setUp(() async {
       await servePackages((builder) {
@@ -36,7 +36,7 @@
 
     test("gets an SDK dependency's dependencies", () async {
       await d.appDir({
-        "foo": {"sdk": "flutter"}
+        'foo': {'sdk': 'flutter'}
       }).create();
       await pubCommand(command,
           environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')});
@@ -50,9 +50,9 @@
       ]).validate();
     });
 
-    test("gets an SDK dependency from bin/cache/pkg", () async {
+    test('gets an SDK dependency from bin/cache/pkg', () async {
       await d.appDir({
-        "baz": {"sdk": "flutter"}
+        'baz': {'sdk': 'flutter'}
       }).create();
       await pubCommand(command,
           environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')});
@@ -65,16 +65,16 @@
       ]).validate();
     });
 
-    test("unlocks an SDK dependency when the version changes", () async {
+    test('unlocks an SDK dependency when the version changes', () async {
       await d.appDir({
-        "foo": {"sdk": "flutter"}
+        'foo': {'sdk': 'flutter'}
       }).create();
       await pubCommand(command,
           environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')});
 
       await d
-          .file("$appPath/pubspec.lock",
-              allOf([contains("0.0.1"), isNot(contains("0.0.2"))]))
+          .file('$appPath/pubspec.lock',
+              allOf([contains('0.0.1'), isNot(contains('0.0.2'))]))
           .validate();
 
       await d
@@ -83,15 +83,15 @@
           environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')});
 
       await d
-          .file("$appPath/pubspec.lock",
-              allOf([isNot(contains("0.0.1")), contains("0.0.2")]))
+          .file('$appPath/pubspec.lock',
+              allOf([isNot(contains('0.0.1')), contains('0.0.2')]))
           .validate();
     });
 
     // Regression test for #1883
     test(
         "doesn't fail if the Flutter SDK's version file doesn't exist when "
-        "nothing depends on Flutter", () async {
+        'nothing depends on Flutter', () async {
       await d.appDir().create();
       deleteEntry(p.join(d.sandbox, 'flutter', 'version'));
       await pubCommand(command,
@@ -102,10 +102,10 @@
       ]).validate();
     });
 
-    group("fails if", () {
+    group('fails if', () {
       test("the version constraint doesn't match", () async {
         await d.appDir({
-          "foo": {"sdk": "flutter", "version": "^1.0.0"}
+          'foo': {'sdk': 'flutter', 'version': '^1.0.0'}
         }).create();
         await pubCommand(command,
             environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')},
@@ -115,9 +115,9 @@
             """));
       });
 
-      test("the SDK is unknown", () async {
+      test('the SDK is unknown', () async {
         await d.appDir({
-          "foo": {"sdk": "unknown"}
+          'foo': {'sdk': 'unknown'}
         }).create();
         await pubCommand(command, error: equalsIgnoringWhitespace("""
               Because myapp depends on foo any from sdk which doesn't exist
@@ -125,9 +125,9 @@
             """), exitCode: exit_codes.UNAVAILABLE);
       });
 
-      test("the SDK is unavailable", () async {
+      test('the SDK is unavailable', () async {
         await d.appDir({
-          "foo": {"sdk": "flutter"}
+          'foo': {'sdk': 'flutter'}
         }).create();
         await pubCommand(command, error: equalsIgnoringWhitespace("""
               Because myapp depends on foo any from sdk which doesn't exist (the
@@ -140,7 +140,7 @@
 
       test("the SDK doesn't contain the package", () async {
         await d.appDir({
-          "bar": {"sdk": "flutter"}
+          'bar': {'sdk': 'flutter'}
         }).create();
         await pubCommand(command,
             environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')},
@@ -154,7 +154,7 @@
 
       test("the Dart SDK doesn't contain the package", () async {
         await d.appDir({
-          "bar": {"sdk": "dart"}
+          'bar': {'sdk': 'dart'}
         }).create();
         await pubCommand(command, error: equalsIgnoringWhitespace("""
               Because myapp depends on bar any from sdk which doesn't exist
@@ -164,11 +164,11 @@
       });
     });
 
-    test("supports the Fuchsia SDK", () async {
+    test('supports the Fuchsia SDK', () async {
       renameDir(p.join(d.sandbox, 'flutter'), p.join(d.sandbox, 'fuchsia'));
 
       await d.appDir({
-        "foo": {"sdk": "fuchsia"}
+        'foo': {'sdk': 'fuchsia'}
       }).create();
       await pubCommand(command,
           environment: {'FUCHSIA_DART_SDK_ROOT': p.join(d.sandbox, 'fuchsia')});
diff --git a/test/snapshot_test.dart b/test/snapshot_test.dart
index 310b685..c4ffb8d 100644
--- a/test/snapshot_test.dart
+++ b/test/snapshot_test.dart
@@ -8,28 +8,28 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
-  group("creates a snapshot", () {
-    test("for an immediate dependency", () async {
+void main() {
+  group('creates a snapshot', () {
+    test('for an immediate dependency', () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.2.3", contents: [
-          d.dir("bin", [
-            d.file("hello.dart", "void main() => print('hello!');"),
-            d.file("goodbye.dart", "void main() => print('goodbye!');"),
-            d.file("shell.sh", "echo shell"),
+        builder.serve('foo', '1.2.3', contents: [
+          d.dir('bin', [
+            d.file('hello.dart', "void main() => print('hello!');"),
+            d.file('goodbye.dart', "void main() => print('goodbye!');"),
+            d.file('shell.sh', 'echo shell'),
             d.dir(
-                "subdir", [d.file("sub.dart", "void main() => print('sub!');")])
+                'subdir', [d.file('sub.dart', "void main() => print('sub!');")])
           ])
         ]);
       });
 
-      await d.appDir({"foo": "1.2.3"}).create();
+      await d.appDir({'foo': '1.2.3'}).create();
 
       await pubGet(
           args: ['--precompile'],
           output: allOf([
-            contains("Precompiled foo:hello."),
-            contains("Precompiled foo:goodbye.")
+            contains('Precompiled foo:hello.'),
+            contains('Precompiled foo:goodbye.')
           ]));
 
       await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin'), [
@@ -43,35 +43,35 @@
       ]).validate();
 
       var process = await pubRun(args: ['foo:hello']);
-      expect(process.stdout, emits("hello!"));
+      expect(process.stdout, emits('hello!'));
       await process.shouldExit();
 
       process = await pubRun(args: ['foo:goodbye']);
-      expect(process.stdout, emits("goodbye!"));
+      expect(process.stdout, emits('goodbye!'));
       await process.shouldExit();
     });
 
     test("for an immediate dependency that's also transitive", () async {
       await servePackages((builder) {
-        builder.serve("foo", "1.2.3", contents: [
-          d.dir("bin", [
-            d.file("hello.dart", "void main() => print('hello!');"),
-            d.file("goodbye.dart", "void main() => print('goodbye!');"),
-            d.file("shell.sh", "echo shell"),
+        builder.serve('foo', '1.2.3', contents: [
+          d.dir('bin', [
+            d.file('hello.dart', "void main() => print('hello!');"),
+            d.file('goodbye.dart', "void main() => print('goodbye!');"),
+            d.file('shell.sh', 'echo shell'),
             d.dir(
-                "subdir", [d.file("sub.dart", "void main() => print('sub!');")])
+                'subdir', [d.file('sub.dart', "void main() => print('sub!');")])
           ])
         ]);
-        builder.serve("bar", "1.2.3", deps: {"foo": "1.2.3"});
+        builder.serve('bar', '1.2.3', deps: {'foo': '1.2.3'});
       });
 
-      await d.appDir({"foo": "1.2.3"}).create();
+      await d.appDir({'foo': '1.2.3'}).create();
 
       await pubGet(
           args: ['--precompile'],
           output: allOf([
-            contains("Precompiled foo:hello."),
-            contains("Precompiled foo:goodbye.")
+            contains('Precompiled foo:hello.'),
+            contains('Precompiled foo:goodbye.')
           ]));
 
       await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin'), [
@@ -85,145 +85,145 @@
       ]).validate();
 
       var process = await pubRun(args: ['foo:hello']);
-      expect(process.stdout, emits("hello!"));
+      expect(process.stdout, emits('hello!'));
       await process.shouldExit();
 
       process = await pubRun(args: ['foo:goodbye']);
-      expect(process.stdout, emits("goodbye!"));
+      expect(process.stdout, emits('goodbye!'));
       await process.shouldExit();
     });
 
-    group("again if", () {
-      test("its package is updated", () async {
+    group('again if', () {
+      test('its package is updated', () async {
         await servePackages((builder) {
-          builder.serve("foo", "1.2.3", contents: [
-            d.dir("bin",
-                [d.file("hello.dart", "void main() => print('hello!');")])
+          builder.serve('foo', '1.2.3', contents: [
+            d.dir('bin',
+                [d.file('hello.dart', "void main() => print('hello!');")])
           ]);
         });
 
-        await d.appDir({"foo": "any"}).create();
+        await d.appDir({'foo': 'any'}).create();
 
         await pubGet(
-            args: ['--precompile'], output: contains("Precompiled foo:hello."));
+            args: ['--precompile'], output: contains('Precompiled foo:hello.'));
 
         await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
           d.file('hello.dart.snapshot.dart2', contains('hello!'))
         ]).validate();
 
         globalPackageServer.add((builder) {
-          builder.serve("foo", "1.2.4", contents: [
-            d.dir("bin",
-                [d.file("hello.dart", "void main() => print('hello 2!');")])
+          builder.serve('foo', '1.2.4', contents: [
+            d.dir('bin',
+                [d.file('hello.dart', "void main() => print('hello 2!');")])
           ]);
         });
 
         await pubUpgrade(
-            args: ['--precompile'], output: contains("Precompiled foo:hello."));
+            args: ['--precompile'], output: contains('Precompiled foo:hello.'));
 
         await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
           d.file('hello.dart.snapshot.dart2', contains('hello 2!'))
         ]).validate();
 
         var process = await pubRun(args: ['foo:hello']);
-        expect(process.stdout, emits("hello 2!"));
+        expect(process.stdout, emits('hello 2!'));
         await process.shouldExit();
       });
 
-      test("a dependency of its package is updated", () async {
+      test('a dependency of its package is updated', () async {
         await servePackages((builder) {
-          builder.serve("foo", "1.2.3", pubspec: {
-            "dependencies": {"bar": "any"}
+          builder.serve('foo', '1.2.3', pubspec: {
+            'dependencies': {'bar': 'any'}
           }, contents: [
-            d.dir("bin", [
-              d.file("hello.dart", """
+            d.dir('bin', [
+              d.file('hello.dart', """
             import 'package:bar/bar.dart';
 
             void main() => print(message);
           """)
             ])
           ]);
-          builder.serve("bar", "1.2.3", contents: [
-            d.dir("lib", [d.file("bar.dart", "final message = 'hello!';")])
+          builder.serve('bar', '1.2.3', contents: [
+            d.dir('lib', [d.file('bar.dart', "final message = 'hello!';")])
           ]);
         });
 
-        await d.appDir({"foo": "any"}).create();
+        await d.appDir({'foo': 'any'}).create();
 
         await pubGet(
-            args: ['--precompile'], output: contains("Precompiled foo:hello."));
+            args: ['--precompile'], output: contains('Precompiled foo:hello.'));
 
         await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
           d.file('hello.dart.snapshot.dart2', contains('hello!'))
         ]).validate();
 
         globalPackageServer.add((builder) {
-          builder.serve("bar", "1.2.4", contents: [
-            d.dir("lib", [d.file("bar.dart", "final message = 'hello 2!';")]),
+          builder.serve('bar', '1.2.4', contents: [
+            d.dir('lib', [d.file('bar.dart', "final message = 'hello 2!';")]),
           ]);
         });
 
         await pubUpgrade(
-            args: ['--precompile'], output: contains("Precompiled foo:hello."));
+            args: ['--precompile'], output: contains('Precompiled foo:hello.'));
 
         await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
           d.file('hello.dart.snapshot.dart2', contains('hello 2!'))
         ]).validate();
 
         var process = await pubRun(args: ['foo:hello']);
-        expect(process.stdout, emits("hello 2!"));
+        expect(process.stdout, emits('hello 2!'));
         await process.shouldExit();
       });
 
-      test("a git dependency of its package is updated", () async {
+      test('a git dependency of its package is updated', () async {
         ensureGit();
 
         await d.git('foo.git', [
-          d.pubspec({"name": "foo", "version": "0.0.1"}),
+          d.pubspec({'name': 'foo', 'version': '0.0.1'}),
           d.dir(
-              "bin", [d.file("hello.dart", "void main() => print('Hello!');")])
+              'bin', [d.file('hello.dart', "void main() => print('Hello!');")])
         ]).create();
 
         await d.appDir({
-          "foo": {"git": "../foo.git"}
+          'foo': {'git': '../foo.git'}
         }).create();
 
         await pubGet(
-            args: ['--precompile'], output: contains("Precompiled foo:hello."));
+            args: ['--precompile'], output: contains('Precompiled foo:hello.'));
 
         await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
           d.file('hello.dart.snapshot.dart2', contains('Hello!'))
         ]).validate();
 
         await d.git('foo.git', [
-          d.dir("bin",
-              [d.file("hello.dart", "void main() => print('Goodbye!');")])
+          d.dir('bin',
+              [d.file('hello.dart', "void main() => print('Goodbye!');")])
         ]).commit();
 
         await pubUpgrade(
-            args: ['--precompile'], output: contains("Precompiled foo:hello."));
+            args: ['--precompile'], output: contains('Precompiled foo:hello.'));
 
         await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
           d.file('hello.dart.snapshot.dart2', contains('Goodbye!'))
         ]).validate();
 
         var process = await pubRun(args: ['foo:hello']);
-        expect(process.stdout, emits("Goodbye!"));
+        expect(process.stdout, emits('Goodbye!'));
         await process.shouldExit();
       });
 
-      test("the SDK is out of date", () async {
+      test('the SDK is out of date', () async {
         await servePackages((builder) {
-          builder.serve("foo", "5.6.7", contents: [
-            d.dir("bin",
-                [d.file("hello.dart", "void main() => print('hello!');")])
+          builder.serve('foo', '5.6.7', contents: [
+            d.dir('bin',
+                [d.file('hello.dart', "void main() => print('hello!');")])
           ]);
         });
 
-        await d.appDir({"foo": "5.6.7"}).create();
+        await d.appDir({'foo': '5.6.7'}).create();
 
         await pubGet(
-            args: ['--precompile'], output: contains("Precompiled foo:hello."));
+            args: ['--precompile'], output: contains('Precompiled foo:hello.'));
 
         await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin'), [
           d.dir('foo', [d.outOfDateSnapshot('hello.dart.snapshot.dart2')])
@@ -233,8 +233,8 @@
 
         // In the real world this would just print "hello!", but since we collect
         // all output we see the precompilation messages as well.
-        expect(process.stdout, emits("Precompiling executable..."));
-        expect(process.stdout, emitsThrough("hello!"));
+        expect(process.stdout, emits('Precompiling executable...'));
+        expect(process.stdout, emitsThrough('hello!'));
         await process.shouldExit();
 
         await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin'), [
diff --git a/test/test_pub.dart b/test/test_pub.dart
index 44d8616..a5a2d11 100644
--- a/test/test_pub.dart
+++ b/test/test_pub.dart
@@ -45,12 +45,12 @@
 /// A [Matcher] that matches JavaScript generated by dart2js with minification
 /// enabled.
 Matcher isMinifiedDart2JSOutput =
-    isNot(contains("// The code supports the following hooks"));
+    isNot(contains('// The code supports the following hooks'));
 
 /// A [Matcher] that matches JavaScript generated by dart2js with minification
 /// disabled.
 Matcher isUnminifiedDart2JSOutput =
-    contains("// The code supports the following hooks");
+    contains('// The code supports the following hooks');
 
 /// The entrypoint for pub itself.
 final _entrypoint = Entrypoint(pubRoot, SystemCache(isOffline: true));
@@ -60,15 +60,15 @@
 
 /// The path of the package cache directory used for tests, relative to the
 /// sandbox directory.
-final String cachePath = "cache";
+final String cachePath = 'cache';
 
 /// The path of the mock app directory used for tests, relative to the sandbox
 /// directory.
-final String appPath = "myapp";
+final String appPath = 'myapp';
 
 /// The path of the ".packages" file in the mock app used for tests, relative
 /// to the sandbox directory.
-final String packagesFilePath = "$appPath/.packages";
+final String packagesFilePath = '$appPath/.packages';
 
 /// The line from the `.packages` file for [packageName].
 String packageSpecLine(String packageName) => File(d.path(packagesFilePath))
@@ -96,7 +96,7 @@
 /// upgrade have the same behavior. Instead of duplicating those tests, this
 /// takes a callback that defines get/upgrade agnostic tests and runs them
 /// with both commands.
-void forBothPubGetAndUpgrade(void callback(RunCommand command)) {
+void forBothPubGetAndUpgrade(void Function(RunCommand) callback) {
   group(RunCommand.get.name, () => callback(RunCommand.get));
   group(RunCommand.upgrade.name, () => callback(RunCommand.upgrade));
 }
@@ -198,13 +198,13 @@
 ///
 /// Returns the `pub run` process.
 Future<PubProcess> pubRun({bool global = false, Iterable<String> args}) async {
-  var pubArgs = global ? ["global", "run"] : ["run"];
+  var pubArgs = global ? ['global', 'run'] : ['run'];
   pubArgs.addAll(args);
   var pub = await startPub(args: pubArgs);
 
   // Loading sources and transformers isn't normally printed, but the pub test
   // infrastructure runs pub in verbose mode, which enables this.
-  expect(pub.stdout, mayEmitMultiple(startsWith("Loading")));
+  expect(pub.stdout, mayEmitMultiple(startsWith('Loading')));
 
   return pub;
 }
@@ -250,9 +250,9 @@
   await pub.shouldExit(exitCode);
 
   expect(() async {
-    var actualOutput = (await pub.stdoutStream().toList()).join("\n");
-    var actualError = (await pub.stderrStream().toList()).join("\n");
-    var actualSilent = (await pub.silentStream().toList()).join("\n");
+    var actualOutput = (await pub.stdoutStream().toList()).join('\n');
+    var actualError = (await pub.stderrStream().toList()).join('\n');
+    var actualSilent = (await pub.silentStream().toList()).join('\n');
 
     var failures = <String>[];
     if (outputJson == null) {
@@ -276,7 +276,7 @@
 Future<PubProcess> startPublish(ShelfTestServer server,
     {List<String> args}) async {
   var tokenEndpoint = server.url.resolve('/token').toString();
-  args = ['lish', '--server', tokenEndpoint]..addAll(args ?? []);
+  args = ['lish', '--server', tokenEndpoint, ...?args];
   return await startPub(args: args, tokenEndpoint: tokenEndpoint);
 }
 
@@ -290,8 +290,8 @@
   await expectLater(
       pub.stdout, emits(startsWith('Publishing test_pkg 1.0.0 to ')));
   await expectLater(pub.stdout,
-      emitsThrough("Looks great! Are you ready to upload your package (y/n)?"));
-  pub.stdin.writeln("y");
+      emitsThrough('Looks great! Are you ready to upload your package (y/n)?'));
+  pub.stdin.writeln('y');
 }
 
 /// Resolves [path] relative to the package cache in the sandbox.
@@ -309,7 +309,7 @@
     'PUB_ENVIRONMENT': 'test-environment',
 
     // Ensure a known SDK version is set for the tests that rely on that.
-    '_PUB_TEST_SDK_VERSION': "0.1.2+3"
+    '_PUB_TEST_SDK_VERSION': '0.1.2+3'
   };
 
   if (tokenEndpoint != null) {
@@ -317,7 +317,7 @@
   }
 
   if (globalServer != null) {
-    environment['PUB_HOSTED_URL'] = "http://localhost:${globalServer.port}";
+    environment['PUB_HOSTED_URL'] = 'http://localhost:${globalServer.port}';
   }
 
   return environment;
@@ -400,7 +400,7 @@
       var humanExecutable = p.isWithin(p.current, executable)
           ? p.relative(executable)
           : executable;
-      description = "$humanExecutable ${arguments.join(" ")}";
+      description = '$humanExecutable ${arguments.join(' ')}';
     }
 
     encoding ??= utf8;
@@ -414,7 +414,7 @@
       : super(process, description,
             encoding: encoding, forwardStdio: forwardStdio);
 
-  final _logLineRegExp = RegExp(r"^([A-Z ]{4})[:|] (.*)$");
+  final _logLineRegExp = RegExp(r'^([A-Z ]{4})[:|] (.*)$');
   final Map<String, log.Level> _logLevels = [
     log.Level.ERROR,
     log.Level.WARNING,
@@ -440,6 +440,7 @@
     });
   }
 
+  @override
   Stream<String> stdoutStream() {
     return _logSplitter.split().expand((entry) {
       if (entry.first != log.Level.MESSAGE) return [];
@@ -447,6 +448,7 @@
     });
   }
 
+  @override
   Stream<String> stderrStream() {
     return _logSplitter.split().expand((entry) {
       if (entry.first != log.Level.ERROR && entry.first != log.Level.WARNING) {
@@ -473,7 +475,7 @@
 /// validation gives an easier-to-understand error when that requirement isn't
 /// met than just failing in the middle of a test when pub invokes git.
 void ensureGit() {
-  if (!gitlib.isInstalled) fail("Git must be installed to run this test.");
+  if (!gitlib.isInstalled) fail('Git must be installed to run this test.');
 }
 
 /// Creates a lock file for [package] without running `pub get`.
@@ -580,15 +582,15 @@
   Map environment,
 ]) {
   var package = <String, dynamic>{
-    "name": name,
-    "version": version,
-    "homepage": "http://pub.dartlang.org",
-    "description": "A package, I guess."
+    'name': name,
+    'version': version,
+    'homepage': 'http://pub.dartlang.org',
+    'description': 'A package, I guess.'
   };
 
-  if (dependencies != null) package["dependencies"] = dependencies;
-  if (devDependencies != null) package["dev_dependencies"] = devDependencies;
-  if (environment != null) package["environment"] = environment;
+  if (dependencies != null) package['dependencies'] = dependencies;
+  if (devDependencies != null) package['dev_dependencies'] = devDependencies;
+  if (environment != null) package['environment'] = environment;
   return package;
 }
 
@@ -651,8 +653,8 @@
 
 void _validateOutputString(
     List<String> failures, String pipe, String expected, String actual) {
-  var actualLines = actual.split("\n");
-  var expectedLines = expected.split("\n");
+  var actualLines = actual.split('\n');
+  var expectedLines = expected.split('\n');
 
   // Strip off the last line. This lets us have expected multiline strings
   // where the closing ''' is on its own line. It also fixes '' expected output
@@ -748,14 +750,16 @@
 
   _PairMatcher(this._firstMatcher, this._lastMatcher);
 
+  @override
   bool matches(item, Map matchState) {
     if (item is! Pair) return false;
     return _firstMatcher.matches(item.first, matchState) &&
         _lastMatcher.matches(item.last, matchState);
   }
 
+  @override
   Description describe(Description description) {
-    return description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]);
+    return description.addAll('(', ', ', ')', [_firstMatcher, _lastMatcher]);
   }
 }
 
@@ -764,11 +768,11 @@
 Matcher matchesMultiple(String pattern, int times) {
   var buffer = StringBuffer(pattern);
   for (var i = 1; i < times; i++) {
-    buffer.write(r"(.|\n)*");
+    buffer.write(r'(.|\n)*');
     buffer.write(pattern);
   }
   return matches(buffer.toString());
 }
 
 /// A [StreamMatcher] that matches multiple lines of output.
-StreamMatcher emitsLines(String output) => emitsInOrder(output.split("\n"));
+StreamMatcher emitsLines(String output) => emitsInOrder(output.split('\n'));
diff --git a/test/transcript_test.dart b/test/transcript_test.dart
index d597e8a..6c225d8 100644
--- a/test/transcript_test.dart
+++ b/test/transcript_test.dart
@@ -5,50 +5,50 @@
 import 'package:pub/src/transcript.dart';
 import 'package:test/test.dart';
 
-main() {
-  test("discards from the middle once it reaches the maximum", () {
+void main() {
+  test('discards from the middle once it reaches the maximum', () {
     var transcript = Transcript<String>(4);
-    forEachToString() {
-      var result = "";
-      transcript.forEach((entry) => result += entry, (n) => result += "[$n]");
+    String forEachToString() {
+      var result = '';
+      transcript.forEach((entry) => result += entry, (n) => result += '[$n]');
       return result;
     }
 
-    expect(forEachToString(), equals(""));
-    transcript.add("a");
-    expect(forEachToString(), equals("a"));
-    transcript.add("b");
-    expect(forEachToString(), equals("ab"));
-    transcript.add("c");
-    expect(forEachToString(), equals("abc"));
-    transcript.add("d");
-    expect(forEachToString(), equals("abcd"));
-    transcript.add("e");
-    expect(forEachToString(), equals("ab[1]de"));
-    transcript.add("f");
-    expect(forEachToString(), equals("ab[2]ef"));
+    expect(forEachToString(), equals(''));
+    transcript.add('a');
+    expect(forEachToString(), equals('a'));
+    transcript.add('b');
+    expect(forEachToString(), equals('ab'));
+    transcript.add('c');
+    expect(forEachToString(), equals('abc'));
+    transcript.add('d');
+    expect(forEachToString(), equals('abcd'));
+    transcript.add('e');
+    expect(forEachToString(), equals('ab[1]de'));
+    transcript.add('f');
+    expect(forEachToString(), equals('ab[2]ef'));
   });
 
   test("does not discard if it doesn't reach the maximum", () {
     var transcript = Transcript<String>(40);
-    forEachToString() {
-      var result = "";
-      transcript.forEach((entry) => result += entry, (n) => result += "[$n]");
+    String forEachToString() {
+      var result = '';
+      transcript.forEach((entry) => result += entry, (n) => result += '[$n]');
       return result;
     }
 
-    expect(forEachToString(), equals(""));
-    transcript.add("a");
-    expect(forEachToString(), equals("a"));
-    transcript.add("b");
-    expect(forEachToString(), equals("ab"));
-    transcript.add("c");
-    expect(forEachToString(), equals("abc"));
-    transcript.add("d");
-    expect(forEachToString(), equals("abcd"));
-    transcript.add("e");
-    expect(forEachToString(), equals("abcde"));
-    transcript.add("f");
-    expect(forEachToString(), equals("abcdef"));
+    expect(forEachToString(), equals(''));
+    transcript.add('a');
+    expect(forEachToString(), equals('a'));
+    transcript.add('b');
+    expect(forEachToString(), equals('ab'));
+    transcript.add('c');
+    expect(forEachToString(), equals('abc'));
+    transcript.add('d');
+    expect(forEachToString(), equals('abcd'));
+    transcript.add('e');
+    expect(forEachToString(), equals('abcde'));
+    transcript.add('f');
+    expect(forEachToString(), equals('abcdef'));
   });
 }
diff --git a/test/unknown_source_test.dart b/test/unknown_source_test.dart
index 9bcd4ad..9de5c7f 100644
--- a/test/unknown_source_test.dart
+++ b/test/unknown_source_test.dart
@@ -9,17 +9,17 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   forBothPubGetAndUpgrade((command) {
     test('fails gracefully on a dependency from an unknown source', () async {
       await d.appDir({
-        "foo": {"bad": "foo"}
+        'foo': {'bad': 'foo'}
       }).create();
 
-      await pubCommand(command, error: equalsIgnoringWhitespace("""
+      await pubCommand(command, error: equalsIgnoringWhitespace('''
         Because myapp depends on foo from unknown source "bad", version solving
           failed.
-      """));
+      '''));
     });
 
     test(
@@ -28,19 +28,19 @@
       await d.dir('foo', [
         d.libDir('foo', 'foo 0.0.1'),
         d.libPubspec('foo', '0.0.1', deps: {
-          "bar": {"bad": "bar"}
+          'bar': {'bad': 'bar'}
         })
       ]).create();
 
       await d.appDir({
-        "foo": {"path": "../foo"}
+        'foo': {'path': '../foo'}
       }).create();
 
-      await pubCommand(command, error: equalsIgnoringWhitespace("""
+      await pubCommand(command, error: equalsIgnoringWhitespace('''
         Because every version of foo from path depends on bar from unknown
           source "bad", foo from path is forbidden.
         So, because myapp depends on foo from path, version solving failed.
-      """));
+      '''));
     });
 
     test('ignores unknown source in lockfile', () async {
@@ -50,14 +50,14 @@
       // Depend on "foo" from a valid source.
       await d.dir(appPath, [
         d.appPubspec({
-          "foo": {"path": "../foo"}
+          'foo': {'path': '../foo'}
         })
       ]).create();
 
       // But lock it to a bad one.
       await d.dir(appPath, [
         d.file(
-            "pubspec.lock",
+            'pubspec.lock',
             jsonEncode({
               'packages': {
                 'foo': {
@@ -72,7 +72,7 @@
       await pubCommand(command);
 
       // Should upgrade to the new one.
-      await d.appPackagesFile({"foo": "../foo"}).validate();
+      await d.appPackagesFile({'foo': '../foo'}).validate();
     });
   });
 }
diff --git a/test/upgrade/dry_run_does_not_apply_changes_test.dart b/test/upgrade/dry_run_does_not_apply_changes_test.dart
index 18aa8c4..5698b39 100644
--- a/test/upgrade/dry_run_does_not_apply_changes_test.dart
+++ b/test/upgrade/dry_run_does_not_apply_changes_test.dart
@@ -10,37 +10,37 @@
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
-main() {
-  test("--dry-run shows report but does not apply changes", () async {
+void main() {
+  test('--dry-run shows report but does not apply changes', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0");
-      builder.serve("foo", "2.0.0");
+      builder.serve('foo', '1.0.0');
+      builder.serve('foo', '2.0.0');
     });
 
     // Create the first lockfile.
-    await d.appDir({"foo": "1.0.0"}).create();
+    await d.appDir({'foo': '1.0.0'}).create();
 
     await pubGet();
 
     // Change the pubspec.
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     // Also delete the "packages" directory.
-    deleteEntry(path.join(d.sandbox, appPath, "packages"));
+    deleteEntry(path.join(d.sandbox, appPath, 'packages'));
 
     // Do the dry run.
     await pubUpgrade(
-        args: ["--dry-run"],
+        args: ['--dry-run'],
         output: allOf([
-          contains("> foo 2.0.0 (was 1.0.0)"),
-          contains("Would change 1 dependency.")
+          contains('> foo 2.0.0 (was 1.0.0)'),
+          contains('Would change 1 dependency.')
         ]));
 
     await d.dir(appPath, [
       // The lockfile should be unmodified.
-      d.file("pubspec.lock", contains("1.0.0")),
+      d.file('pubspec.lock', contains('1.0.0')),
       // The "packages" directory should not have been regenerated.
-      d.nothing("packages")
+      d.nothing('packages')
     ]).validate();
   });
 }
diff --git a/test/upgrade/git/do_not_upgrade_if_unneeded_test.dart b/test/upgrade/git/do_not_upgrade_if_unneeded_test.dart
index 4eeb64f..367f436 100644
--- a/test/upgrade/git/do_not_upgrade_if_unneeded_test.dart
+++ b/test/upgrade/git/do_not_upgrade_if_unneeded_test.dart
@@ -7,16 +7,16 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       "doesn't upgrade one locked Git package's dependencies if it's "
-      "not necessary", () async {
+      'not necessary', () async {
     ensureGit();
 
     await d.git('foo.git', [
       d.libDir('foo'),
-      d.libPubspec("foo", "1.0.0", deps: {
-        "foo_dep": {"git": "../foo_dep.git"}
+      d.libPubspec('foo', '1.0.0', deps: {
+        'foo_dep': {'git': '../foo_dep.git'}
       })
     ]).create();
 
@@ -24,7 +24,7 @@
         [d.libDir('foo_dep'), d.libPubspec('foo_dep', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
@@ -44,8 +44,8 @@
 
     await d.git('foo.git', [
       d.libDir('foo', 'foo 2'),
-      d.libPubspec("foo", "1.0.0", deps: {
-        "foo_dep": {"git": "../foo_dep.git"}
+      d.libPubspec('foo', '1.0.0', deps: {
+        'foo_dep': {'git': '../foo_dep.git'}
       })
     ]).create();
 
diff --git a/test/upgrade/git/upgrade_locked_test.dart b/test/upgrade/git/upgrade_locked_test.dart
index 5e73345..a95ce9c 100644
--- a/test/upgrade/git/upgrade_locked_test.dart
+++ b/test/upgrade/git/upgrade_locked_test.dart
@@ -7,8 +7,8 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("upgrades locked Git packages", () async {
+void main() {
+  test('upgrades locked Git packages', () async {
     ensureGit();
 
     await d.git(
@@ -18,8 +18,8 @@
         'bar.git', [d.libDir('bar'), d.libPubspec('bar', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"},
-      "bar": {"git": "../bar.git"}
+      'foo': {'git': '../foo.git'},
+      'bar': {'git': '../bar.git'}
     }).create();
 
     await pubGet();
diff --git a/test/upgrade/git/upgrade_one_locked_test.dart b/test/upgrade/git/upgrade_one_locked_test.dart
index cd1864f..fb24b0c 100644
--- a/test/upgrade/git/upgrade_one_locked_test.dart
+++ b/test/upgrade/git/upgrade_one_locked_test.dart
@@ -7,8 +7,8 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("upgrades one locked Git package but no others", () async {
+void main() {
+  test('upgrades one locked Git package but no others', () async {
     ensureGit();
 
     await d.git(
@@ -18,8 +18,8 @@
         'bar.git', [d.libDir('bar'), d.libPubspec('bar', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"},
-      "bar": {"git": "../bar.git"}
+      'foo': {'git': '../foo.git'},
+      'bar': {'git': '../bar.git'}
     }).create();
 
     await pubGet();
diff --git a/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart b/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart
index 1b8c873..bda2003 100644
--- a/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart
+++ b/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart
@@ -9,15 +9,15 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("upgrades Git packages to an incompatible pubspec", () async {
+void main() {
+  test('upgrades Git packages to an incompatible pubspec', () async {
     ensureGit();
 
     await d.git(
         'foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
diff --git a/test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart b/test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart
index b3cc259..f3f5eef 100644
--- a/test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart
+++ b/test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart
@@ -7,8 +7,8 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("upgrades Git packages to a nonexistent pubspec", () async {
+void main() {
+  test('upgrades Git packages to a nonexistent pubspec', () async {
     ensureGit();
 
     var repo =
@@ -16,7 +16,7 @@
     await repo.create();
 
     await d.appDir({
-      "foo": {"git": "../foo.git"}
+      'foo': {'git': '../foo.git'}
     }).create();
 
     await pubGet();
diff --git a/test/upgrade/hosted/unlock_dependers_test.dart b/test/upgrade/hosted/unlock_dependers_test.dart
index 5a74bbc..2674505 100644
--- a/test/upgrade/hosted/unlock_dependers_test.dart
+++ b/test/upgrade/hosted/unlock_dependers_test.dart
@@ -7,28 +7,28 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       "upgrades a locked package's dependers in order to get it to max "
-      "version", () async {
+      'version', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", deps: {"bar": "<2.0.0"});
-      builder.serve("bar", "1.0.0");
+      builder.serve('foo', '1.0.0', deps: {'bar': '<2.0.0'});
+      builder.serve('bar', '1.0.0');
     });
 
-    await d.appDir({"foo": "any", "bar": "any"}).create();
+    await d.appDir({'foo': 'any', 'bar': 'any'}).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.0.0", "bar": "1.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0', 'bar': '1.0.0'}).validate();
 
     globalPackageServer.add((builder) {
-      builder.serve("foo", "2.0.0", deps: {"bar": "<3.0.0"});
-      builder.serve("bar", "2.0.0");
+      builder.serve('foo', '2.0.0', deps: {'bar': '<3.0.0'});
+      builder.serve('bar', '2.0.0');
     });
 
     await pubUpgrade(args: ['bar']);
 
-    await d.appPackagesFile({"foo": "2.0.0", "bar": "2.0.0"}).validate();
+    await d.appPackagesFile({'foo': '2.0.0', 'bar': '2.0.0'}).validate();
   });
 }
diff --git a/test/upgrade/hosted/unlock_if_necessary_test.dart b/test/upgrade/hosted/unlock_if_necessary_test.dart
index 33b808d..54ff94f 100644
--- a/test/upgrade/hosted/unlock_if_necessary_test.dart
+++ b/test/upgrade/hosted/unlock_if_necessary_test.dart
@@ -7,28 +7,28 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
       "upgrades one locked pub server package's dependencies if it's "
-      "necessary", () async {
+      'necessary', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", deps: {"foo_dep": "any"});
-      builder.serve("foo_dep", "1.0.0");
+      builder.serve('foo', '1.0.0', deps: {'foo_dep': 'any'});
+      builder.serve('foo_dep', '1.0.0');
     });
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     await pubGet();
 
-    await d.appPackagesFile({"foo": "1.0.0", "foo_dep": "1.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0', 'foo_dep': '1.0.0'}).validate();
 
     globalPackageServer.add((builder) {
-      builder.serve("foo", "2.0.0", deps: {"foo_dep": ">1.0.0"});
-      builder.serve("foo_dep", "2.0.0");
+      builder.serve('foo', '2.0.0', deps: {'foo_dep': '>1.0.0'});
+      builder.serve('foo_dep', '2.0.0');
     });
 
     await pubUpgrade(args: ['foo']);
 
-    await d.appPackagesFile({"foo": "2.0.0", "foo_dep": "2.0.0"}).validate();
+    await d.appPackagesFile({'foo': '2.0.0', 'foo_dep': '2.0.0'}).validate();
   });
 }
diff --git a/test/upgrade/hosted/upgrade_removed_constraints_test.dart b/test/upgrade/hosted/upgrade_removed_constraints_test.dart
index f013e1c..7c20816 100644
--- a/test/upgrade/hosted/upgrade_removed_constraints_test.dart
+++ b/test/upgrade/hosted/upgrade_removed_constraints_test.dart
@@ -7,26 +7,26 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("upgrades dependencies whose constraints have been removed", () async {
+void main() {
+  test('upgrades dependencies whose constraints have been removed', () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.0.0", deps: {"shared_dep": "any"});
-      builder.serve("bar", "1.0.0", deps: {"shared_dep": "<2.0.0"});
-      builder.serve("shared_dep", "1.0.0");
-      builder.serve("shared_dep", "2.0.0");
+      builder.serve('foo', '1.0.0', deps: {'shared_dep': 'any'});
+      builder.serve('bar', '1.0.0', deps: {'shared_dep': '<2.0.0'});
+      builder.serve('shared_dep', '1.0.0');
+      builder.serve('shared_dep', '2.0.0');
     });
 
-    await d.appDir({"foo": "any", "bar": "any"}).create();
+    await d.appDir({'foo': 'any', 'bar': 'any'}).create();
 
     await pubUpgrade();
 
     await d.appPackagesFile(
-        {"foo": "1.0.0", "bar": "1.0.0", "shared_dep": "1.0.0"}).validate();
+        {'foo': '1.0.0', 'bar': '1.0.0', 'shared_dep': '1.0.0'}).validate();
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     await pubUpgrade();
 
-    await d.appPackagesFile({"foo": "1.0.0", "shared_dep": "2.0.0"}).validate();
+    await d.appPackagesFile({'foo': '1.0.0', 'shared_dep': '2.0.0'}).validate();
   });
 }
diff --git a/test/upgrade/report/describes_change_test.dart b/test/upgrade/report/describes_change_test.dart
index 07427f6..3f05bc6 100644
--- a/test/upgrade/report/describes_change_test.dart
+++ b/test/upgrade/report/describes_change_test.dart
@@ -7,55 +7,55 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("shows how package changed from previous lockfile", () async {
+void main() {
+  test('shows how package changed from previous lockfile', () async {
     await servePackages((builder) {
-      builder.serve("unchanged", "1.0.0");
-      builder.serve("version_changed", "1.0.0");
-      builder.serve("version_changed", "2.0.0");
-      builder.serve("source_changed", "1.0.0");
+      builder.serve('unchanged', '1.0.0');
+      builder.serve('version_changed', '1.0.0');
+      builder.serve('version_changed', '2.0.0');
+      builder.serve('source_changed', '1.0.0');
     });
 
-    await d.dir("source_changed", [
-      d.libDir("source_changed"),
-      d.libPubspec("source_changed", "2.0.0")
+    await d.dir('source_changed', [
+      d.libDir('source_changed'),
+      d.libPubspec('source_changed', '2.0.0')
     ]).create();
 
-    await d.dir("description_changed_1", [
-      d.libDir("description_changed"),
-      d.libPubspec("description_changed", "1.0.0")
+    await d.dir('description_changed_1', [
+      d.libDir('description_changed'),
+      d.libPubspec('description_changed', '1.0.0')
     ]).create();
 
-    await d.dir("description_changed_2", [
-      d.libDir("description_changed"),
-      d.libPubspec("description_changed", "1.0.0")
+    await d.dir('description_changed_2', [
+      d.libDir('description_changed'),
+      d.libPubspec('description_changed', '1.0.0')
     ]).create();
 
     // Create the first lockfile.
     await d.appDir({
-      "unchanged": "any",
-      "version_changed": "1.0.0",
-      "source_changed": "any",
-      "description_changed": {"path": "../description_changed_1"}
+      'unchanged': 'any',
+      'version_changed': '1.0.0',
+      'source_changed': 'any',
+      'description_changed': {'path': '../description_changed_1'}
     }).create();
 
     await pubGet();
 
     // Change the pubspec.
     await d.appDir({
-      "unchanged": "any",
-      "version_changed": "any",
-      "source_changed": {"path": "../source_changed"},
-      "description_changed": {"path": "../description_changed_2"}
+      'unchanged': 'any',
+      'version_changed': 'any',
+      'source_changed': {'path': '../source_changed'},
+      'description_changed': {'path': '../description_changed_2'}
     }).create();
 
     // Upgrade everything.
-    await pubUpgrade(output: RegExp(r"""
+    await pubUpgrade(output: RegExp(r'''
 Resolving dependencies\.\.\..*
 . description_changed 1\.0\.0 from path \.\.[/\\]description_changed_2 \(was 1\.0\.0 from path \.\.[/\\]description_changed_1\)
 . source_changed 2\.0\.0 from path \.\.[/\\]source_changed \(was 1\.0\.0\)
 . unchanged 1\.0\.0
 . version_changed 2\.0\.0 \(was 1\.0\.0\)
-""", multiLine: true), environment: {'PUB_ALLOW_PRERELEASE_SDK': 'false'});
+''', multiLine: true), environment: {'PUB_ALLOW_PRERELEASE_SDK': 'false'});
   });
 }
diff --git a/test/upgrade/report/does_not_show_newer_versions_for_locked_packages_test.dart b/test/upgrade/report/does_not_show_newer_versions_for_locked_packages_test.dart
index 3488f07..6883ab9 100644
--- a/test/upgrade/report/does_not_show_newer_versions_for_locked_packages_test.dart
+++ b/test/upgrade/report/does_not_show_newer_versions_for_locked_packages_test.dart
@@ -7,32 +7,32 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
-      "does not show how many newer versions are available for "
-      "packages that are locked and not being upgraded", () async {
+      'does not show how many newer versions are available for '
+      'packages that are locked and not being upgraded', () async {
     await servePackages((builder) {
-      builder.serve("not_upgraded", "1.0.0");
-      builder.serve("not_upgraded", "2.0.0");
-      builder.serve("not_upgraded", "3.0.0-dev");
-      builder.serve("upgraded", "1.0.0");
-      builder.serve("upgraded", "2.0.0");
-      builder.serve("upgraded", "3.0.0-dev");
+      builder.serve('not_upgraded', '1.0.0');
+      builder.serve('not_upgraded', '2.0.0');
+      builder.serve('not_upgraded', '3.0.0-dev');
+      builder.serve('upgraded', '1.0.0');
+      builder.serve('upgraded', '2.0.0');
+      builder.serve('upgraded', '3.0.0-dev');
     });
 
     // Constraint everything to the first version.
-    await d.appDir({"not_upgraded": "1.0.0", "upgraded": "1.0.0"}).create();
+    await d.appDir({'not_upgraded': '1.0.0', 'upgraded': '1.0.0'}).create();
 
     await pubGet();
 
     // Loosen the constraints.
-    await d.appDir({"not_upgraded": "any", "upgraded": "any"}).create();
+    await d.appDir({'not_upgraded': 'any', 'upgraded': 'any'}).create();
 
     // Only upgrade "upgraded".
-    await pubUpgrade(args: ["upgraded"], output: RegExp(r"""
+    await pubUpgrade(args: ['upgraded'], output: RegExp(r'''
 Resolving dependencies\.\.\..*
   not_upgraded 1\.0\.0
 . upgraded 2\.0\.0 \(was 1\.0\.0\) \(3\.0\.0-dev available\)
-""", multiLine: true), environment: {'PUB_ALLOW_PRERELEASE_SDK': 'false'});
+''', multiLine: true), environment: {'PUB_ALLOW_PRERELEASE_SDK': 'false'});
   });
 }
diff --git a/test/upgrade/report/highlights_overrides_test.dart b/test/upgrade/report/highlights_overrides_test.dart
index 053cbaa..94608d9 100644
--- a/test/upgrade/report/highlights_overrides_test.dart
+++ b/test/upgrade/report/highlights_overrides_test.dart
@@ -7,21 +7,21 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("highlights overridden packages", () async {
-    await servePackages((builder) => builder.serve("overridden", "1.0.0"));
+void main() {
+  test('highlights overridden packages', () async {
+    await servePackages((builder) => builder.serve('overridden', '1.0.0'));
 
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dependency_overrides": {"overridden": "any"}
+        'name': 'myapp',
+        'dependency_overrides': {'overridden': 'any'}
       })
     ]).create();
 
     // Upgrade everything.
-    await pubUpgrade(output: RegExp(r"""
+    await pubUpgrade(output: RegExp(r'''
 Resolving dependencies\.\.\..*
 ! overridden 1\.0\.0 \(overridden\)
-""", multiLine: true));
+''', multiLine: true));
   });
 }
diff --git a/test/upgrade/report/leading_character_shows_change_test.dart b/test/upgrade/report/leading_character_shows_change_test.dart
index 0d77f4d..d7f870c 100644
--- a/test/upgrade/report/leading_character_shows_change_test.dart
+++ b/test/upgrade/report/leading_character_shows_change_test.dart
@@ -7,48 +7,48 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("the character before each package describes the change", () async {
+void main() {
+  test('the character before each package describes the change', () async {
     await servePackages((builder) {
-      builder.serve("added", "1.0.0");
-      builder.serve("downgraded", "1.0.0");
-      builder.serve("downgraded", "2.0.0");
-      builder.serve("overridden", "1.0.0");
-      builder.serve("removed", "1.0.0");
-      builder.serve("source_changed", "1.0.0");
-      builder.serve("upgraded", "1.0.0");
-      builder.serve("upgraded", "2.0.0");
-      builder.serve("unchanged", "1.0.0");
+      builder.serve('added', '1.0.0');
+      builder.serve('downgraded', '1.0.0');
+      builder.serve('downgraded', '2.0.0');
+      builder.serve('overridden', '1.0.0');
+      builder.serve('removed', '1.0.0');
+      builder.serve('source_changed', '1.0.0');
+      builder.serve('upgraded', '1.0.0');
+      builder.serve('upgraded', '2.0.0');
+      builder.serve('unchanged', '1.0.0');
     });
 
-    await d.dir("description_changed_1", [
-      d.libDir("description_changed"),
-      d.libPubspec("description_changed", "1.0.0")
+    await d.dir('description_changed_1', [
+      d.libDir('description_changed'),
+      d.libPubspec('description_changed', '1.0.0')
     ]).create();
 
-    await d.dir("description_changed_2", [
-      d.libDir("description_changed"),
-      d.libPubspec("description_changed", "1.0.0")
+    await d.dir('description_changed_2', [
+      d.libDir('description_changed'),
+      d.libPubspec('description_changed', '1.0.0')
     ]).create();
 
-    await d.dir("source_changed", [
-      d.libDir("source_changed"),
-      d.libPubspec("source_changed", "1.0.0")
+    await d.dir('source_changed', [
+      d.libDir('source_changed'),
+      d.libPubspec('source_changed', '1.0.0')
     ]).create();
 
     // Create the first lockfile.
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dependencies": {
-          "description_changed": {"path": "../description_changed_1"},
-          "downgraded": "2.0.0",
-          "removed": "any",
-          "source_changed": "any",
-          "unchanged": "any",
-          "upgraded": "1.0.0"
+        'name': 'myapp',
+        'dependencies': {
+          'description_changed': {'path': '../description_changed_1'},
+          'downgraded': '2.0.0',
+          'removed': 'any',
+          'source_changed': 'any',
+          'unchanged': 'any',
+          'upgraded': '1.0.0'
         },
-        "dependency_overrides": {"overridden": "any"}
+        'dependency_overrides': {'overridden': 'any'}
       })
     ]).create();
 
@@ -57,21 +57,21 @@
     // Change the pubspec.
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dependencies": {
-          "added": "any",
-          "description_changed": {"path": "../description_changed_2"},
-          "downgraded": "1.0.0",
-          "source_changed": {"path": "../source_changed"},
-          "unchanged": "any",
-          "upgraded": "2.0.0"
+        'name': 'myapp',
+        'dependencies': {
+          'added': 'any',
+          'description_changed': {'path': '../description_changed_2'},
+          'downgraded': '1.0.0',
+          'source_changed': {'path': '../source_changed'},
+          'unchanged': 'any',
+          'upgraded': '2.0.0'
         },
-        "dependency_overrides": {"overridden": "any"}
+        'dependency_overrides': {'overridden': 'any'}
       })
     ]).create();
 
     // Upgrade everything.
-    await pubUpgrade(output: RegExp(r"""
+    await pubUpgrade(output: RegExp(r'''
 Resolving dependencies\.\.\..*
 \+ added .*
 \* description_changed .*
@@ -82,6 +82,6 @@
 > upgraded .*
 These packages are no longer being depended on:
 - removed .*
-""", multiLine: true), environment: {'PUB_ALLOW_PRERELEASE_SDK': 'false'});
+''', multiLine: true), environment: {'PUB_ALLOW_PRERELEASE_SDK': 'false'});
   });
 }
diff --git a/test/upgrade/report/shows_newer_available_versions_test.dart b/test/upgrade/report/shows_newer_available_versions_test.dart
index d1ee2df..d713f44 100644
--- a/test/upgrade/report/shows_newer_available_versions_test.dart
+++ b/test/upgrade/report/shows_newer_available_versions_test.dart
@@ -7,38 +7,38 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
-  test("shows how many newer versions are available", () async {
+void main() {
+  test('shows how many newer versions are available', () async {
     await servePackages((builder) {
-      builder.serve("multiple_newer", "1.0.0");
-      builder.serve("multiple_newer", "1.0.1-unstable.1");
-      builder.serve("multiple_newer", "1.0.1");
-      builder.serve("multiple_newer", "1.0.2-unstable.1");
-      builder.serve("multiple_newer_stable", "1.0.0");
-      builder.serve("multiple_newer_stable", "1.0.1");
-      builder.serve("multiple_newer_stable", "1.0.2");
-      builder.serve("multiple_newer_unstable", "1.0.0");
-      builder.serve("multiple_newer_unstable", "1.0.1-unstable.1");
-      builder.serve("multiple_newer_unstable", "1.0.1-unstable.2");
-      builder.serve("no_newer", "1.0.0");
-      builder.serve("one_newer_unstable", "1.0.0");
-      builder.serve("one_newer_unstable", "1.0.1-unstable.1");
-      builder.serve("one_newer_stable", "1.0.0");
-      builder.serve("one_newer_stable", "1.0.1");
+      builder.serve('multiple_newer', '1.0.0');
+      builder.serve('multiple_newer', '1.0.1-unstable.1');
+      builder.serve('multiple_newer', '1.0.1');
+      builder.serve('multiple_newer', '1.0.2-unstable.1');
+      builder.serve('multiple_newer_stable', '1.0.0');
+      builder.serve('multiple_newer_stable', '1.0.1');
+      builder.serve('multiple_newer_stable', '1.0.2');
+      builder.serve('multiple_newer_unstable', '1.0.0');
+      builder.serve('multiple_newer_unstable', '1.0.1-unstable.1');
+      builder.serve('multiple_newer_unstable', '1.0.1-unstable.2');
+      builder.serve('no_newer', '1.0.0');
+      builder.serve('one_newer_unstable', '1.0.0');
+      builder.serve('one_newer_unstable', '1.0.1-unstable.1');
+      builder.serve('one_newer_stable', '1.0.0');
+      builder.serve('one_newer_stable', '1.0.1');
     });
 
     // Constraint everything to the first version.
     await d.appDir({
-      "multiple_newer": "1.0.0",
-      "multiple_newer_stable": "1.0.0",
-      "multiple_newer_unstable": "1.0.0",
-      "no_newer": "1.0.0",
-      "one_newer_unstable": "1.0.0",
-      "one_newer_stable": "1.0.0"
+      'multiple_newer': '1.0.0',
+      'multiple_newer_stable': '1.0.0',
+      'multiple_newer_unstable': '1.0.0',
+      'no_newer': '1.0.0',
+      'one_newer_unstable': '1.0.0',
+      'one_newer_stable': '1.0.0'
     }).create();
 
     // Upgrade everything.
-    await pubUpgrade(output: RegExp(r"""
+    await pubUpgrade(output: RegExp(r'''
 Resolving dependencies\.\.\..*
 . multiple_newer 1\.0\.0 \(1\.0\.1 available\)
 . multiple_newer_stable 1\.0\.0 \(1\.0\.2\ available\)
@@ -46,6 +46,6 @@
 . no_newer 1\.0\.0
 . one_newer_stable 1\.0\.0 \(1\.0\.1 available\)
 . one_newer_unstable 1\.0\.0 \(1\.0\.1-unstable\.1 available\)
-""", multiLine: true), environment: {'PUB_ALLOW_PRERELEASE_SDK': 'false'});
+''', multiLine: true), environment: {'PUB_ALLOW_PRERELEASE_SDK': 'false'});
   });
 }
diff --git a/test/upgrade/report/shows_number_of_changed_dependencies_test.dart b/test/upgrade/report/shows_number_of_changed_dependencies_test.dart
index b9ebfa9..5ba3af6 100644
--- a/test/upgrade/report/shows_number_of_changed_dependencies_test.dart
+++ b/test/upgrade/report/shows_number_of_changed_dependencies_test.dart
@@ -7,27 +7,27 @@
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
-main() {
+void main() {
   test(
-      "does not show how many newer versions are available for "
-      "packages that are locked and not being upgraded", () async {
+      'does not show how many newer versions are available for '
+      'packages that are locked and not being upgraded', () async {
     await servePackages((builder) {
-      builder.serve("a", "1.0.0");
-      builder.serve("b", "1.0.0");
-      builder.serve("c", "2.0.0");
+      builder.serve('a', '1.0.0');
+      builder.serve('b', '1.0.0');
+      builder.serve('c', '2.0.0');
     });
 
-    await d.appDir({"a": "any"}).create();
+    await d.appDir({'a': 'any'}).create();
 
     // One dependency changed.
-    await pubUpgrade(output: RegExp(r"Changed 1 dependency!$"));
+    await pubUpgrade(output: RegExp(r'Changed 1 dependency!$'));
 
     // Remove one and add two.
-    await d.appDir({"b": "any", "c": "any"}).create();
+    await d.appDir({'b': 'any', 'c': 'any'}).create();
 
-    await pubUpgrade(output: RegExp(r"Changed 3 dependencies!$"));
+    await pubUpgrade(output: RegExp(r'Changed 3 dependencies!$'));
 
     // Don't change anything.
-    await pubUpgrade(output: RegExp(r"No dependencies changed.$"));
+    await pubUpgrade(output: RegExp(r'No dependencies changed.$'));
   });
 }
diff --git a/test/utils_test.dart b/test/utils_test.dart
index 9441ec8..e7de8f0 100644
--- a/test/utils_test.dart
+++ b/test/utils_test.dart
@@ -5,7 +5,7 @@
 import 'package:pub/src/utils.dart';
 import 'package:test/test.dart';
 
-main() {
+void main() {
   group('yamlToString()', () {
     test('null', () {
       expect(yamlToString(null), equals('null'));
@@ -20,7 +20,7 @@
       expect(yamlToString('a'), equals('a'));
       expect(yamlToString('some-string'), equals('some-string'));
       expect(yamlToString('hey123CAPS'), equals('hey123CAPS'));
-      expect(yamlToString("_under_score"), equals('_under_score'));
+      expect(yamlToString('_under_score'), equals('_under_score'));
     });
 
     test('quotes other strings', () {
@@ -29,8 +29,8 @@
       expect(yamlToString('white space'), equals('"white space"'));
       expect(yamlToString('"quote"'), equals(r'"\"quote\""'));
       expect(yamlToString("apostrophe'"), equals('"apostrophe\'"'));
-      expect(yamlToString("new\nline"), equals(r'"new\nline"'));
-      expect(yamlToString("?unctu@t!on"), equals(r'"?unctu@t!on"'));
+      expect(yamlToString('new\nline'), equals(r'"new\nline"'));
+      expect(yamlToString('?unctu@t!on'), equals(r'"?unctu@t!on"'));
     });
 
     test('lists use JSON style', () {
@@ -43,79 +43,79 @@
             'a': {'b': 1, 'c': 2},
             'd': 3
           }),
-          equals("""
+          equals('''
 a:
   b: 1
   c: 2
-d: 3"""));
+d: 3'''));
     });
 
     test('sorts map keys', () {
-      expect(yamlToString({'a': 1, 'c': 2, 'b': 3, 'd': 4}), equals("""
+      expect(yamlToString({'a': 1, 'c': 2, 'b': 3, 'd': 4}), equals('''
 a: 1
 b: 3
 c: 2
-d: 4"""));
+d: 4'''));
     });
 
     test('quotes map keys as needed', () {
-      expect(yamlToString({'no': 1, 'yes!': 2, '123': 3}), equals("""
+      expect(yamlToString({'no': 1, 'yes!': 2, '123': 3}), equals('''
 "123": 3
 no: 1
-"yes!": 2"""));
+"yes!": 2'''));
     });
 
     test('handles non-string map keys', () {
       var map = {};
-      map[null] = "null";
-      map[123] = "num";
-      map[true] = "bool";
+      map[null] = 'null';
+      map[123] = 'num';
+      map[true] = 'bool';
 
-      expect(yamlToString(map), equals("""
+      expect(yamlToString(map), equals('''
 123: num
 null: null
-true: bool"""));
+true: bool'''));
     });
 
     test('handles empty maps', () {
-      expect(yamlToString({}), equals("{}"));
-      expect(yamlToString({'a': {}, 'b': {}}), equals("""
+      expect(yamlToString({}), equals('{}'));
+      expect(yamlToString({'a': {}, 'b': {}}), equals('''
 a: {}
-b: {}"""));
+b: {}'''));
     });
   });
 
   group('niceDuration()', () {
     test('formats duration longer than a minute correctly', () {
       expect(niceDuration(Duration(minutes: 3, seconds: 1, milliseconds: 337)),
-          equals("3:01.3s"));
+          equals('3:01.3s'));
     });
 
     test('does not display extra zero when duration is less than a minute', () {
       expect(niceDuration(Duration(minutes: 0, seconds: 0, milliseconds: 400)),
-          equals("0.4s"));
+          equals('0.4s'));
     });
 
     test('has reasonable output on minute boundary', () {
-      expect(niceDuration(Duration(minutes: 1)), equals("1:00.0s"));
+      expect(niceDuration(Duration(minutes: 1)), equals('1:00.0s'));
     });
   });
 
   group('uuid', () {
-    var uuidRegexp = RegExp("^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-"
-        r"[8-9A-B][0-9A-F]{3}-[0-9A-F]{12}$");
+    var uuidRegexp = RegExp('^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-'
+        r'[8-9A-B][0-9A-F]{3}-[0-9A-F]{12}$');
 
-    test("min value is valid", () {
+    test('min value is valid', () {
       var uuid = createUuid(List<int>.filled(16, 0));
       expect(uuid, matches(uuidRegexp));
-      expect(uuid, "00000000-0000-4000-8000-000000000000");
+      expect(uuid, '00000000-0000-4000-8000-000000000000');
     });
-    test("max value is valid", () {
+    test('max value is valid', () {
       var uuid = createUuid(List<int>.filled(16, 255));
       expect(uuid, matches(uuidRegexp));
-      expect(uuid, "FFFFFFFF-FFFF-4FFF-BFFF-FFFFFFFFFFFF");
+      expect(uuid, 'FFFFFFFF-FFFF-4FFF-BFFF-FFFFFFFFFFFF');
     });
-    test("random values are valid", () {
+    test('random values are valid', () {
       for (var i = 0; i < 100; i++) {
         var uuid = createUuid();
         expect(uuid, matches(uuidRegexp));
diff --git a/test/validator/changelog_test.dart b/test/validator/changelog_test.dart
index 0af40dd..c046ab5 100644
--- a/test/validator/changelog_test.dart
+++ b/test/validator/changelog_test.dart
@@ -14,7 +14,7 @@
 
 Validator changelog(Entrypoint entrypoint) => ChangelogValidator(entrypoint);
 
-main() {
+void main() {
   group('should consider a package valid if it', () {
     setUp(d.validPackage.create);
 
@@ -22,20 +22,20 @@
 
     test('has no CHANGELOG', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0"),
+        d.libPubspec('test_pkg', '1.0.0'),
       ]).create();
       expectNoValidationError(changelog);
     });
 
     test('has a CHANGELOG that includes the current package version', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0"),
-        d.file("CHANGELOG.md", """
+        d.libPubspec('test_pkg', '1.0.0'),
+        d.file('CHANGELOG.md', '''
           # 1.0.0
           
           * Solves traveling salesman problem in polynomial time.
           * Passes Turing test.
-        """),
+        '''),
       ]).create();
       expectNoValidationError(changelog);
     });
@@ -47,21 +47,21 @@
     test('has a CHANGELOG that doesn\'t include the current package version',
         () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.1"),
-        d.file("CHANGELOG.md", """
+        d.libPubspec('test_pkg', '1.0.1'),
+        d.file('CHANGELOG.md', '''
           # 1.0.0
           
           * Solves traveling salesman problem in polynomial time.
           * Passes Turing test.
-        """),
+        '''),
       ]).create();
       expectValidationWarning(changelog);
     });
 
     test('has a CHANGELOG with invalid utf-8', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0"),
-        d.file("CHANGELOG.md", [192]),
+        d.libPubspec('test_pkg', '1.0.0'),
+        d.file('CHANGELOG.md', [192]),
       ]).create();
       expectValidationWarning(changelog);
     });
diff --git a/test/validator/compiled_dartdoc_test.dart b/test/validator/compiled_dartdoc_test.dart
index 0ec89dd..78c34fb 100644
--- a/test/validator/compiled_dartdoc_test.dart
+++ b/test/validator/compiled_dartdoc_test.dart
@@ -15,7 +15,7 @@
 Validator compiledDartdoc(Entrypoint entrypoint) =>
     CompiledDartdocValidator(entrypoint);
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   group('should consider a package valid if it', () {
@@ -23,11 +23,11 @@
 
     test('has most but not all files from compiling dartdoc', () async {
       await d.dir(appPath, [
-        d.dir("doc-out", [
-          d.file("nav.json", ""),
-          d.file("index.html", ""),
-          d.file("styles.css", ""),
-          d.file("dart-logo-small.png", "")
+        d.dir('doc-out', [
+          d.file('nav.json', ''),
+          d.file('index.html', ''),
+          d.file('styles.css', ''),
+          d.file('dart-logo-small.png', '')
         ])
       ]).create();
       expectNoValidationError(compiledDartdoc);
@@ -37,7 +37,7 @@
       ensureGit();
 
       await d.dir(appPath, [
-        d.dir(".doc-out", [
+        d.dir('.doc-out', [
           d.file('nav.json', ''),
           d.file('index.html', ''),
           d.file('styles.css', ''),
@@ -52,20 +52,20 @@
       ensureGit();
 
       await d.git(appPath, [
-        d.dir("doc-out", [
+        d.dir('doc-out', [
           d.file('nav.json', ''),
           d.file('index.html', ''),
           d.file('styles.css', ''),
           d.file('dart-logo-small.png', ''),
           d.file('client-live-nav.js', '')
         ]),
-        d.file(".gitignore", "/doc-out")
+        d.file('.gitignore', '/doc-out')
       ]).create();
       expectNoValidationError(compiledDartdoc);
     });
   });
 
-  group("should consider a package invalid if it", () {
+  group('should consider a package invalid if it', () {
     test('contains compiled dartdoc', () async {
       await d.dir(appPath, [
         d.dir('doc-out', [
diff --git a/test/validator/dependency_override_test.dart b/test/validator/dependency_override_test.dart
index a86d875..f9ae01e 100644
--- a/test/validator/dependency_override_test.dart
+++ b/test/validator/dependency_override_test.dart
@@ -15,15 +15,15 @@
 Validator dependencyOverride(Entrypoint entrypoint) =>
     DependencyOverrideValidator(entrypoint);
 
-main() {
+void main() {
   test(
       'should consider a package valid if it has dev dependency '
       'overrides', () async {
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dev_dependencies": {"foo": "1.0.0"},
-        "dependency_overrides": {"foo": "<3.0.0"}
+        'name': 'myapp',
+        'dev_dependencies': {'foo': '1.0.0'},
+        'dependency_overrides': {'foo': '<3.0.0'}
       })
     ]).create();
 
@@ -34,8 +34,8 @@
     test('it has only non-dev dependency overrides', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dependency_overrides": {"foo": "<3.0.0"}
+          'name': 'myapp',
+          'dependency_overrides': {'foo': '<3.0.0'}
         })
       ]).create();
 
@@ -45,11 +45,11 @@
     test('it has any non-dev dependency overrides', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "myapp",
-          "dev_dependencies": {"foo": "1.0.0"},
-          "dependency_overrides": {
-            "foo": "<3.0.0",
-            "bar": ">3.0.0",
+          'name': 'myapp',
+          'dev_dependencies': {'foo': '1.0.0'},
+          'dependency_overrides': {
+            'foo': '<3.0.0',
+            'bar': '>3.0.0',
           }
         })
       ]).create();
diff --git a/test/validator/dependency_test.dart b/test/validator/dependency_test.dart
index 74a3da1..6ffd61f 100644
--- a/test/validator/dependency_test.dart
+++ b/test/validator/dependency_test.dart
@@ -20,12 +20,12 @@
 
 Validator dependency(Entrypoint entrypoint) => DependencyValidator(entrypoint);
 
-expectDependencyValidationError(String error) {
+void expectDependencyValidationError(String error) {
   expect(validatePackage(dependency),
       completion(pairOf(anyElement(contains(error)), isEmpty)));
 }
 
-expectDependencyValidationWarning(String warning) {
+void expectDependencyValidationWarning(String warning) {
   expect(validatePackage(dependency),
       completion(pairOf(isEmpty, anyElement(contains(warning)))));
 }
@@ -34,17 +34,17 @@
 /// [hostedVersions] of the package available.
 Future setUpDependency(Map dep, {List<String> hostedVersions}) {
   useMockClient(MockClient((request) {
-    expect(request.method, equals("GET"));
-    expect(request.url.path, equals("/api/packages/foo"));
+    expect(request.method, equals('GET'));
+    expect(request.url.path, equals('/api/packages/foo'));
 
     if (hostedVersions == null) {
-      return Future.value(http.Response("not found", 404));
+      return Future.value(http.Response('not found', 404));
     } else {
       return Future.value(http.Response(
           jsonEncode({
-            "name": "foo",
-            "uploaders": ["nweiz@google.com"],
-            "versions": hostedVersions
+            'name': 'foo',
+            'uploaders': ['nweiz@google.com'],
+            'versions': hostedVersions
                 .map((version) =>
                     packageVersionApiMap(packageMap('foo', version)))
                 .toList()
@@ -54,11 +54,11 @@
   }));
 
   return d.dir(appPath, [
-    d.libPubspec("test_pkg", "1.0.0", deps: {"foo": dep})
+    d.libPubspec('test_pkg', '1.0.0', deps: {'foo': dep})
   ]).create();
 }
 
-main() {
+void main() {
   group('should consider a package valid if it', () {
     test('looks normal', () async {
       await d.validPackage.create();
@@ -67,8 +67,8 @@
 
     test('has a ^ constraint with an appropriate SDK constraint', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0",
-            deps: {"foo": "^1.2.3"}, sdk: ">=1.8.0 <2.0.0")
+        d.libPubspec('test_pkg', '1.0.0',
+            deps: {'foo': '^1.2.3'}, sdk: '>=1.8.0 <2.0.0')
       ]).create();
       expectNoValidationError(dependency);
     });
@@ -76,16 +76,16 @@
     test('has a git path dependency with an appropriate SDK constraint',
         () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0",
+        d.libPubspec('test_pkg', '1.0.0',
             deps: {
-              "foo": {
-                "git": {
-                  "url": "git://github.com/dart-lang/foo",
-                  "path": "subdir"
+              'foo': {
+                'git': {
+                  'url': 'git://github.com/dart-lang/foo',
+                  'path': 'subdir'
                 }
               }
             },
-            sdk: ">=2.0.0 <3.0.0")
+            sdk: '>=2.0.0 <3.0.0')
       ]).create();
 
       // We should get a warning for using a git dependency, but not an error.
@@ -95,11 +95,11 @@
     test('depends on Flutter from an SDK source', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"sdk": ">=1.19.0 <2.0.0"},
-          "dependencies": {
-            "flutter": {"sdk": "flutter"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'sdk': '>=1.19.0 <2.0.0'},
+          'dependencies': {
+            'flutter': {'sdk': 'flutter'}
           }
         })
       ]).create();
@@ -112,11 +112,11 @@
         'constraint', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"sdk": ">=1.19.0 <2.0.0"},
-          "dependencies": {
-            "foo": {"sdk": "flutter", "version": ">=1.2.3 <2.0.0"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'sdk': '>=1.19.0 <2.0.0'},
+          'dependencies': {
+            'foo': {'sdk': 'flutter', 'version': '>=1.2.3 <2.0.0'}
           }
         })
       ]).create();
@@ -129,11 +129,11 @@
         'constraint', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"sdk": ">=2.0.0-dev.51.0 <2.0.0"},
-          "dependencies": {
-            "foo": {"sdk": "fuchsia", "version": ">=1.2.3 <2.0.0"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'sdk': '>=2.0.0-dev.51.0 <2.0.0'},
+          'dependencies': {
+            'foo': {'sdk': 'fuchsia', 'version': '>=1.2.3 <2.0.0'}
           }
         })
       ]).create();
@@ -147,25 +147,25 @@
 
     group('has a git dependency', () {
       group('where a hosted version exists', () {
-        test("and should suggest the hosted primary version", () async {
+        test('and should suggest the hosted primary version', () async {
           await setUpDependency({'git': 'git://github.com/dart-lang/foo'},
-              hostedVersions: ["3.0.0-pre", "2.0.0", "1.0.0"]);
+              hostedVersions: ['3.0.0-pre', '2.0.0', '1.0.0']);
           expectDependencyValidationWarning('  foo: ^2.0.0');
         });
 
         test(
-            "and should suggest the hosted prerelease version if "
+            'and should suggest the hosted prerelease version if '
             "it's the only version available", () async {
           await setUpDependency({'git': 'git://github.com/dart-lang/foo'},
-              hostedVersions: ["3.0.0-pre", "2.0.0-pre"]);
+              hostedVersions: ['3.0.0-pre', '2.0.0-pre']);
           expectDependencyValidationWarning('  foo: ^3.0.0-pre');
         });
 
         test(
-            "and should suggest a tighter constraint if primary is "
-            "pre-1.0.0", () async {
+            'and should suggest a tighter constraint if primary is '
+            'pre-1.0.0', () async {
           await setUpDependency({'git': 'git://github.com/dart-lang/foo'},
-              hostedVersions: ["0.0.1", "0.0.2"]);
+              hostedVersions: ['0.0.1', '0.0.2']);
           expectDependencyValidationWarning('  foo: ^0.0.2');
         });
       });
@@ -181,7 +181,7 @@
 
         test(
             "and should use the other source's unquoted version if "
-            "concrete", () async {
+            'concrete', () async {
           await setUpDependency(
               {'git': 'git://github.com/dart-lang/foo', 'version': '0.2.3'});
           expectDependencyValidationWarning('  foo: 0.2.3');
@@ -191,25 +191,25 @@
 
     group('has a path dependency', () {
       group('where a hosted version exists', () {
-        test("and should suggest the hosted primary version", () async {
+        test('and should suggest the hosted primary version', () async {
           await setUpDependency({'path': path.join(d.sandbox, 'foo')},
-              hostedVersions: ["3.0.0-pre", "2.0.0", "1.0.0"]);
+              hostedVersions: ['3.0.0-pre', '2.0.0', '1.0.0']);
           expectDependencyValidationError('  foo: ^2.0.0');
         });
 
         test(
-            "and should suggest the hosted prerelease version if "
+            'and should suggest the hosted prerelease version if '
             "it's the only version available", () async {
           await setUpDependency({'path': path.join(d.sandbox, 'foo')},
-              hostedVersions: ["3.0.0-pre", "2.0.0-pre"]);
+              hostedVersions: ['3.0.0-pre', '2.0.0-pre']);
           expectDependencyValidationError('  foo: ^3.0.0-pre');
         });
 
         test(
-            "and should suggest a tighter constraint if primary is "
-            "pre-1.0.0", () async {
+            'and should suggest a tighter constraint if primary is '
+            'pre-1.0.0', () async {
           await setUpDependency({'path': path.join(d.sandbox, 'foo')},
-              hostedVersions: ["0.0.1", "0.0.2"]);
+              hostedVersions: ['0.0.1', '0.0.2']);
           expectDependencyValidationError('  foo: ^0.0.2');
         });
       });
@@ -225,7 +225,7 @@
 
         test(
             "and should use the other source's unquoted version if "
-            "concrete", () async {
+            'concrete', () async {
           await setUpDependency(
               {'path': path.join(d.sandbox, 'foo'), 'version': '0.2.3'});
           expectDependencyValidationError('  foo: 0.2.3');
@@ -237,22 +237,22 @@
       group('and it should not suggest a version', () {
         test("if there's no lockfile", () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0", deps: {"foo": "any"})
+            d.libPubspec('test_pkg', '1.0.0', deps: {'foo': 'any'})
           ]).create();
 
           expect(
               validatePackage(dependency),
               completion(
-                  pairOf(isEmpty, everyElement(isNot(contains("\n  foo:"))))));
+                  pairOf(isEmpty, everyElement(isNot(contains('\n  foo:'))))));
         });
 
         test(
             "if the lockfile doesn't have an entry for the "
-            "dependency", () async {
+            'dependency', () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0", deps: {"foo": "any"}),
+            d.libPubspec('test_pkg', '1.0.0', deps: {'foo': 'any'}),
             d.file(
-                "pubspec.lock",
+                'pubspec.lock',
                 jsonEncode({
                   'packages': {
                     'bar': {
@@ -270,7 +270,7 @@
           expect(
               validatePackage(dependency),
               completion(
-                  pairOf(isEmpty, everyElement(isNot(contains("\n  foo:"))))));
+                  pairOf(isEmpty, everyElement(isNot(contains('\n  foo:'))))));
         });
       });
 
@@ -279,9 +279,9 @@
             'and it should suggest a constraint based on the locked '
             'version', () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0", deps: {"foo": "any"}),
+            d.libPubspec('test_pkg', '1.0.0', deps: {'foo': 'any'}),
             d.file(
-                "pubspec.lock",
+                'pubspec.lock',
                 jsonEncode({
                   'packages': {
                     'foo': {
@@ -303,9 +303,9 @@
             'and it should suggest a concrete constraint if the locked '
             'version is pre-1.0.0', () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0", deps: {"foo": "any"}),
+            d.libPubspec('test_pkg', '1.0.0', deps: {'foo': 'any'}),
             d.file(
-                "pubspec.lock",
+                'pubspec.lock',
                 jsonEncode({
                   'packages': {
                     'foo': {
@@ -329,7 +329,7 @@
         'with a single-version dependency and it should suggest a '
         'constraint based on the version', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0", deps: {"foo": "1.2.3"})
+        d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '1.2.3'})
       ]).create();
 
       expectDependencyValidationWarning('  foo: ^1.2.3');
@@ -339,22 +339,22 @@
       group('and it should not suggest a version', () {
         test("if there's no lockfile", () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0", deps: {"foo": "<3.0.0"})
+            d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '<3.0.0'})
           ]).create();
 
           expect(
               validatePackage(dependency),
               completion(
-                  pairOf(isEmpty, everyElement(isNot(contains("\n  foo:"))))));
+                  pairOf(isEmpty, everyElement(isNot(contains('\n  foo:'))))));
         });
 
         test(
             "if the lockfile doesn't have an entry for the "
-            "dependency", () async {
+            'dependency', () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0", deps: {"foo": "<3.0.0"}),
+            d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '<3.0.0'}),
             d.file(
-                "pubspec.lock",
+                'pubspec.lock',
                 jsonEncode({
                   'packages': {
                     'bar': {
@@ -372,7 +372,7 @@
           expect(
               validatePackage(dependency),
               completion(
-                  pairOf(isEmpty, everyElement(isNot(contains("\n  foo:"))))));
+                  pairOf(isEmpty, everyElement(isNot(contains('\n  foo:'))))));
         });
       });
 
@@ -381,9 +381,9 @@
             'and it should suggest a constraint based on the locked '
             'version', () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0", deps: {"foo": "<3.0.0"}),
+            d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '<3.0.0'}),
             d.file(
-                "pubspec.lock",
+                'pubspec.lock',
                 jsonEncode({
                   'packages': {
                     'foo': {
@@ -403,9 +403,9 @@
 
         test('and it should preserve the upper-bound operator', () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0", deps: {"foo": "<=3.0.0"}),
+            d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '<=3.0.0'}),
             d.file(
-                "pubspec.lock",
+                'pubspec.lock',
                 jsonEncode({
                   'packages': {
                     'foo': {
@@ -427,9 +427,9 @@
             'and it should expand the suggested constraint if the '
             'locked version matches the upper bound', () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0", deps: {"foo": "<=1.2.3"}),
+            d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '<=1.2.3'}),
             d.file(
-                "pubspec.lock",
+                'pubspec.lock',
                 jsonEncode({
                   'packages': {
                     'foo': {
@@ -453,7 +453,7 @@
       test('and it should suggest a constraint based on the lower bound',
           () async {
         await d.dir(appPath, [
-          d.libPubspec("test_pkg", "1.0.0", deps: {"foo": ">=1.2.3"})
+          d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '>=1.2.3'})
         ]).create();
 
         expectDependencyValidationWarning('  foo: ^1.2.3');
@@ -461,7 +461,7 @@
 
       test('and it should preserve the lower-bound operator', () async {
         await d.dir(appPath, [
-          d.libPubspec("test_pkg", "1.0.0", deps: {"foo": ">1.2.3"})
+          d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '>1.2.3'})
         ]).create();
 
         expectDependencyValidationWarning('  foo: ">1.2.3 <2.0.0"');
@@ -469,18 +469,18 @@
     });
 
     group('has a ^ dependency', () {
-      test("without an SDK constraint", () async {
+      test('without an SDK constraint', () async {
         await d.dir(appPath, [
-          d.libPubspec("integration_pkg", "1.0.0", deps: {"foo": "^1.2.3"})
+          d.libPubspec('integration_pkg', '1.0.0', deps: {'foo': '^1.2.3'})
         ]).create();
 
         expectDependencyValidationError('  sdk: ">=1.8.0 <2.0.0"');
       });
 
-      test("with a too-broad SDK constraint", () async {
+      test('with a too-broad SDK constraint', () async {
         await d.dir(appPath, [
-          d.libPubspec("test_pkg", "1.0.0",
-              deps: {"foo": "^1.2.3"}, sdk: ">=1.5.0 <2.0.0")
+          d.libPubspec('test_pkg', '1.0.0',
+              deps: {'foo': '^1.2.3'}, sdk: '>=1.5.0 <2.0.0')
         ]).create();
 
         expectDependencyValidationError('  sdk: ">=1.8.0 <2.0.0"');
@@ -488,11 +488,11 @@
     });
 
     group('has a git path dependency', () {
-      test("without an SDK constraint", () async {
+      test('without an SDK constraint', () async {
         await d.dir(appPath, [
-          d.libPubspec("integration_pkg", "1.0.0", deps: {
-            "foo": {
-              "git": {"url": "git://github.com/dart-lang/foo", "path": "subdir"}
+          d.libPubspec('integration_pkg', '1.0.0', deps: {
+            'foo': {
+              'git': {'url': 'git://github.com/dart-lang/foo', 'path': 'subdir'}
             }
           })
         ]).create();
@@ -503,18 +503,18 @@
                 anyElement(contains('  foo: any')))));
       });
 
-      test("with a too-broad SDK constraint", () async {
+      test('with a too-broad SDK constraint', () async {
         await d.dir(appPath, [
-          d.libPubspec("integration_pkg", "1.0.0",
+          d.libPubspec('integration_pkg', '1.0.0',
               deps: {
-                "foo": {
-                  "git": {
-                    "url": "git://github.com/dart-lang/foo",
-                    "path": "subdir"
+                'foo': {
+                  'git': {
+                    'url': 'git://github.com/dart-lang/foo',
+                    'path': 'subdir'
                   }
                 }
               },
-              sdk: ">=1.24.0 <3.0.0")
+              sdk: '>=1.24.0 <3.0.0')
         ]).create();
 
         expect(
@@ -526,50 +526,50 @@
 
     test('has a feature dependency', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0", deps: {
-          "foo": {
-            "version": "^1.2.3",
-            "features": {"stuff": true}
+        d.libPubspec('test_pkg', '1.0.0', deps: {
+          'foo': {
+            'version': '^1.2.3',
+            'features': {'stuff': true}
           }
         })
       ]).create();
 
       expectDependencyValidationError(
-          "Packages with package features may not be published yet.");
+          'Packages with package features may not be published yet.');
     });
 
     test('declares a feature', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "features": {
-            "stuff": {
-              "dependencies": {"foo": "^1.0.0"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'features': {
+            'stuff': {
+              'dependencies': {'foo': '^1.0.0'}
             }
           }
         })
       ]).create();
 
       expectDependencyValidationError(
-          "Packages with package features may not be published yet.");
+          'Packages with package features may not be published yet.');
     });
 
     test('depends on Flutter from a non-SDK source', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0", deps: {"flutter": ">=1.2.3 <2.0.0"})
+        d.libPubspec('test_pkg', '1.0.0', deps: {'flutter': '>=1.2.3 <2.0.0'})
       ]).create();
 
       expectDependencyValidationError('sdk: >=1.2.3 <2.0.0');
     });
 
-    test("depends on a Flutter package from an unknown SDK", () async {
+    test('depends on a Flutter package from an unknown SDK', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "dependencies": {
-            "foo": {"sdk": "fblthp", "version": ">=1.2.3 <2.0.0"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'dependencies': {
+            'foo': {'sdk': 'fblthp', 'version': '>=1.2.3 <2.0.0'}
           }
         })
       ]).create();
@@ -578,15 +578,15 @@
           'Unknown SDK "fblthp" for dependency "foo".');
     });
 
-    test("depends on a Flutter package with a too-broad SDK constraint",
+    test('depends on a Flutter package with a too-broad SDK constraint',
         () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"sdk": ">=1.18.0 <2.0.0"},
-          "dependencies": {
-            "foo": {"sdk": "flutter", "version": ">=1.2.3 <2.0.0"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'sdk': '>=1.18.0 <2.0.0'},
+          'dependencies': {
+            'foo': {'sdk': 'flutter', 'version': '>=1.2.3 <2.0.0'}
           }
         })
       ]).create();
@@ -594,13 +594,13 @@
       expectDependencyValidationError('sdk: ">=1.19.0 <2.0.0"');
     });
 
-    test("depends on a Flutter package with no SDK constraint", () async {
+    test('depends on a Flutter package with no SDK constraint', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "dependencies": {
-            "foo": {"sdk": "flutter", "version": ">=1.2.3 <2.0.0"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'dependencies': {
+            'foo': {'sdk': 'flutter', 'version': '>=1.2.3 <2.0.0'}
           }
         })
       ]).create();
@@ -608,15 +608,15 @@
       expectDependencyValidationError('sdk: ">=1.19.0 <2.0.0"');
     });
 
-    test("depends on a Fuchsia package with a too-broad SDK constraint",
+    test('depends on a Fuchsia package with a too-broad SDK constraint',
         () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"sdk": ">=2.0.0-dev.50.0 <2.0.0"},
-          "dependencies": {
-            "foo": {"sdk": "fuchsia", "version": ">=1.2.3 <2.0.0"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'sdk': '>=2.0.0-dev.50.0 <2.0.0'},
+          'dependencies': {
+            'foo': {'sdk': 'fuchsia', 'version': '>=1.2.3 <2.0.0'}
           }
         })
       ]).create();
@@ -624,13 +624,13 @@
       expectDependencyValidationError('sdk: ">=2.0.0 <3.0.0"');
     });
 
-    test("depends on a Fuchsia package with no SDK constraint", () async {
+    test('depends on a Fuchsia package with no SDK constraint', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "dependencies": {
-            "foo": {"sdk": "fuchsia", "version": ">=1.2.3 <2.0.0"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'dependencies': {
+            'foo': {'sdk': 'fuchsia', 'version': '>=1.2.3 <2.0.0'}
           }
         })
       ]).create();
diff --git a/test/validator/deprecated_fields_test.dart b/test/validator/deprecated_fields_test.dart
index 2682918..213ec56 100644
--- a/test/validator/deprecated_fields_test.dart
+++ b/test/validator/deprecated_fields_test.dart
@@ -15,7 +15,7 @@
 Validator deprecatedFields(Entrypoint entrypoint) =>
     DeprecatedFieldsValidator(entrypoint);
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   test('should not warn if neither transformers or web is included', () {
diff --git a/test/validator/directory_test.dart b/test/validator/directory_test.dart
index a971ff6..13a110a 100644
--- a/test/validator/directory_test.dart
+++ b/test/validator/directory_test.dart
@@ -14,7 +14,7 @@
 
 Validator directory(Entrypoint entrypoint) => DirectoryValidator(entrypoint);
 
-main() {
+void main() {
   group('should consider a package valid if it', () {
     setUp(d.validPackage.create);
 
@@ -22,7 +22,7 @@
 
     test('has a nested directory named "tools"', () async {
       await d.dir(appPath, [
-        d.dir("foo", [d.dir("tools")])
+        d.dir('foo', [d.dir('tools')])
       ]).create();
       expectNoValidationError(directory);
     });
@@ -34,13 +34,13 @@
     setUp(d.validPackage.create);
 
     var names = [
-      "benchmarks",
-      "docs",
-      "examples",
-      "sample",
-      "samples",
-      "tests",
-      "tools"
+      'benchmarks',
+      'docs',
+      'examples',
+      'sample',
+      'samples',
+      'tests',
+      'tools'
     ];
 
     for (var name in names) {
diff --git a/test/validator/executable_test.dart b/test/validator/executable_test.dart
index 79866f5..fa32d58 100644
--- a/test/validator/executable_test.dart
+++ b/test/validator/executable_test.dart
@@ -14,33 +14,33 @@
 
 Validator executable(Entrypoint entrypoint) => ExecutableValidator(entrypoint);
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   group('should consider a package valid if it', () {
     test('has executables that are present', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "executables": {"one": "one_script", "two": null}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'executables': {'one': 'one_script', 'two': null}
         }),
-        d.dir("bin", [
-          d.file("one_script.dart", "main() => print('ok');"),
-          d.file("two.dart", "main() => print('ok');")
+        d.dir('bin', [
+          d.file('one_script.dart', "main() => print('ok');"),
+          d.file('two.dart', "main() => print('ok');")
         ])
       ]).create();
       expectNoValidationError(executable);
     });
   });
 
-  group("should consider a package invalid if it", () {
+  group('should consider a package invalid if it', () {
     test('is missing one or more listed executables', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "executables": {"nope": "not_there", "nada": null}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'executables': {'nope': 'not_there', 'nada': null}
         })
       ]).create();
       expectValidationWarning(executable);
@@ -49,15 +49,15 @@
     test('has .gitignored one or more listed executables', () async {
       await d.git(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "executables": {"one": "one_script", "two": null}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'executables': {'one': 'one_script', 'two': null}
         }),
-        d.dir("bin", [
-          d.file("one_script.dart", "main() => print('ok');"),
-          d.file("two.dart", "main() => print('ok');")
+        d.dir('bin', [
+          d.file('one_script.dart', "main() => print('ok');"),
+          d.file('two.dart', "main() => print('ok');")
         ]),
-        d.file(".gitignore", "bin")
+        d.file('.gitignore', 'bin')
       ]).create();
       expectValidationWarning(executable);
     });
diff --git a/test/validator/flutter_plugin_format_test.dart b/test/validator/flutter_plugin_format_test.dart
index 5d5f2b5..61d8309 100644
--- a/test/validator/flutter_plugin_format_test.dart
+++ b/test/validator/flutter_plugin_format_test.dart
@@ -15,51 +15,51 @@
 Validator flutterPluginFormat(Entrypoint entrypoint) =>
     FlutterPluginFormatValidator(entrypoint);
 
-main() {
+void main() {
   group('should consider a package valid if it', () {
     setUp(d.validPackage.create);
 
     test('looks normal', () => expectNoValidationError(flutterPluginFormat));
 
     test('is a Flutter 1.9.0 package', () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {
-        "flutter": {"sdk": "flutter"},
+      var pkg = packageMap('test_pkg', '1.0.0', {
+        'flutter': {'sdk': 'flutter'},
       }, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
-        "flutter": ">=1.9.0 <2.0.0",
+        'sdk': '>=2.0.0 <3.0.0',
+        'flutter': '>=1.9.0 <2.0.0',
       });
       await d.dir(appPath, [d.pubspec(pkg)]).create();
       expectNoValidationError(flutterPluginFormat);
     });
 
     test('is a Flutter 1.10.0 package', () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {
-        "flutter": {"sdk": "flutter"},
+      var pkg = packageMap('test_pkg', '1.0.0', {
+        'flutter': {'sdk': 'flutter'},
       }, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
-        "flutter": ">=1.10.0 <2.0.0",
+        'sdk': '>=2.0.0 <3.0.0',
+        'flutter': '>=1.10.0 <2.0.0',
       });
       await d.dir(appPath, [d.pubspec(pkg)]).create();
       expectNoValidationError(flutterPluginFormat);
     });
 
     test('is a Flutter 1.10.0-0 package', () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {
-        "flutter": {"sdk": "flutter"},
+      var pkg = packageMap('test_pkg', '1.0.0', {
+        'flutter': {'sdk': 'flutter'},
       }, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
-        "flutter": ">=1.10.0-0 <2.0.0",
+        'sdk': '>=2.0.0 <3.0.0',
+        'flutter': '>=1.10.0-0 <2.0.0',
       });
       await d.dir(appPath, [d.pubspec(pkg)]).create();
       expectNoValidationError(flutterPluginFormat);
     });
 
     test('is a flutter 1.10.0 plugin with the new format', () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {
-        "flutter": {"sdk": "flutter"},
+      var pkg = packageMap('test_pkg', '1.0.0', {
+        'flutter': {'sdk': 'flutter'},
       }, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
-        "flutter": ">=1.10.0 <2.0.0",
+        'sdk': '>=2.0.0 <3.0.0',
+        'flutter': '>=1.10.0 <2.0.0',
       });
       pkg['flutter'] = {
         'plugin': {
@@ -80,11 +80,11 @@
     setUp(d.validPackage.create);
 
     test('is a flutter plugin with old and new format', () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {
-        "flutter": {"sdk": "flutter"},
+      var pkg = packageMap('test_pkg', '1.0.0', {
+        'flutter': {'sdk': 'flutter'},
       }, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
-        "flutter": ">=1.9.0 <2.0.0",
+        'sdk': '>=2.0.0 <3.0.0',
+        'flutter': '>=1.9.0 <2.0.0',
       });
       pkg['flutter'] = {
         'plugin': {
@@ -104,11 +104,11 @@
     });
 
     test('is a flutter 1.9.0 plugin with old format', () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {
-        "flutter": {"sdk": "flutter"},
+      var pkg = packageMap('test_pkg', '1.0.0', {
+        'flutter': {'sdk': 'flutter'},
       }, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
-        "flutter": ">=1.9.0 <2.0.0",
+        'sdk': '>=2.0.0 <3.0.0',
+        'flutter': '>=1.9.0 <2.0.0',
       });
       pkg['flutter'] = {
         'plugin': {
@@ -122,11 +122,11 @@
     });
 
     test('is a flutter 1.9.0 plugin with new format', () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {
-        "flutter": {"sdk": "flutter"},
+      var pkg = packageMap('test_pkg', '1.0.0', {
+        'flutter': {'sdk': 'flutter'},
       }, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
-        "flutter": ">=1.9.0 <2.0.0",
+        'sdk': '>=2.0.0 <3.0.0',
+        'flutter': '>=1.9.0 <2.0.0',
       });
       pkg['flutter'] = {
         'plugin': {
@@ -145,10 +145,10 @@
     test(
         'is a flutter plugin with only implicit flutter sdk version constraint and the new format',
         () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {
-        "flutter": {"sdk": "flutter"},
+      var pkg = packageMap('test_pkg', '1.0.0', {
+        'flutter': {'sdk': 'flutter'},
       }, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
+        'sdk': '>=2.0.0 <3.0.0',
       });
       pkg['flutter'] = {
         'plugin': {
@@ -165,8 +165,8 @@
     });
 
     test('is a non-flutter package with using the new format', () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {}, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
+      var pkg = packageMap('test_pkg', '1.0.0', {}, {}, {
+        'sdk': '>=2.0.0 <3.0.0',
       });
       pkg['flutter'] = {
         'plugin': {
@@ -183,11 +183,11 @@
     });
 
     test('is a flutter 1.8.0 plugin with new format', () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {
-        "flutter": {"sdk": "flutter"},
+      var pkg = packageMap('test_pkg', '1.0.0', {
+        'flutter': {'sdk': 'flutter'},
       }, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
-        "flutter": ">=1.8.0 <2.0.0",
+        'sdk': '>=2.0.0 <3.0.0',
+        'flutter': '>=1.8.0 <2.0.0',
       });
       pkg['flutter'] = {
         'plugin': {
@@ -204,11 +204,11 @@
     });
 
     test('is a flutter 1.9.999 plugin with new format', () async {
-      var pkg = packageMap("test_pkg", "1.0.0", {
-        "flutter": {"sdk": "flutter"},
+      var pkg = packageMap('test_pkg', '1.0.0', {
+        'flutter': {'sdk': 'flutter'},
       }, {}, {
-        "sdk": ">=2.0.0 <3.0.0",
-        "flutter": ">=1.9.999 <2.0.0",
+        'sdk': '>=2.0.0 <3.0.0',
+        'flutter': '>=1.9.999 <2.0.0',
       });
       pkg['flutter'] = {
         'plugin': {
diff --git a/test/validator/license_test.dart b/test/validator/license_test.dart
index b5e5bf4..33726cb 100644
--- a/test/validator/license_test.dart
+++ b/test/validator/license_test.dart
@@ -16,7 +16,7 @@
 
 Validator license(Entrypoint entrypoint) => LicenseValidator(entrypoint);
 
-main() {
+void main() {
   group('should consider a package valid if it', () {
     setUp(d.validPackage.create);
 
@@ -62,7 +62,7 @@
     });
 
     test('has a .gitignored LICENSE file', () async {
-      var repo = d.git(appPath, [d.file(".gitignore", "LICENSE")]);
+      var repo = d.git(appPath, [d.file('.gitignore', 'LICENSE')]);
       await d.validPackage.create();
       await repo.create();
       expectValidationError(license);
diff --git a/test/validator/name_test.dart b/test/validator/name_test.dart
index 3ba3ebf..5acd257 100644
--- a/test/validator/name_test.dart
+++ b/test/validator/name_test.dart
@@ -16,7 +16,7 @@
 
 Validator name(Entrypoint entrypoint) => NameValidator(entrypoint);
 
-main() {
+void main() {
   group('should consider a package valid if it', () {
     setUp(d.validPackage.create);
 
@@ -24,10 +24,10 @@
 
     test('has dots in potential library names', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0"),
-        d.dir("lib", [
-          d.file("test_pkg.dart", "int i = 1;"),
-          d.file("test_pkg.g.dart", "int j = 2;")
+        d.libPubspec('test_pkg', '1.0.0'),
+        d.dir('lib', [
+          d.file('test_pkg.dart', 'int i = 1;'),
+          d.file('test_pkg.g.dart', 'int j = 2;')
         ])
       ]).create();
       expectNoValidationError(name);
@@ -35,8 +35,8 @@
 
     test('has a name that starts with an underscore', () async {
       await d.dir(appPath, [
-        d.libPubspec("_test_pkg", "1.0.0"),
-        d.dir("lib", [d.file("_test_pkg.dart", "int i = 1;")])
+        d.libPubspec('_test_pkg', '1.0.0'),
+        d.dir('lib', [d.file('_test_pkg.dart', 'int i = 1;')])
       ]).create();
       expectNoValidationError(name);
     });
@@ -46,14 +46,14 @@
     setUp(d.validPackage.create);
 
     test('has a package name that contains upper-case letters', () async {
-      await d.dir(appPath, [d.libPubspec("TestPkg", "1.0.0")]).create();
+      await d.dir(appPath, [d.libPubspec('TestPkg', '1.0.0')]).create();
       expectValidationWarning(name);
     });
 
     test('has a single library named differently than the package', () async {
-      deleteEntry(path.join(d.sandbox, appPath, "lib", "test_pkg.dart"));
+      deleteEntry(path.join(d.sandbox, appPath, 'lib', 'test_pkg.dart'));
       await d.dir(appPath, [
-        d.dir("lib", [d.file("best_pkg.dart", "int i = 0;")])
+        d.dir('lib', [d.file('best_pkg.dart', 'int i = 0;')])
       ]).create();
       expectValidationWarning(name);
     });
diff --git a/test/validator/pubspec_field_test.dart b/test/validator/pubspec_field_test.dart
index b364dca..b17fdfe 100644
--- a/test/validator/pubspec_field_test.dart
+++ b/test/validator/pubspec_field_test.dart
@@ -15,23 +15,23 @@
 Validator pubspecField(Entrypoint entrypoint) =>
     PubspecFieldValidator(entrypoint);
 
-main() {
+void main() {
   group('should consider a package valid if it', () {
     setUp(d.validPackage.create);
 
     test('looks normal', () => expectNoValidationError(pubspecField));
 
     test('has an HTTPS homepage URL', () async {
-      var pkg = packageMap("test_pkg", "1.0.0");
-      pkg["homepage"] = "https://pub.dartlang.org";
+      var pkg = packageMap('test_pkg', '1.0.0');
+      pkg['homepage'] = 'https://pub.dartlang.org';
       await d.dir(appPath, [d.pubspec(pkg)]).create();
 
       expectNoValidationError(pubspecField);
     });
 
     test('has an HTTPS documentation URL', () async {
-      var pkg = packageMap("test_pkg", "1.0.0");
-      pkg["documentation"] = "https://pub.dartlang.org";
+      var pkg = packageMap('test_pkg', '1.0.0');
+      pkg['documentation'] = 'https://pub.dartlang.org';
       await d.dir(appPath, [d.pubspec(pkg)]).create();
 
       expectNoValidationError(pubspecField);
@@ -42,48 +42,48 @@
     setUp(d.validPackage.create);
 
     test('is missing the "homepage" field', () async {
-      var pkg = packageMap("test_pkg", "1.0.0");
-      pkg.remove("homepage");
+      var pkg = packageMap('test_pkg', '1.0.0');
+      pkg.remove('homepage');
       await d.dir(appPath, [d.pubspec(pkg)]).create();
 
       expectValidationError(pubspecField);
     });
 
     test('is missing the "description" field', () async {
-      var pkg = packageMap("test_pkg", "1.0.0");
-      pkg.remove("description");
+      var pkg = packageMap('test_pkg', '1.0.0');
+      pkg.remove('description');
       await d.dir(appPath, [d.pubspec(pkg)]).create();
 
       expectValidationError(pubspecField);
     });
 
     test('has a non-string "homepage" field', () async {
-      var pkg = packageMap("test_pkg", "1.0.0");
-      pkg["homepage"] = 12;
+      var pkg = packageMap('test_pkg', '1.0.0');
+      pkg['homepage'] = 12;
       await d.dir(appPath, [d.pubspec(pkg)]).create();
 
       expectValidationError(pubspecField);
     });
 
     test('has a non-string "description" field', () async {
-      var pkg = packageMap("test_pkg", "1.0.0");
-      pkg["description"] = 12;
+      var pkg = packageMap('test_pkg', '1.0.0');
+      pkg['description'] = 12;
       await d.dir(appPath, [d.pubspec(pkg)]).create();
 
       expectValidationError(pubspecField);
     });
 
     test('has a non-HTTP homepage URL', () async {
-      var pkg = packageMap("test_pkg", "1.0.0");
-      pkg["homepage"] = "file:///foo/bar";
+      var pkg = packageMap('test_pkg', '1.0.0');
+      pkg['homepage'] = 'file:///foo/bar';
       await d.dir(appPath, [d.pubspec(pkg)]).create();
 
       expectValidationError(pubspecField);
     });
 
     test('has a non-HTTP documentation URL', () async {
-      var pkg = packageMap("test_pkg", "1.0.0");
-      pkg["documentation"] = "file:///foo/bar";
+      var pkg = packageMap('test_pkg', '1.0.0');
+      pkg['documentation'] = 'file:///foo/bar';
       await d.dir(appPath, [d.pubspec(pkg)]).create();
 
       expectValidationError(pubspecField);
diff --git a/test/validator/pubspec_test.dart b/test/validator/pubspec_test.dart
index 48ba1a4..3e61b3a 100644
--- a/test/validator/pubspec_test.dart
+++ b/test/validator/pubspec_test.dart
@@ -10,7 +10,7 @@
 import '../test_pub.dart';
 import 'utils.dart';
 
-main() {
+void main() {
   test('should consider a package valid if it has a pubspec', () async {
     await d.validPackage.create();
 
@@ -20,7 +20,7 @@
   test(
       'should consider a package invalid if it has a .gitignored '
       'pubspec', () async {
-    var repo = d.git(appPath, [d.file(".gitignore", "pubspec.yaml")]);
+    var repo = d.git(appPath, [d.file('.gitignore', 'pubspec.yaml')]);
     await d.validPackage.create();
     await repo.create();
 
diff --git a/test/validator/readme_test.dart b/test/validator/readme_test.dart
index 513cd3a..7eeb834 100644
--- a/test/validator/readme_test.dart
+++ b/test/validator/readme_test.dart
@@ -16,30 +16,30 @@
 
 Validator readme(Entrypoint entrypoint) => ReadmeValidator(entrypoint);
 
-main() {
+void main() {
   setUp(d.validPackage.create);
 
   group('should consider a package valid if it', () {
     test('looks normal', () => expectNoValidationError(readme));
 
     test('has a non-primary readme', () async {
-      deleteEntry(p.join(d.sandbox, "myapp/README.md"));
+      deleteEntry(p.join(d.sandbox, 'myapp/README.md'));
 
-      await d.dir(appPath, [d.file("README.whatever")]).create();
+      await d.dir(appPath, [d.file('README.whatever')]).create();
       expectNoValidationError(readme);
     });
 
     test('has a non-primary readme with invalid utf-8', () async {
       await d.dir(appPath, [
-        d.file("README.x.y.z", [192])
+        d.file('README.x.y.z', [192])
       ]).create();
       expectNoValidationError(readme);
     });
 
     test('has a gitignored README with invalid utf-8', () async {
       var repo = d.git(appPath, [
-        d.file("README", [192]),
-        d.file(".gitignore", "README")
+        d.file('README', [192]),
+        d.file('.gitignore', 'README')
       ]);
       await repo.create();
       expectNoValidationError(readme);
@@ -48,18 +48,18 @@
 
   group('should consider a package invalid if it', () {
     test('has no README', () {
-      deleteEntry(p.join(d.sandbox, "myapp/README.md"));
+      deleteEntry(p.join(d.sandbox, 'myapp/README.md'));
       expectValidationWarning(readme);
     });
 
     test('has only a .gitignored README', () async {
-      await d.git(appPath, [d.file(".gitignore", "README.md")]).create();
+      await d.git(appPath, [d.file('.gitignore', 'README.md')]).create();
       expectValidationWarning(readme);
     });
 
     test('has a primary README with invalid utf-8', () async {
       await d.dir(appPath, [
-        d.file("README", [192])
+        d.file('README', [192])
       ]).create();
       expectValidationWarning(readme);
     });
diff --git a/test/validator/sdk_constraint_test.dart b/test/validator/sdk_constraint_test.dart
index 38010a8..554df49 100644
--- a/test/validator/sdk_constraint_test.dart
+++ b/test/validator/sdk_constraint_test.dart
@@ -15,7 +15,7 @@
 Validator sdkConstraint(Entrypoint entrypoint) =>
     SdkConstraintValidator(entrypoint);
 
-main() {
+void main() {
   group('should consider a package valid if it', () {
     test('has no SDK constraint', () async {
       await d.validPackage.create();
@@ -24,7 +24,7 @@
 
     test('has an SDK constraint without ^', () async {
       await d.dir(appPath,
-          [d.libPubspec("test_pkg", "1.0.0", sdk: ">=1.8.0 <2.0.0")]).create();
+          [d.libPubspec('test_pkg', '1.0.0', sdk: '>=1.8.0 <2.0.0')]).create();
       expectNoValidationError(sdkConstraint);
     });
 
@@ -33,9 +33,9 @@
         'constraint', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"sdk": ">=1.19.0 <2.0.0", "flutter": "^1.2.3"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'sdk': '>=1.19.0 <2.0.0', 'flutter': '^1.2.3'}
         })
       ]).create();
       expectNoValidationError(sdkConstraint);
@@ -46,28 +46,28 @@
         'constraint', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"sdk": ">=2.0.0-dev.51.0 <2.0.0", "fuchsia": "^1.2.3"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'sdk': '>=2.0.0-dev.51.0 <2.0.0', 'fuchsia': '^1.2.3'}
         })
       ]).create();
       expectNoValidationError(sdkConstraint);
     });
   });
 
-  group("should consider a package invalid if it", () {
-    test("has an SDK constraint with ^", () async {
+  group('should consider a package invalid if it', () {
+    test('has an SDK constraint with ^', () async {
       await d.dir(
-          appPath, [d.libPubspec("test_pkg", "1.0.0", sdk: "^1.8.0")]).create();
+          appPath, [d.libPubspec('test_pkg', '1.0.0', sdk: '^1.8.0')]).create();
       expect(
           validatePackage(sdkConstraint),
           completion(
               pairOf(anyElement(contains('">=1.8.0 <2.0.0"')), isEmpty)));
     });
 
-    test("has no upper bound SDK constraint", () async {
+    test('has no upper bound SDK constraint', () async {
       await d.dir(appPath,
-          [d.libPubspec("test_pkg", "1.0.0", sdk: ">=1.8.0")]).create();
+          [d.libPubspec('test_pkg', '1.0.0', sdk: '>=1.8.0')]).create();
       expect(
           validatePackage(sdkConstraint),
           completion(pairOf(
@@ -75,8 +75,8 @@
               isEmpty)));
     });
 
-    test("has no SDK constraint", () async {
-      await d.dir(appPath, [d.libPubspec("test_pkg", "1.0.0")]).create();
+    test('has no SDK constraint', () async {
+      await d.dir(appPath, [d.libPubspec('test_pkg', '1.0.0')]).create();
       expect(
           validatePackage(sdkConstraint),
           completion(pairOf(
@@ -85,13 +85,13 @@
     });
 
     test(
-        "has a Flutter SDK constraint with a too-broad SDK "
-        "constraint", () async {
+        'has a Flutter SDK constraint with a too-broad SDK '
+        'constraint', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"sdk": ">=1.18.0 <1.50.0", "flutter": "^1.2.3"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'sdk': '>=1.18.0 <1.50.0', 'flutter': '^1.2.3'}
         })
       ]).create();
       expect(
@@ -100,12 +100,12 @@
               pairOf(anyElement(contains('">=1.19.0 <1.50.0"')), isEmpty)));
     });
 
-    test("has a Flutter SDK constraint with no SDK constraint", () async {
+    test('has a Flutter SDK constraint with no SDK constraint', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"flutter": "^1.2.3"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'flutter': '^1.2.3'}
         })
       ]).create();
       expect(
@@ -115,13 +115,13 @@
     });
 
     test(
-        "has a Fuchsia SDK constraint with a too-broad SDK "
-        "constraint", () async {
+        'has a Fuchsia SDK constraint with a too-broad SDK '
+        'constraint', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"sdk": ">=2.0.0-dev.50.0 <2.0.0", "fuchsia": "^1.2.3"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'sdk': '>=2.0.0-dev.50.0 <2.0.0', 'fuchsia': '^1.2.3'}
         })
       ]).create();
       expect(
@@ -130,12 +130,12 @@
               pairOf(anyElement(contains('">=2.0.0 <3.0.0"')), isEmpty)));
     });
 
-    test("has a Fuchsia SDK constraint with no SDK constraint", () async {
+    test('has a Fuchsia SDK constraint with no SDK constraint', () async {
       await d.dir(appPath, [
         d.pubspec({
-          "name": "test_pkg",
-          "version": "1.0.0",
-          "environment": {"fuchsia": "^1.2.3"}
+          'name': 'test_pkg',
+          'version': '1.0.0',
+          'environment': {'fuchsia': '^1.2.3'}
         })
       ]).create();
       expect(
diff --git a/test/validator/size_test.dart b/test/validator/size_test.dart
index 7bdea31..838b082 100644
--- a/test/validator/size_test.dart
+++ b/test/validator/size_test.dart
@@ -17,12 +17,12 @@
   return (entrypoint) => SizeValidator(entrypoint, Future.value(size));
 }
 
-expectSizeValidationError(Matcher matcher) {
+void expectSizeValidationError(Matcher matcher) {
   expect(validatePackage(size(100 * math.pow(2, 20) + 1)),
       completion(pairOf(contains(matcher), anything)));
 }
 
-main() {
+void main() {
   test('considers a package valid if it is <= 100 MB', () async {
     await d.validPackage.create();
 
@@ -36,8 +36,8 @@
       await d.validPackage.create();
 
       expectSizeValidationError(
-          equals("Your package is 100.0 MB. Hosted packages must "
-              "be smaller than 100 MB."));
+          equals('Your package is 100.0 MB. Hosted packages must '
+              'be smaller than 100 MB.'));
     });
 
     test('package is not under source control and .gitignore exists', () async {
@@ -45,9 +45,9 @@
       await d.dir(appPath, [d.file('.gitignore', 'ignored')]).create();
 
       expectSizeValidationError(allOf(
-          contains("Hosted packages must be smaller than 100 MB."),
-          contains("Your .gitignore has no effect since your project "
-              "does not appear to be in version control.")));
+          contains('Hosted packages must be smaller than 100 MB.'),
+          contains('Your .gitignore has no effect since your project '
+              'does not appear to be in version control.')));
     });
 
     test('package is under source control and no .gitignore exists', () async {
@@ -55,9 +55,9 @@
       await d.git(appPath).create();
 
       expectSizeValidationError(allOf(
-          contains("Hosted packages must be smaller than 100 MB."),
-          contains("Consider adding a .gitignore to avoid including "
-              "temporary files.")));
+          contains('Hosted packages must be smaller than 100 MB.'),
+          contains('Consider adding a .gitignore to avoid including '
+              'temporary files.')));
     });
 
     test('package is under source control and .gitignore exists', () async {
@@ -65,8 +65,8 @@
       await d.git(appPath, [d.file('.gitignore', 'ignored')]).create();
 
       expectSizeValidationError(
-          equals("Your package is 100.0 MB. Hosted packages must "
-              "be smaller than 100 MB."));
+          equals('Your package is 100.0 MB. Hosted packages must '
+              'be smaller than 100 MB.'));
     });
   });
 }
diff --git a/test/validator/strict_dependencies_test.dart b/test/validator/strict_dependencies_test.dart
index e3746d0..3c7d649 100644
--- a/test/validator/strict_dependencies_test.dart
+++ b/test/validator/strict_dependencies_test.dart
@@ -15,7 +15,7 @@
 Validator strictDeps(Entrypoint entrypoint) =>
     StrictDependenciesValidator(entrypoint);
 
-main() {
+void main() {
   group('should consider a package valid if it', () {
     setUp(d.validPackage.create);
 
@@ -23,8 +23,8 @@
 
     test('declares an "import" as a dependency in lib/', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0",
-            deps: {"silly_monkey": "^1.2.3"}, sdk: ">=1.8.0 <2.0.0"),
+        d.libPubspec('test_pkg', '1.0.0',
+            deps: {'silly_monkey': '^1.2.3'}, sdk: '>=1.8.0 <2.0.0'),
         d.dir('lib', [
           d.file('library.dart', r'''
             import 'package:silly_monkey/silly_monkey.dart';
@@ -37,8 +37,8 @@
 
     test('declares an "export" as a dependency in lib/', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0",
-            deps: {"silly_monkey": "^1.2.3"}, sdk: ">=1.8.0 <2.0.0"),
+        d.libPubspec('test_pkg', '1.0.0',
+            deps: {'silly_monkey': '^1.2.3'}, sdk: '>=1.8.0 <2.0.0'),
         d.dir('lib', [
           d.file('library.dart', r'''
             export 'package:silly_monkey/silly_monkey.dart';
@@ -51,8 +51,8 @@
 
     test('declares an "import" as a dependency in bin/', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0",
-            deps: {"silly_monkey": "^1.2.3"}, sdk: ">=1.8.0 <2.0.0"),
+        d.libPubspec('test_pkg', '1.0.0',
+            deps: {'silly_monkey': '^1.2.3'}, sdk: '>=1.8.0 <2.0.0'),
         d.dir('bin', [
           d.file('library.dart', r'''
             import 'package:silly_monkey/silly_monkey.dart';
@@ -69,17 +69,17 @@
         Map<String, String> devDeps;
 
         if (isDev) {
-          devDeps = {"silly_monkey": "^1.2.3"};
+          devDeps = {'silly_monkey': '^1.2.3'};
         } else {
-          deps = {"silly_monkey": "^1.2.3"};
+          deps = {'silly_monkey': '^1.2.3'};
         }
         for (var devDir in ['benchmark', 'example', 'test', 'tool']) {
           test(
               'declares an "$port" as a '
               '${isDev ? 'dev ' : ''}dependency in $devDir/', () async {
             await d.dir(appPath, [
-              d.libPubspec("test_pkg", "1.0.0",
-                  deps: deps, devDeps: devDeps, sdk: ">=1.8.0 <2.0.0"),
+              d.libPubspec('test_pkg', '1.0.0',
+                  deps: deps, devDeps: devDeps, sdk: '>=1.8.0 <2.0.0'),
               d.dir(devDir, [
                 d.file('library.dart', '''
             $port 'package:silly_monkey/silly_monkey.dart';
@@ -153,8 +153,8 @@
 
     test('has analysis_options.yaml that excludes files', () async {
       await d.dir(appPath, [
-        d.libPubspec("test_pkg", "1.0.0",
-            deps: {"silly_monkey": "^1.2.3"}, sdk: ">=1.8.0 <2.0.0"),
+        d.libPubspec('test_pkg', '1.0.0',
+            deps: {'silly_monkey': '^1.2.3'}, sdk: '>=1.8.0 <2.0.0'),
         d.dir('lib', [
           d.file('library.dart', r'''
             import 'package:silly_monkey/silly_monkey.dart';
@@ -213,8 +213,8 @@
       for (var codeDir in ['bin', 'lib']) {
         test('declares an "$port" as a devDependency for $codeDir/', () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0",
-                devDeps: {"silly_monkey": "^1.2.3"}, sdk: ">=1.8.0 <2.0.0"),
+            d.libPubspec('test_pkg', '1.0.0',
+                devDeps: {'silly_monkey': '^1.2.3'}, sdk: '>=1.8.0 <2.0.0'),
             d.dir(codeDir, [
               d.file('library.dart', '''
             $port 'package:silly_monkey/silly_monkey.dart';
@@ -232,7 +232,7 @@
         test('does not declare an "$port" as a dependency in $devDir/',
             () async {
           await d.dir(appPath, [
-            d.libPubspec("test_pkg", "1.0.0", sdk: ">=1.8.0 <2.0.0"),
+            d.libPubspec('test_pkg', '1.0.0', sdk: '>=1.8.0 <2.0.0'),
             d.dir(devDir, [
               d.file('library.dart', '''
             $port 'package:silly_monkey/silly_monkey.dart';
@@ -260,8 +260,8 @@
 
       test('"package:silly_monkey"', () async {
         await d.dir(appPath, [
-          d.libPubspec("test_pkg", "1.0.0",
-              deps: {"silly_monkey": "^1.2.3"}, sdk: ">=1.8.0 <2.0.0"),
+          d.libPubspec('test_pkg', '1.0.0',
+              deps: {'silly_monkey': '^1.2.3'}, sdk: '>=1.8.0 <2.0.0'),
           d.dir('lib', [
             d.file('library.dart', r'''
             import 'package:silly_monkey';
diff --git a/test/version_solver_test.dart b/test/version_solver_test.dart
index 8d58284..d9a75b3 100644
--- a/test/version_solver_test.dart
+++ b/test/version_solver_test.dart
@@ -15,7 +15,7 @@
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
-main() {
+void main() {
   group('basic graph', basicGraph);
   group('with lockfile', withLockFile);
   group('root dependency', rootDependency);
@@ -206,7 +206,7 @@
   // Issue 1853
   test(
       "produces a nice message for a locked dependency that's the only "
-      "version of its package", () async {
+      'version of its package', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', deps: {'bar': '>=2.0.0'});
       builder.serve('bar', '1.0.0');
@@ -253,11 +253,11 @@
     });
 
     await d.appDir({'foo': '1.0.0'}).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       Because myapp depends on foo 1.0.0 which depends on myapp >0.0.0,
         myapp >0.0.0 is required.
       So, because myapp is 0.0.0, version solving failed.
-    """));
+    '''));
   });
 }
 
@@ -305,8 +305,8 @@
     await expectResolves(result: {'foo': '1.0.0'});
   });
 
-  group("with both a dev and regular dependency", () {
-    test("succeeds when both are satisfied", () async {
+  group('with both a dev and regular dependency', () {
+    test('succeeds when both are satisfied', () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0');
         builder.serve('foo', '2.0.0');
@@ -337,11 +337,11 @@
         })
       ]).create();
 
-      await expectResolves(error: equalsIgnoringWhitespace("""
+      await expectResolves(error: equalsIgnoringWhitespace('''
         Because no versions of foo match ^2.0.0 and myapp depends on foo
           >=1.0.0 <3.0.0, foo ^1.0.0 is required.
         So, because myapp depends on foo >=2.0.0 <4.0.0, version solving failed.
-      """));
+      '''));
     });
 
     test("fails when dev dependency isn't satisfied", () async {
@@ -357,14 +357,14 @@
         })
       ]).create();
 
-      await expectResolves(error: equalsIgnoringWhitespace("""
+      await expectResolves(error: equalsIgnoringWhitespace('''
         Because no versions of foo match ^2.0.0 and myapp depends on foo
           >=1.0.0 <3.0.0, foo ^1.0.0 is required.
         So, because myapp depends on foo >=2.0.0 <4.0.0, version solving failed.
-      """));
+      '''));
     });
 
-    test("fails when dev and main constraints are incompatible", () async {
+    test('fails when dev and main constraints are incompatible', () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0');
       });
@@ -377,13 +377,13 @@
         })
       ]).create();
 
-      await expectResolves(error: equalsIgnoringWhitespace("""
+      await expectResolves(error: equalsIgnoringWhitespace('''
         Because myapp depends on both foo ^1.0.0 and foo ^2.0.0, version
           solving failed.
-      """));
+      '''));
     });
 
-    test("fails when dev and main sources are incompatible", () async {
+    test('fails when dev and main sources are incompatible', () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0');
       });
@@ -398,13 +398,13 @@
         })
       ]).create();
 
-      await expectResolves(error: equalsIgnoringWhitespace("""
+      await expectResolves(error: equalsIgnoringWhitespace('''
         Because myapp depends on both foo from hosted and foo from path, version
           solving failed.
-      """));
+      '''));
     });
 
-    test("fails when dev and main descriptions are incompatible", () async {
+    test('fails when dev and main descriptions are incompatible', () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0');
       });
@@ -421,10 +421,10 @@
         })
       ]).create();
 
-      await expectResolves(error: equalsIgnoringWhitespace("""
+      await expectResolves(error: equalsIgnoringWhitespace('''
         Because myapp depends on both foo from path foo and foo from path
           ../foo, version solving failed.
-      """));
+      '''));
     });
   });
 }
@@ -452,7 +452,7 @@
     });
 
     await d.appDir({'foo': '1.0.0', 'bar': '1.0.0'}).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       Because every version of foo depends on shared ^2.0.0 and no versions of
         shared match ^2.9.0, every version of foo requires
         shared >=2.0.0 <2.9.0.
@@ -460,7 +460,7 @@
         incompatible with foo.
       So, because myapp depends on both foo 1.0.0 and bar 1.0.0, version
         solving failed.
-    """));
+    '''));
   });
 
   test('disjoint constraints', () async {
@@ -472,12 +472,12 @@
     });
 
     await d.appDir({'foo': '1.0.0', 'bar': '1.0.0'}).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       Because every version of bar depends on shared >3.0.0 and every version
         of foo depends on shared <=2.0.0, bar is incompatible with foo.
       So, because myapp depends on both foo 1.0.0 and bar 1.0.0, version
         solving failed.
-    """));
+    '''));
   });
 
   test('mismatched descriptions', () async {
@@ -522,13 +522,13 @@
     });
 
     await d.appDir({'foo': '1.0.0', 'bar': '1.0.0'}).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       Because every version of bar depends on shared from path and every
         version of foo depends on shared from hosted, bar is incompatible with
         foo.
       So, because myapp depends on both foo 1.0.0 and bar 1.0.0, version
         solving failed.
-    """));
+    '''));
   });
 
   test('no valid solution', () async {
@@ -540,14 +540,14 @@
     });
 
     await d.appDir({'a': 'any', 'b': 'any'}).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       Because b <2.0.0 depends on a 2.0.0 which depends on b 2.0.0, b <2.0.0 is
         forbidden.
       Because b >=2.0.0 depends on a 1.0.0 which depends on b 1.0.0, b >=2.0.0
         is forbidden.
       Thus, b is forbidden.
       So, because myapp depends on b any, version solving failed.
-    """), tries: 2);
+    '''), tries: 2);
   });
 
   // This is a regression test for #15550.
@@ -581,12 +581,12 @@
     });
 
     await d.appDir({'angular': 'any', 'collection': 'any'}).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       Because every version of angular depends on di ^0.0.32 which depends on
         analyzer ^0.13.0, every version of angular requires analyzer ^0.13.0.
       So, because no versions of analyzer match ^0.13.0 and myapp depends on
         angular any, version solving failed.
-    """));
+    '''));
   });
 }
 
@@ -595,10 +595,10 @@
     await d.appDir({
       'foo': {'bad': 'any'}
     }).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       Because myapp depends on foo from unknown source "bad", version solving
         failed.
-    """));
+    '''));
   });
 
   test('fail if the root package has a bad source in dev dep', () async {
@@ -611,10 +611,10 @@
       })
     ]).create();
 
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       Because myapp depends on foo from unknown source "bad", version solving
         failed.
-    """));
+    '''));
   });
 
   test('fail if all versions have bad source in dep', () async {
@@ -631,7 +631,7 @@
     });
 
     await d.appDir({'foo': 'any'}).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       Because foo <1.0.1 depends on bar from unknown source "bad", foo <1.0.1 is
         forbidden.
       And because foo >=1.0.1 <1.0.2 depends on baz any from bad, foo <1.0.2
@@ -640,7 +640,7 @@
         bang any from bad, every version of foo requires bang any from bad.
       So, because bang comes from unknown source "bad" and myapp depends on foo
         any, version solving failed.
-    """), tries: 3);
+    '''), tries: 3);
   });
 
   test('ignore versions with bad source in dep', () async {
@@ -693,7 +693,7 @@
     await expectResolves(result: {'a': '1.0.0'}, tries: 2);
   });
 
-  test("diamond dependency graph", () async {
+  test('diamond dependency graph', () async {
     await servePackages((builder) {
       builder.serve('a', '2.0.0', deps: {'c': '^1.0.0'});
       builder.serve('a', '1.0.0');
@@ -706,14 +706,14 @@
       builder.serve('c', '1.0.0');
     });
 
-    await d.appDir({"a": "any", "b": "any"}).create();
+    await d.appDir({'a': 'any', 'b': 'any'}).create();
     await expectResolves(result: {'a': '1.0.0', 'b': '2.0.0', 'c': '3.0.0'});
   });
 
   // c 2.0.0 is incompatible with y 2.0.0 because it requires x 1.0.0, but that
   // requirement only exists because of both a and b. The solver should be able
   // to deduce c 2.0.0's incompatibility and select c 1.0.0 instead.
-  test("backjumps after a partial satisfier", () async {
+  test('backjumps after a partial satisfier', () async {
     await servePackages((builder) {
       builder.serve('a', '1.0.0', deps: {'x': '>=1.0.0'});
       builder.serve('b', '1.0.0', deps: {'x': '<2.0.0'});
@@ -729,13 +729,13 @@
       builder.serve('y', '2.0.0');
     });
 
-    await d.appDir({"c": "any", "y": "^2.0.0"}).create();
+    await d.appDir({'c': 'any', 'y': '^2.0.0'}).create();
     await expectResolves(result: {'c': '1.0.0', 'y': '2.0.0'}, tries: 2);
   });
 
   // This matches the Branching Error Reporting example in the version solver
   // documentation, and tests that we display line numbers correctly.
-  test("branching error reporting", () async {
+  test('branching error reporting', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', deps: {'a': '^1.0.0', 'b': '^1.0.0'});
       builder.serve('foo', '1.1.0', deps: {'x': '^1.0.0', 'y': '^1.0.0'});
@@ -747,7 +747,7 @@
       builder.serve('y', '2.0.0');
     });
 
-    await d.appDir({"foo": "^1.0.0"}).create();
+    await d.appDir({'foo': '^1.0.0'}).create();
     await expectResolves(
         // We avoid equalsIgnoringWhitespace() here because we want to test the
         // formatting of the line number.
@@ -897,11 +897,11 @@
     });
 
     await d.appDir({'a': 'any', 'b': 'any', 'c': 'any'}).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       Because every version of b depends on a from path and myapp depends on
         a from hosted, b is forbidden.
       So, because myapp depends on b any, version solving failed.
-    """));
+    '''));
   });
 
   test('failing backjump to conflicting description', () async {
@@ -1005,7 +1005,7 @@
   // "forget" that a package had previously led to an error. In that case, it
   // would backtrack over the failed package instead of trying different
   // versions of it.
-  test("finds solution with less strict constraint", () async {
+  test('finds solution with less strict constraint', () async {
     await servePackages((builder) {
       builder.serve('a', '2.0.0');
       builder.serve('a', '1.0.0');
@@ -1015,7 +1015,7 @@
       builder.serve('d', '1.0.0', deps: {'myapp': '<1.0.0'});
     });
 
-    await d.appDir({"a": "any", "c": "any", "d": "any"}).create();
+    await d.appDir({'a': 'any', 'c': 'any', 'd': 'any'}).create();
     await expectResolves(
         result: {'a': '1.0.0', 'b': '1.0.0', 'c': '1.0.0', 'd': '2.0.0'});
   });
@@ -1056,12 +1056,12 @@
     });
 
     await d.appDir({'foo': 'any'}).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       The current Dart SDK version is 0.1.2+3.
 
       Because myapp depends on foo any which requires SDK version 0.0.0, version
         solving failed.
-    """));
+    '''));
   });
 
   test('transitive dependency does not match SDK', () async {
@@ -1073,13 +1073,13 @@
     });
 
     await d.appDir({'foo': 'any'}).create();
-    await expectResolves(error: equalsIgnoringWhitespace("""
+    await expectResolves(error: equalsIgnoringWhitespace('''
       The current Dart SDK version is 0.1.2+3.
 
       Because every version of foo depends on bar any which requires SDK version
         0.0.0, foo is forbidden.
       So, because myapp depends on foo any, version solving failed.
-    """));
+    '''));
   });
 
   test('selects a dependency version that allows the SDK', () async {
@@ -1168,7 +1168,7 @@
         await expectResolves(environment: {'_PUB_TEST_SDK_VERSION': '2.0.0'});
       });
 
-      test("allow pre-release versions of the upper bound", () async {
+      test('allow pre-release versions of the upper bound', () async {
         await d.dir(appPath, [
           d.pubspec({
             'name': 'myapp',
@@ -1287,7 +1287,7 @@
     });
 
     group("don't apply if", () {
-      test("major SDK versions differ", () async {
+      test('major SDK versions differ', () async {
         await d.dir(appPath, [
           d.pubspec({
             'name': 'myapp',
@@ -1300,7 +1300,7 @@
             output: isNot(contains('PUB_ALLOW_PRERELEASE_SDK')));
       });
 
-      test("minor SDK versions differ", () async {
+      test('minor SDK versions differ', () async {
         await d.dir(appPath, [
           d.pubspec({
             'name': 'myapp',
@@ -1313,7 +1313,7 @@
             output: isNot(contains('PUB_ALLOW_PRERELEASE_SDK')));
       });
 
-      test("patch SDK versions differ", () async {
+      test('patch SDK versions differ', () async {
         await d.dir(appPath, [
           d.pubspec({
             'name': 'myapp',
@@ -1326,7 +1326,7 @@
             output: isNot(contains('PUB_ALLOW_PRERELEASE_SDK')));
       });
 
-      test("SDK max is inclusive", () async {
+      test('SDK max is inclusive', () async {
         await d.dir(appPath, [
           d.pubspec({
             'name': 'myapp',
@@ -1356,7 +1356,7 @@
             '''));
       });
 
-      test("upper bound is pre-release", () async {
+      test('upper bound is pre-release', () async {
         await d.dir(appPath, [
           d.pubspec({
             'name': 'myapp',
@@ -1369,7 +1369,7 @@
             output: isNot(contains('PUB_ALLOW_PRERELEASE_SDK')));
       });
 
-      test("lower bound is pre-release and matches SDK", () async {
+      test('lower bound is pre-release and matches SDK', () async {
         await d.dir(appPath, [
           d.pubspec({
             'name': 'myapp',
@@ -1382,7 +1382,7 @@
             output: isNot(contains('PUB_ALLOW_PRERELEASE_SDK')));
       });
 
-      test("upper bound has build identifier", () async {
+      test('upper bound has build identifier', () async {
         await d.dir(appPath, [
           d.pubspec({
             'name': 'myapp',
@@ -1396,8 +1396,8 @@
       });
     });
 
-    group("apply if", () {
-      test("upper bound is exclusive and matches SDK", () async {
+    group('apply if', () {
+      test('upper bound is exclusive and matches SDK', () async {
         await d.dir(appPath, [
           d.pubspec({
             'name': 'myapp',
@@ -1934,20 +1934,20 @@
   // Regression test for #1853
   test("overrides a locked package's dependency", () async {
     await servePackages((builder) {
-      builder.serve("foo", "1.2.3", deps: {"bar": "1.2.3"});
-      builder.serve("bar", "1.2.3");
-      builder.serve("bar", "0.0.1");
+      builder.serve('foo', '1.2.3', deps: {'bar': '1.2.3'});
+      builder.serve('bar', '1.2.3');
+      builder.serve('bar', '0.0.1');
     });
 
-    await d.appDir({"foo": "any"}).create();
+    await d.appDir({'foo': 'any'}).create();
 
     await expectResolves(result: {'foo': '1.2.3', 'bar': '1.2.3'});
 
     await d.dir(appPath, [
       d.pubspec({
-        "name": "myapp",
-        "dependencies": {"foo": "any"},
-        "dependency_overrides": {"bar": '0.0.1'}
+        'name': 'myapp',
+        'dependencies': {'foo': 'any'},
+        'dependency_overrides': {'bar': '0.0.1'}
       })
     ]).create();
 
@@ -1956,7 +1956,7 @@
 }
 
 void downgrade() {
-  test("downgrades a dependency to the lowest matching version", () async {
+  test('downgrades a dependency to the lowest matching version', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0');
       builder.serve('foo', '2.0.0-dev');
@@ -1990,10 +1990,10 @@
   test("doesn't enable an opt-in feature by default", () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
-        "features": {
-          "stuff": {
-            "default": false,
-            "dependencies": {'bar': '1.0.0'}
+        'features': {
+          'stuff': {
+            'default': false,
+            'dependencies': {'bar': '1.0.0'}
           }
         }
       });
@@ -2004,13 +2004,13 @@
     await expectResolves(result: {'foo': '1.0.0'});
   });
 
-  test("enables an opt-out feature by default", () async {
+  test('enables an opt-out feature by default', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
-        "features": {
-          "stuff": {
-            "default": true,
-            "dependencies": {'bar': '1.0.0'}
+        'features': {
+          'stuff': {
+            'default': true,
+            'dependencies': {'bar': '1.0.0'}
           }
         }
       });
@@ -2021,12 +2021,12 @@
     await expectResolves(result: {'foo': '1.0.0', 'bar': '1.0.0'});
   });
 
-  test("features are opt-out by default", () async {
+  test('features are opt-out by default', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
-        "features": {
-          "stuff": {
-            "dependencies": {'bar': '1.0.0'}
+        'features': {
+          'stuff': {
+            'dependencies': {'bar': '1.0.0'}
           }
         }
       });
@@ -2040,10 +2040,10 @@
   test("enables an opt-in feature if it's required", () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
-        "features": {
-          "stuff": {
-            "default": false,
-            "dependencies": {'bar': '1.0.0'}
+        'features': {
+          'stuff': {
+            'default': false,
+            'dependencies': {'bar': '1.0.0'}
           }
         }
       });
@@ -2062,9 +2062,9 @@
   test("doesn't enable an opt-out feature if it's disabled", () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
-        "features": {
-          "stuff": {
-            "dependencies": {'bar': '1.0.0'}
+        'features': {
+          'stuff': {
+            'dependencies': {'bar': '1.0.0'}
           }
         }
       });
@@ -2080,12 +2080,12 @@
     await expectResolves(result: {'foo': '1.0.0'});
   });
 
-  test("opting in takes precedence over opting out", () async {
+  test('opting in takes precedence over opting out', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
-        "features": {
-          "stuff": {
-            "dependencies": {'bar': '1.0.0'}
+        'features': {
+          'stuff': {
+            'dependencies': {'bar': '1.0.0'}
           }
         }
       });
@@ -2109,12 +2109,12 @@
         result: {'foo': '1.0.0', 'bar': '1.0.0', 'baz': '1.0.0'});
   });
 
-  test("implicitly opting in takes precedence over opting out", () async {
+  test('implicitly opting in takes precedence over opting out', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
-        "features": {
-          "stuff": {
-            "dependencies": {'bar': '1.0.0'}
+        'features': {
+          'stuff': {
+            'dependencies': {'bar': '1.0.0'}
           }
         }
       });
@@ -2140,10 +2140,10 @@
   test("doesn't select a version with an unavailable feature", () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
-        "features": {
-          "stuff": {
-            "default": false,
-            "dependencies": {'bar': '1.0.0'}
+        'features': {
+          'stuff': {
+            'default': false,
+            'dependencies': {'bar': '1.0.0'}
           }
         }
       });
@@ -2163,18 +2163,18 @@
   test("doesn't select a version with an incompatible feature", () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
-        "features": {
-          "stuff": {
-            "default": false,
-            "dependencies": {'bar': '1.0.0'}
+        'features': {
+          'stuff': {
+            'default': false,
+            'dependencies': {'bar': '1.0.0'}
           }
         }
       });
       builder.serve('foo', '1.1.0', pubspec: {
-        "features": {
-          "stuff": {
-            "default": false,
-            "dependencies": {'bar': '2.0.0'}
+        'features': {
+          'stuff': {
+            'default': false,
+            'dependencies': {'bar': '2.0.0'}
           }
         }
       });
@@ -2193,8 +2193,8 @@
   });
 
   test(
-      "backtracks if a feature is transitively incompatible with another "
-      "feature", () async {
+      'backtracks if a feature is transitively incompatible with another '
+      'feature', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
         'features': {
@@ -2245,18 +2245,18 @@
       () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', pubspec: {
-        "features": {
-          "stuff": {
-            "default": false,
-            "dependencies": {'bar': '1.0.0'}
+        'features': {
+          'stuff': {
+            'default': false,
+            'dependencies': {'bar': '1.0.0'}
           }
         }
       });
       builder.serve('foo', '1.1.0', pubspec: {
-        "features": {
-          "stuff": {
-            "default": false,
-            "dependencies": {'bar': '2.0.0'}
+        'features': {
+          'stuff': {
+            'default': false,
+            'dependencies': {'bar': '2.0.0'}
           }
         }
       });
@@ -2279,7 +2279,7 @@
         result: {'foo': '1.0.0', 'bar': '1.0.0', 'baz': '1.0.0'}, tries: 2);
   });
 
-  test("disables a feature when it backtracks", () async {
+  test('disables a feature when it backtracks', () async {
     await servePackages((builder) {
       builder.serve('foo', '1.0.0', deps: {'myapp': '0.0.0'});
       builder.serve('foo', '1.1.0', deps: {
@@ -2428,17 +2428,17 @@
     ]).create();
     await expectResolves(
         error: "foo 1.0.0 doesn't have a feature named stuff:\n"
-            "- myapp depends on version ^1.0.0 with stuff");
+            '- myapp depends on version ^1.0.0 with stuff');
   });
 
   group('an "if available" dependency', () {
-    test("enables an opt-in feature", () async {
+    test('enables an opt-in feature', () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0', pubspec: {
-          "features": {
-            "stuff": {
-              "default": false,
-              "dependencies": {'bar': '1.0.0'}
+          'features': {
+            'stuff': {
+              'default': false,
+              'dependencies': {'bar': '1.0.0'}
             }
           }
         });
@@ -2474,8 +2474,8 @@
       return d.dir('flutter', [d.file('version', '1.2.3')]).create();
     });
 
-    group("succeeds when", () {
-      test("a Dart SDK constraint is matched", () async {
+    group('succeeds when', () {
+      test('a Dart SDK constraint is matched', () async {
         await servePackages((builder) {
           builder.serve('foo', '1.0.0', pubspec: {
             'features': {
@@ -2496,7 +2496,7 @@
         await expectResolves(result: {'foo': '1.0.0'});
       });
 
-      test("a Flutter SDK constraint is matched", () async {
+      test('a Flutter SDK constraint is matched', () async {
         await servePackages((builder) {
           builder.serve('foo', '1.0.0', pubspec: {
             'features': {
@@ -2590,7 +2590,7 @@
       });
     });
 
-    group("resolution fails because", () {
+    group('resolution fails because', () {
       test("a Dart SDK constraint isn't matched", () async {
         await servePackages((builder) {
           builder.serve('foo', '1.0.0', pubspec: {
@@ -2611,8 +2611,8 @@
 
         await expectResolves(
             error:
-                "Package foo feature stuff requires SDK version 0.0.1 but the "
-                "current SDK is 0.1.2+3.");
+                'Package foo feature stuff requires SDK version 0.0.1 but the '
+                'current SDK is 0.1.2+3.');
       });
 
       test("Flutter isn't available", () async {
@@ -2634,8 +2634,8 @@
         ]).create();
 
         await expectResolves(
-            error: "Package foo feature stuff requires the Flutter SDK, which "
-                "is not available.");
+            error: 'Package foo feature stuff requires the Flutter SDK, which '
+                'is not available.');
       });
 
       test("a Flutter SDK constraint isn't matched", () async {
@@ -2658,21 +2658,21 @@
 
         await expectResolves(
             environment: {'FLUTTER_ROOT': p.join(d.sandbox, 'flutter')},
-            error: "Package foo feature stuff requires Flutter SDK version "
-                "^2.0.0 but the current SDK is 1.2.3.");
+            error: 'Package foo feature stuff requires Flutter SDK version '
+                '^2.0.0 but the current SDK is 1.2.3.');
       });
     });
   });
 
-  group("with overlapping dependencies", () {
-    test("can enable extra features", () async {
+  group('with overlapping dependencies', () {
+    test('can enable extra features', () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0', pubspec: {
-          "dependencies": {'bar': '1.0.0'},
-          "features": {
-            "stuff": {
-              "default": false,
-              "dependencies": {
+          'dependencies': {'bar': '1.0.0'},
+          'features': {
+            'stuff': {
+              'default': false,
+              'dependencies': {
                 'bar': {
                   'features': {'stuff': true}
                 }
@@ -2682,10 +2682,10 @@
         });
 
         builder.serve('bar', '1.0.0', pubspec: {
-          "features": {
-            "stuff": {
-              "default": false,
-              "dependencies": {'baz': '1.0.0'}
+          'features': {
+            'stuff': {
+              'default': false,
+              'dependencies': {'baz': '1.0.0'}
             }
           }
         });
@@ -2711,16 +2711,16 @@
     test("can't disable features", () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0', pubspec: {
-          "dependencies": {
+          'dependencies': {
             'bar': {
               'version': '1.0.0',
               'features': {'stuff': false}
             },
           },
-          "features": {
-            "stuff": {
-              "default": false,
-              "dependencies": {
+          'features': {
+            'stuff': {
+              'default': false,
+              'dependencies': {
                 'bar': {
                   'features': {'stuff': true}
                 }
@@ -2730,10 +2730,10 @@
         });
 
         builder.serve('bar', '1.0.0', pubspec: {
-          "features": {
-            "stuff": {
-              "default": true,
-              "dependencies": {'baz': '1.0.0'}
+          'features': {
+            'stuff': {
+              'default': true,
+              'dependencies': {'baz': '1.0.0'}
             }
           }
         });
@@ -2752,22 +2752,22 @@
     });
   });
 
-  group("with required features", () {
-    test("enables those features", () async {
+  group('with required features', () {
+    test('enables those features', () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0', pubspec: {
-          "features": {
-            "main": {
-              "default": false,
-              "requires": ["required1", "required2"]
+          'features': {
+            'main': {
+              'default': false,
+              'requires': ['required1', 'required2']
             },
-            "required1": {
-              "default": false,
-              "dependencies": {'bar': '1.0.0'}
+            'required1': {
+              'default': false,
+              'dependencies': {'bar': '1.0.0'}
             },
-            "required2": {
-              "default": true,
-              "dependencies": {'baz': '1.0.0'}
+            'required2': {
+              'default': true,
+              'dependencies': {'baz': '1.0.0'}
             }
           }
         });
@@ -2785,20 +2785,20 @@
           result: {'foo': '1.0.0', 'bar': '1.0.0', 'baz': '1.0.0'});
     });
 
-    test("enables those features by default", () async {
+    test('enables those features by default', () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0', pubspec: {
-          "features": {
-            "main": {
-              "requires": ["required1", "required2"]
+          'features': {
+            'main': {
+              'requires': ['required1', 'required2']
             },
-            "required1": {
-              "default": false,
-              "dependencies": {'bar': '1.0.0'}
+            'required1': {
+              'default': false,
+              'dependencies': {'bar': '1.0.0'}
             },
-            "required2": {
-              "default": true,
-              "dependencies": {'baz': '1.0.0'}
+            'required2': {
+              'default': true,
+              'dependencies': {'baz': '1.0.0'}
             }
           }
         });
@@ -2814,13 +2814,13 @@
     test("doesn't enable those features if it's disabled", () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0', pubspec: {
-          "features": {
-            "main": {
-              "requires": ["required"]
+          'features': {
+            'main': {
+              'requires': ['required']
             },
-            "required": {
-              "default": false,
-              "dependencies": {'bar': '1.0.0'}
+            'required': {
+              'default': false,
+              'dependencies': {'bar': '1.0.0'}
             }
           }
         });
@@ -2840,13 +2840,13 @@
         () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0', pubspec: {
-          "features": {
-            "main": {
-              "requires": ["required"]
+          'features': {
+            'main': {
+              'requires': ['required']
             },
-            "required": {
-              "default": false,
-              "dependencies": {'bar': '1.0.0'}
+            'required': {
+              'default': false,
+              'dependencies': {'bar': '1.0.0'}
             }
           }
         });
@@ -2862,20 +2862,20 @@
       await expectResolves(result: {'foo': '1.0.0', 'bar': '1.0.0'});
     });
 
-    test("enables features transitively", () async {
+    test('enables features transitively', () async {
       await servePackages((builder) {
         builder.serve('foo', '1.0.0', pubspec: {
-          "features": {
-            "main": {
-              "requires": ["required1"]
+          'features': {
+            'main': {
+              'requires': ['required1']
             },
-            "required1": {
-              "default": false,
-              "requires": ["required2"]
+            'required1': {
+              'default': false,
+              'requires': ['required2']
             },
-            "required2": {
-              "default": false,
-              "dependencies": {'bar': '1.0.0'}
+            'required2': {
+              'default': false,
+              'dependencies': {'bar': '1.0.0'}
             }
           }
         });
@@ -2936,7 +2936,7 @@
   var registry = SourceRegistry();
   var lockFile =
       LockFile.load(p.join(d.sandbox, appPath, 'pubspec.lock'), registry);
-  var resultPubspec = Pubspec.fromMap({"dependencies": result}, registry);
+  var resultPubspec = Pubspec.fromMap({'dependencies': result}, registry);
 
   var ids = Map.from(lockFile.packages);
   for (var dep in resultPubspec.dependencies.values) {
@@ -2950,8 +2950,8 @@
           .refFor(dep.name, url: globalPackageServer.url)
           .withConstraint(dep.constraint);
     }
-    expect(dep.allows(id), isTrue, reason: "Expected $id to match $dep.");
+    expect(dep.allows(id), isTrue, reason: 'Expected $id to match $dep.');
   }
 
-  expect(ids, isEmpty, reason: "Expected no additional packages.");
+  expect(ids, isEmpty, reason: 'Expected no additional packages.');
 }