anchor.diff:        }
       }
       return 0;
  +  }
  +
  +  void _dumpErrors(Iterable<String> errors) {
  +    if (argResults['write'] != null) {
  +      try {
  +        final RandomAccessFile resultsFile = new File(argResults['write']).openSync(mode: FileMode.WRITE);
  +        try {
  +          resultsFile.lockSync();
  +          resultsFile.writeStringSync(errors.join('\n'));
  +        } finally {
  +          resultsFile.close();
  +        }
  +      } catch (e) {
  +        printError('Failed to save output to "${argResults['write']}": $e');
  +      }
  +    }
     }
   
     List<File> _collectDartFiles(Directory dir, List<File> collected, {FileFilter exclude}) {
  
positive.code:           shouldIgnore = true;
          }
        }
        //TODO(ianh): Fix the Dart mojom compiler
        if (error.source.fullName.endsWith('.mojom.dart'))
          shouldIgnore = true;
        if (shouldIgnore)
  
negative.code:       printError(error.asString());
        errorCount += 1;
      }
      _dumpErrors(errors.map/*<String>*/((AnalysisErrorDescription error) => error.asString()));
  
      stopwatch.stop();
      String elapsed = (stopwatch.elapsedMilliseconds / 1000.0).toStringAsFixed(1);
  