anchor.diff:    // TODO(rnystrom): Running the analyzer command line each time is very slow.
     // Either import the analyzer as a library, or at least invoke it in a batch
     // mode.
  -  var result = await Process.run(
  -      Platform.isWindows
  -          ? "sdk\\bin\\dartanalyzer.bat"
  -          : "sdk/bin/dartanalyzer",
  -      [
  -        ...options,
  -        "--format=machine",
  -        path,
  -      ]);
  +  var result = await Process.run(_analyzerPath, [
  +    ...options,
  +    "--format=machine",
  +    path,
  +  ]);
   
     // Analyzer returns 3 when it detects errors, 2 when it detects
     // warnings and --fatal-warnings is enabled, 1 when it detects
  
positive.code: 
  import 'package:args/args.dart';
  import 'package:glob/glob.dart';
  
  import 'package:test_runner/src/command_output.dart';
  import 'package:test_runner/src/path.dart';
  
negative.code:   FastaCommandOutput.parseErrors(result.stdout as String, errors);
    return errors;
  }
  
  /// Find the most recently-built analyzer.
  String _findAnalyzer() {
    String newestAnalyzer;
    DateTime newestAnalyzerTime;
  
    var buildDirectory = Directory(Platform.isMacOS ? "xcodebuild" : "out");
    if (buildDirectory.existsSync()) {
      for (var config in buildDirectory.listSync()) {
        var analyzerPath = p.join(config.path, "dart-sdk", "bin", "dartanalyzer");
        var analyzerFile = File(analyzerPath);
        if (!analyzerFile.existsSync()) continue;
        var modified = analyzerFile.lastModifiedSync();
  
        if (newestAnalyzerTime == null || modified.isAfter(newestAnalyzerTime)) {
          newestAnalyzer = analyzerPath;
          newestAnalyzerTime = modified;
        }
      }
    }
  
    if (newestAnalyzer == null) {
      // Clear the current line since we're in the middle of a progress line.
      print("");
      print("Could not find a built SDK with a dartanalyzer to run.");
      print("Make sure to build the Dart SDK before running this tool.");
      exit(1);
    }
  
    return newestAnalyzer;
  }
  