1
0
mirror of https://github.com/flutter/packages.git synced 2025-06-18 04:33:52 +08:00

[flutter_plugin_tool] Remove podspec --allow-warnings ()

This commit is contained in:
stuartmorgan
2022-02-14 15:50:12 -05:00
committed by GitHub
parent 4aeb80aed7
commit fdba05bf57
4 changed files with 4 additions and 55 deletions

@ -1,4 +1,4 @@
## NEXT
## 0.8.0
- Ensures that `firebase-test-lab` runs include an `integration_test` runner.
- Adds a `make-deps-path-based` command to convert inter-repo package
@ -18,6 +18,7 @@
- Adds support for `CHROME_EXECUTABLE` in `drive-examples` to match similar
`flutter` behavior.
- Validates `default_package` entries in plugins.
- Removes `allow-warnings` from the `podspecs` command.
## 0.7.3

@ -26,13 +26,7 @@ class LintPodspecsCommand extends PackageLoopingCommand {
Directory packagesDir, {
ProcessRunner processRunner = const ProcessRunner(),
Platform platform = const LocalPlatform(),
}) : super(packagesDir, processRunner: processRunner, platform: platform) {
argParser.addMultiOption('ignore-warnings',
help:
'Do not pass --allow-warnings flag to "pod lib lint" for podspecs '
'with this basename (example: plugins with known warnings)',
valueHelp: 'podspec_file_name');
}
}) : super(packagesDir, processRunner: processRunner, platform: platform);
@override
final String name = 'podspecs';
@ -118,8 +112,6 @@ class LintPodspecsCommand extends PackageLoopingCommand {
Future<ProcessResult> _runPodLint(String podspecPath,
{required bool libraryLint}) async {
final bool allowWarnings = (getStringListArg('ignore-warnings'))
.contains(p.basenameWithoutExtension(podspecPath));
final List<String> arguments = <String>[
'lib',
'lint',
@ -127,7 +119,6 @@ class LintPodspecsCommand extends PackageLoopingCommand {
'--configuration=Debug', // Release targets unsupported arm64 simulators. Use Debug to only build against targeted x86_64 simulator devices.
'--skip-tests',
'--use-modular-headers', // Flutter sets use_modular_headers! in its templates.
if (allowWarnings) '--allow-warnings',
if (libraryLint) '--use-libraries'
];

@ -1,7 +1,7 @@
name: flutter_plugin_tools
description: Productivity utils for flutter/plugins and flutter/packages
repository: https://github.com/flutter/plugins/tree/main/script/tool
version: 0.7.2
version: 0.8.0
dependencies:
args: ^2.1.0
@ -26,7 +26,6 @@ dev_dependencies:
build_runner: ^2.0.3
matcher: ^0.12.10
mockito: ^5.0.7
pedantic: ^1.11.0
environment:
sdk: '>=2.12.0 <3.0.0'

@ -123,48 +123,6 @@ void main() {
expect(output, contains('Bar'));
});
test('allow warnings for podspecs with known warnings', () async {
final Directory plugin1Dir = createFakePlugin('plugin1', packagesDir,
extraFiles: <String>['plugin1.podspec']);
final List<String> output = await runCapturingPrint(
runner, <String>['podspecs', '--ignore-warnings=plugin1']);
expect(
processRunner.recordedCalls,
orderedEquals(<ProcessCall>[
ProcessCall('which', const <String>['pod'], packagesDir.path),
ProcessCall(
'pod',
<String>[
'lib',
'lint',
plugin1Dir.childFile('plugin1.podspec').path,
'--configuration=Debug',
'--skip-tests',
'--use-modular-headers',
'--allow-warnings',
'--use-libraries'
],
packagesDir.path),
ProcessCall(
'pod',
<String>[
'lib',
'lint',
plugin1Dir.childFile('plugin1.podspec').path,
'--configuration=Debug',
'--skip-tests',
'--use-modular-headers',
'--allow-warnings',
],
packagesDir.path),
]),
);
expect(output, contains('Linting plugin1.podspec'));
});
test('fails if pod is missing', () async {
createFakePlugin('plugin1', packagesDir,
extraFiles: <String>['plugin1.podspec']);