[flutter_plugin_tools] Check 'implements' for unpublished plugins (#4273)

This commit is contained in:
stuartmorgan
2021-08-26 15:01:06 -04:00
committed by GitHub
parent f4a6fc84a4
commit 419cbe7354
2 changed files with 74 additions and 9 deletions

View File

@ -97,6 +97,16 @@ class PubspecCheckCommand extends PackageLoopingCommand {
printError('$listIndentation${sectionOrder.join('\n$listIndentation')}');
}
if (isPlugin) {
final String? error = _checkForImplementsError(pubspec, package: package);
if (error != null) {
printError('$indentation$error');
passing = false;
}
}
// Ignore metadata that's only relevant for published packages if the
// packages is not intended for publishing.
if (pubspec.publishTo != 'none') {
final List<String> repositoryErrors =
_checkForRepositoryLinkErrors(pubspec, package: package);
@ -114,15 +124,6 @@ class PubspecCheckCommand extends PackageLoopingCommand {
'${indentation * 2}$_expectedIssueLinkFormat<package label>');
passing = false;
}
if (isPlugin) {
final String? error =
_checkForImplementsError(pubspec, package: package);
if (error != null) {
printError('$indentation$error');
passing = false;
}
}
}
return passing;