| Index: pkg/analyzer/lib/source/analysis_options_provider.dart
|
| diff --git a/pkg/analyzer/lib/source/analysis_options_provider.dart b/pkg/analyzer/lib/source/analysis_options_provider.dart
|
| index 2c5dfdcc49a9fe7b4f2533e0b45cb32ae899a2e9..29062a26a41de8dbc6aa34f3471f16d98ad893a7 100644
|
| --- a/pkg/analyzer/lib/source/analysis_options_provider.dart
|
| +++ b/pkg/analyzer/lib/source/analysis_options_provider.dart
|
| @@ -33,12 +33,14 @@ class AnalysisOptionsProvider {
|
| if (optionsSource == null) {
|
| return options;
|
| }
|
| - var doc = loadYaml(optionsSource);
|
| + YamlNode doc = loadYamlNode(optionsSource);
|
| + // Empty options.
|
| + if (doc is YamlScalar && doc.value == null) {
|
| + return options;
|
| + }
|
| if ((doc != null) && (doc is! YamlMap)) {
|
| throw new OptionsFormatException(
|
| - 'Bad options file format (expected map, got ${doc.runtimeType})\n'
|
| - 'contents of options file:\n'
|
| - '$optionsSource\n',
|
| + 'Bad options file format (expected map, got ${doc.runtimeType})',
|
| doc.span);
|
| }
|
| if (doc is YamlMap) {
|
|
|