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

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

Issue 1828973002: Add the --build-summary-exclude-informative flag. (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') | no next file » | 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 /// List of summary file paths to use in build mode. 42 /// List of summary file paths to use in build mode.
43 final List<String> buildSummaryInputs; 43 final List<String> buildSummaryInputs;
44 44
45 /// Whether to skip analysis when creating summaries in build mode. 45 /// Whether to skip analysis when creating summaries in build mode.
46 final bool buildSummaryOnly; 46 final bool buildSummaryOnly;
47 47
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.
53 final bool buildSummaryExcludeInformative;
54
52 /// 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.
53 final String buildSummaryOutput; 56 final String buildSummaryOutput;
54 57
55 /// Whether to suppress a nonzero exit code in build mode. 58 /// Whether to suppress a nonzero exit code in build mode.
56 final bool buildSuppressExitCode; 59 final bool buildSuppressExitCode;
57 60
58 /// The path to the dart SDK 61 /// The path to the dart SDK
59 String dartSdkPath; 62 String dartSdkPath;
60 63
61 /// A table mapping the names of defined variables to their values. 64 /// A table mapping the names of defined variables to their values.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 final bool strongMode; 134 final bool strongMode;
132 135
133 /// Initialize options from the given parsed [args]. 136 /// Initialize options from the given parsed [args].
134 CommandLineOptions._fromArgs( 137 CommandLineOptions._fromArgs(
135 ArgResults args, Map<String, String> definedVariables) 138 ArgResults args, Map<String, String> definedVariables)
136 : buildAnalysisOutput = args['build-analysis-output'], 139 : buildAnalysisOutput = args['build-analysis-output'],
137 buildMode = args['build-mode'], 140 buildMode = args['build-mode'],
138 buildSummaryInputs = args['build-summary-input'], 141 buildSummaryInputs = args['build-summary-input'],
139 buildSummaryOnly = args['build-summary-only'], 142 buildSummaryOnly = args['build-summary-only'],
140 buildSummaryOnlyDiet = args['build-summary-only-diet'], 143 buildSummaryOnlyDiet = args['build-summary-only-diet'],
144 buildSummaryExcludeInformative =
145 args['build-summary-exclude-informative'],
141 buildSummaryOutput = args['build-summary-output'], 146 buildSummaryOutput = args['build-summary-output'],
142 buildSuppressExitCode = args['build-suppress-exit-code'], 147 buildSuppressExitCode = args['build-suppress-exit-code'],
143 dartSdkPath = args['dart-sdk'], 148 dartSdkPath = args['dart-sdk'],
144 definedVariables = definedVariables, 149 definedVariables = definedVariables,
145 analysisOptionsFile = args['options'], 150 analysisOptionsFile = args['options'],
146 disableHints = args['no-hints'], 151 disableHints = args['no-hints'],
147 displayVersion = args['version'], 152 displayVersion = args['version'],
148 enableConditionalDirectives = args['enable-conditional-directives'], 153 enableConditionalDirectives = args['enable-conditional-directives'],
149 enableNullAwareOperators = args['enable-null-aware-operators'], 154 enableNullAwareOperators = args['enable-null-aware-operators'],
150 enableStrictCallChecks = args['enable-strict-call-checks'], 155 enableStrictCallChecks = args['enable-strict-call-checks'],
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 ..addFlag('build-summary-only', 344 ..addFlag('build-summary-only',
340 help: 'Disable analysis (only generate summaries).', 345 help: 'Disable analysis (only generate summaries).',
341 defaultsTo: false, 346 defaultsTo: false,
342 negatable: false, 347 negatable: false,
343 hide: true) 348 hide: true)
344 ..addFlag('build-summary-only-diet', 349 ..addFlag('build-summary-only-diet',
345 help: 'Diet parse function bodies.', 350 help: 'Diet parse function bodies.',
346 defaultsTo: false, 351 defaultsTo: false,
347 negatable: false, 352 negatable: false,
348 hide: true) 353 hide: true)
354 ..addFlag('build-summary-exclude-informative',
355 help: 'Exclude @informative information (docs, offsets, etc).',
356 defaultsTo: false,
357 negatable: false,
358 hide: true)
349 ..addFlag('build-suppress-exit-code', 359 ..addFlag('build-suppress-exit-code',
350 help: 'Exit with code 0 even if errors are found.', 360 help: 'Exit with code 0 even if errors are found.',
351 defaultsTo: false, 361 defaultsTo: false,
352 negatable: false, 362 negatable: false,
353 hide: true) 363 hide: true)
354 // 364 //
355 // Hidden flags. 365 // Hidden flags.
356 // 366 //
357 ..addFlag('enable-async', 367 ..addFlag('enable-async',
358 help: 'Enable support for the proposed async feature.', 368 help: 'Enable support for the proposed async feature.',
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 596
587 int _getNextFlagIndex(args, i) { 597 int _getNextFlagIndex(args, i) {
588 for (; i < args.length; ++i) { 598 for (; i < args.length; ++i) {
589 if (args[i].startsWith('--')) { 599 if (args[i].startsWith('--')) {
590 return i; 600 return i;
591 } 601 }
592 } 602 }
593 return i; 603 return i;
594 } 604 }
595 } 605 }
OLDNEW
« no previous file with comments | « pkg/analyzer_cli/lib/src/build_mode.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698