| 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 bf1aa686fe122261372ee6f1390f2ad2c1be1eb4..d6e78fc53e2a43e44b2eb06130bf2328a114ef0d 100644
|
| --- a/pkg/analyzer_cli/lib/src/options.dart
|
| +++ b/pkg/analyzer_cli/lib/src/options.dart
|
| @@ -45,6 +45,10 @@ class CommandLineOptions {
|
| /// Whether to skip analysis when creating summaries in build mode.
|
| final bool buildSummaryOnly;
|
|
|
| + /// Whether to use diet parsing, i.e. skip function bodies. We don't need to
|
| + /// analyze function bodies to use summaries during future compilation steps.
|
| + final bool buildSummaryOnlyDiet;
|
| +
|
| /// The path to output the summary when creating summaries in build mode.
|
| final String buildSummaryOutput;
|
|
|
| @@ -133,6 +137,7 @@ class CommandLineOptions {
|
| buildMode = args['build-mode'],
|
| buildSummaryInputs = args['build-summary-input'],
|
| buildSummaryOnly = args['build-summary-only'],
|
| + buildSummaryOnlyDiet = args['build-summary-only-diet'],
|
| buildSummaryOutput = args['build-summary-output'],
|
| buildSuppressExitCode = args['build-suppress-exit-code'],
|
| dartSdkPath = args['dart-sdk'],
|
| @@ -209,6 +214,12 @@ class CommandLineOptions {
|
| "Null aware operators are supported by default.");
|
| }
|
|
|
| + // Build mode.
|
| + if (options.buildSummaryOnlyDiet && !options.buildSummaryOnly) {
|
| + printAndFail('The option --build-summary-only-diet can be used only '
|
| + 'together with --build-summary-only.');
|
| + }
|
| +
|
| return options;
|
| }
|
|
|
| @@ -330,6 +341,11 @@ class CommandLineOptions {
|
| defaultsTo: false,
|
| negatable: false,
|
| hide: true)
|
| + ..addFlag('build-summary-only-diet',
|
| + help: 'Diet parse function bodies.',
|
| + defaultsTo: false,
|
| + negatable: false,
|
| + hide: true)
|
| ..addFlag('build-suppress-exit-code',
|
| help: 'Exit with code 0 even if errors are found.',
|
| defaultsTo: false,
|
|
|