Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
6c91a137
Unverified
Commit
6c91a137
authored
Oct 21, 2019
by
Jonah Williams
Committed by
GitHub
Oct 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding missing break in plugin validation check (#43180)
parent
8df0d655
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
flutter_manifest.dart
packages/flutter_tools/lib/src/flutter_manifest.dart
+2
-1
flutter_manifest_test.dart
...utter_tools/test/general.shard/flutter_manifest_test.dart
+12
-0
No files found.
packages/flutter_tools/lib/src/flutter_manifest.dart
View file @
6c91a137
...
@@ -401,8 +401,9 @@ void _validateFlutter(YamlMap yaml, List<String> errors) {
...
@@ -401,8 +401,9 @@ void _validateFlutter(YamlMap yaml, List<String> errors) {
}
}
break
;
break
;
case
'plugin'
:
case
'plugin'
:
if
(
kvp
.
value
is
!
YamlMap
)
{
if
(
kvp
.
value
is
!
YamlMap
||
kvp
.
value
==
null
)
{
errors
.
add
(
'Expected "
${kvp.key}
" to be an object, but got
${kvp.value}
(
${kvp.value.runtimeType}
).'
);
errors
.
add
(
'Expected "
${kvp.key}
" to be an object, but got
${kvp.value}
(
${kvp.value.runtimeType}
).'
);
break
;
}
}
final
List
<
String
>
pluginErrors
=
Plugin
.
validatePluginYaml
(
kvp
.
value
);
final
List
<
String
>
pluginErrors
=
Plugin
.
validatePluginYaml
(
kvp
.
value
);
errors
.
addAll
(
pluginErrors
);
errors
.
addAll
(
pluginErrors
);
...
...
packages/flutter_tools/test/general.shard/flutter_manifest_test.dart
View file @
6c91a137
...
@@ -400,6 +400,18 @@ flutter:
...
@@ -400,6 +400,18 @@ flutter:
expect
(
flutterManifest
.
androidPackage
,
'com.example'
);
expect
(
flutterManifest
.
androidPackage
,
'com.example'
);
});
});
testUsingContext
(
'handles an invalid plugin declaration'
,
()
async
{
final
BufferLogger
bufferLogger
=
context
.
get
<
Logger
>();
const
String
manifest
=
'''
name: test
flutter:
plugin:
'''
;
final
FlutterManifest
flutterManifest
=
FlutterManifest
.
createFromString
(
manifest
);
expect
(
flutterManifest
,
null
);
expect
(
bufferLogger
.
errorText
,
contains
(
'Expected "plugin" to be an object, but got null'
));
});
Future
<
void
>
checkManifestVersion
({
Future
<
void
>
checkManifestVersion
({
String
manifest
,
String
manifest
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment