Migrate test/src/services/correction/fix/analysis_options/

R=brianwilkerson@google.com

Change-Id: I21bcd019adde36bd85bb6b8871f19ae49cebea8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195164
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Konstantin Shcheglov 2021-04-13 16:44:16 +00:00 committed by commit-bot@chromium.org
parent cdbff0e6fb
commit 0a2bd758fc
4 changed files with 4 additions and 19 deletions

View file

@ -2,8 +2,6 @@
// 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.
// @dart = 2.9
import 'package:linter/src/rules.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';

View file

@ -2,8 +2,6 @@
// 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.
// @dart = 2.9
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'test_support.dart';

View file

@ -2,8 +2,6 @@
// 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.
// @dart = 2.9
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'remove_lint_test.dart' as remove_lint;

View file

@ -2,8 +2,6 @@
// 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.
// @dart = 2.9
import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
import 'package:analysis_server/src/protocol_server.dart' show SourceEdit;
import 'package:analysis_server/src/services/correction/fix/analysis_options/fix_generator.dart';
@ -47,17 +45,10 @@ class AnalysisOptionsFixTest with ResourceProviderMixin {
}
YamlMap _parseYaml(String content) {
if (content == null) {
return YamlMap();
}
try {
var doc = loadYamlNode(content);
if (doc is YamlMap) {
return doc;
}
return YamlMap();
} catch (exception) {
return null;
var doc = loadYamlNode(content);
if (doc is YamlMap) {
return doc;
}
return YamlMap();
}
}