Fix UNNECESSARY_TYPE_CHECK_TRUE violations. (#89186)
This commit is contained in:
parent
db0c4fa960
commit
cfd0743d10
@ -455,9 +455,6 @@ Future<void> _runBuildTests() async {
|
|||||||
Future<void> _runExampleProjectBuildTests(Directory exampleDirectory, [File? mainFile]) async {
|
Future<void> _runExampleProjectBuildTests(Directory exampleDirectory, [File? mainFile]) async {
|
||||||
// Only verify caching with flutter gallery.
|
// Only verify caching with flutter gallery.
|
||||||
final bool verifyCaching = exampleDirectory.path.contains('flutter_gallery');
|
final bool verifyCaching = exampleDirectory.path.contains('flutter_gallery');
|
||||||
if (exampleDirectory is! Directory) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final String examplePath = exampleDirectory.path;
|
final String examplePath = exampleDirectory.path;
|
||||||
final bool hasNullSafety = File(path.join(examplePath, 'null_safety')).existsSync();
|
final bool hasNullSafety = File(path.join(examplePath, 'null_safety')).existsSync();
|
||||||
final List<String> additionalArgs = <String>[
|
final List<String> additionalArgs = <String>[
|
||||||
|
@ -107,7 +107,6 @@ List<ManifestTask> _validateAndParseTasks(dynamic tasksYaml) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ManifestTask _validateAndParseTask(String taskName, dynamic taskYaml) {
|
ManifestTask _validateAndParseTask(String taskName, dynamic taskYaml) {
|
||||||
_checkType(taskName is String, taskName, 'Task name', 'string');
|
|
||||||
_checkType(taskYaml is YamlMap, taskYaml, 'Value of task "$taskName"', 'dictionary');
|
_checkType(taskYaml is YamlMap, taskYaml, 'Value of task "$taskName"', 'dictionary');
|
||||||
_checkKeys(taskYaml as YamlMap, 'Value of task "$taskName"', const <String>[
|
_checkKeys(taskYaml as YamlMap, 'Value of task "$taskName"', const <String>[
|
||||||
'description',
|
'description',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user