| Index: pkg/analyzer_cli/lib/src/options.dart
|
| diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
|
| index 03909f8f4c2e321485aa0c26a2ab0a675c89bff2..afe83f5582954e70d39f5d6a195b40e52b71366f 100644
|
| --- a/pkg/analyzer_cli/lib/src/options.dart
|
| +++ b/pkg/analyzer_cli/lib/src/options.dart
|
| @@ -55,6 +55,10 @@ class CommandLineOptions {
|
| /// analyze function bodies to use summaries during future compilation steps.
|
| final bool buildSummaryOnlyDiet;
|
|
|
| + /// Whether to only produce unlinked summaries instead of linked summaries.
|
| + /// Must be used in combination with `buildSummaryOnly`.
|
| + final bool buildSummaryOnlyUnlinked;
|
| +
|
| /// The path to output the summary when creating summaries in build mode.
|
| final String buildSummaryOutput;
|
|
|
| @@ -155,6 +159,7 @@ class CommandLineOptions {
|
| buildSummaryInputs = args['build-summary-input'] as List<String>,
|
| buildSummaryOnly = args['build-summary-only'],
|
| buildSummaryOnlyDiet = args['build-summary-only-diet'],
|
| + buildSummaryOnlyUnlinked = args['build-summary-only-unlinked'],
|
| buildSummaryOutput = args['build-summary-output'],
|
| buildSummaryOutputSemantic = args['build-summary-output-semantic'],
|
| buildSuppressExitCode = args['build-suppress-exit-code'],
|
| @@ -263,6 +268,20 @@ class CommandLineOptions {
|
| return null; // Only reachable in testing.
|
| }
|
|
|
| + if (options.buildSummaryOnlyUnlinked) {
|
| + if (!options.buildSummaryOnly) {
|
| + printAndFail(
|
| + 'The option --build-summary-only-unlinked can be used only '
|
| + 'together with --build-summary-only.');
|
| + return null; // Only reachable in testing.
|
| + }
|
| + if (options.buildSummaryInputs.isNotEmpty) {
|
| + printAndFail('No summaries should be provided in combination with '
|
| + '--build-summary-only-unlinked, they aren\'t needed.');
|
| + return null; // Only reachable in testing.
|
| + }
|
| + }
|
| +
|
| return options;
|
| }
|
|
|
| @@ -384,6 +403,11 @@ class CommandLineOptions {
|
| defaultsTo: false,
|
| negatable: false,
|
| hide: hide)
|
| + ..addFlag('build-summary-only-unlinked',
|
| + help: 'Only output the unlinked summary.',
|
| + defaultsTo: false,
|
| + negatable: false,
|
| + hide: hide)
|
| ..addFlag('build-suppress-exit-code',
|
| help: 'Exit with code 0 even if errors are found.',
|
| defaultsTo: false,
|
|
|