Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: pkg/analyzer_cli/lib/src/options.dart

Issue 1826353002: Add a fallback mode for building summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer_cli/lib/src/build_mode.dart ('k') | pkg/analyzer_cli/test/options_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer_cli.src.options; 5 library analyzer_cli.src.options;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:analyzer_cli/src/driver.dart'; 9 import 'package:analyzer_cli/src/driver.dart';
10 import 'package:args/args.dart'; 10 import 'package:args/args.dart';
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 /// Whether to use diet parsing, i.e. skip function bodies. We don't need to 48 /// Whether to use diet parsing, i.e. skip function bodies. We don't need to
49 /// analyze function bodies to use summaries during future compilation steps. 49 /// analyze function bodies to use summaries during future compilation steps.
50 final bool buildSummaryOnlyDiet; 50 final bool buildSummaryOnlyDiet;
51 51
52 /// Whether to use exclude informative data from created summaries. 52 /// Whether to use exclude informative data from created summaries.
53 final bool buildSummaryExcludeInformative; 53 final bool buildSummaryExcludeInformative;
54 54
55 /// The path to output the summary when creating summaries in build mode. 55 /// The path to output the summary when creating summaries in build mode.
56 final String buildSummaryOutput; 56 final String buildSummaryOutput;
57 57
58 /// Whether to output a summary in "fallback mode".
59 final bool buildSummaryFallback;
60
58 /// Whether to suppress a nonzero exit code in build mode. 61 /// Whether to suppress a nonzero exit code in build mode.
59 final bool buildSuppressExitCode; 62 final bool buildSuppressExitCode;
60 63
61 /// The path to the dart SDK 64 /// The path to the dart SDK
62 String dartSdkPath; 65 String dartSdkPath;
63 66
64 /// A table mapping the names of defined variables to their values. 67 /// A table mapping the names of defined variables to their values.
65 final Map<String, String> definedVariables; 68 final Map<String, String> definedVariables;
66 69
67 /// Whether to report hints 70 /// Whether to report hints
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 final bool warningsAreFatal; 134 final bool warningsAreFatal;
132 135
133 /// Whether to use strong static checking. 136 /// Whether to use strong static checking.
134 final bool strongMode; 137 final bool strongMode;
135 138
136 /// Initialize options from the given parsed [args]. 139 /// Initialize options from the given parsed [args].
137 CommandLineOptions._fromArgs( 140 CommandLineOptions._fromArgs(
138 ArgResults args, Map<String, String> definedVariables) 141 ArgResults args, Map<String, String> definedVariables)
139 : buildAnalysisOutput = args['build-analysis-output'], 142 : buildAnalysisOutput = args['build-analysis-output'],
140 buildMode = args['build-mode'], 143 buildMode = args['build-mode'],
144 buildSummaryFallback = args['build-summary-fallback'],
141 buildSummaryInputs = args['build-summary-input'], 145 buildSummaryInputs = args['build-summary-input'],
142 buildSummaryOnly = args['build-summary-only'], 146 buildSummaryOnly = args['build-summary-only'],
143 buildSummaryOnlyDiet = args['build-summary-only-diet'], 147 buildSummaryOnlyDiet = args['build-summary-only-diet'],
144 buildSummaryExcludeInformative = 148 buildSummaryExcludeInformative =
145 args['build-summary-exclude-informative'], 149 args['build-summary-exclude-informative'],
146 buildSummaryOutput = args['build-summary-output'], 150 buildSummaryOutput = args['build-summary-output'],
147 buildSuppressExitCode = args['build-suppress-exit-code'], 151 buildSuppressExitCode = args['build-suppress-exit-code'],
148 dartSdkPath = args['dart-sdk'], 152 dartSdkPath = args['dart-sdk'],
149 definedVariables = definedVariables, 153 definedVariables = definedVariables,
150 analysisOptionsFile = args['options'], 154 analysisOptionsFile = args['options'],
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 ..addFlag('build-summary-only-diet', 353 ..addFlag('build-summary-only-diet',
350 help: 'Diet parse function bodies.', 354 help: 'Diet parse function bodies.',
351 defaultsTo: false, 355 defaultsTo: false,
352 negatable: false, 356 negatable: false,
353 hide: true) 357 hide: true)
354 ..addFlag('build-summary-exclude-informative', 358 ..addFlag('build-summary-exclude-informative',
355 help: 'Exclude @informative information (docs, offsets, etc).', 359 help: 'Exclude @informative information (docs, offsets, etc).',
356 defaultsTo: false, 360 defaultsTo: false,
357 negatable: false, 361 negatable: false,
358 hide: true) 362 hide: true)
363 ..addFlag('build-summary-fallback',
364 help: 'If outputting a summary, output it in fallback mode.',
365 defaultsTo: false,
366 negatable: false,
367 hide: true)
359 ..addFlag('build-suppress-exit-code', 368 ..addFlag('build-suppress-exit-code',
360 help: 'Exit with code 0 even if errors are found.', 369 help: 'Exit with code 0 even if errors are found.',
361 defaultsTo: false, 370 defaultsTo: false,
362 negatable: false, 371 negatable: false,
363 hide: true) 372 hide: true)
364 // 373 //
365 // Hidden flags. 374 // Hidden flags.
366 // 375 //
367 ..addFlag('enable-async', 376 ..addFlag('enable-async',
368 help: 'Enable support for the proposed async feature.', 377 help: 'Enable support for the proposed async feature.',
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 605
597 int _getNextFlagIndex(args, i) { 606 int _getNextFlagIndex(args, i) {
598 for (; i < args.length; ++i) { 607 for (; i < args.length; ++i) {
599 if (args[i].startsWith('--')) { 608 if (args[i].startsWith('--')) {
600 return i; 609 return i;
601 } 610 }
602 } 611 }
603 return i; 612 return i;
604 } 613 }
605 } 614 }
OLDNEW
« no previous file with comments | « pkg/analyzer_cli/lib/src/build_mode.dart ('k') | pkg/analyzer_cli/test/options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698