OLD | NEW |
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 /// speed at the expense of memory usage. It may also be useful for working | 78 /// speed at the expense of memory usage. It may also be useful for working |
79 /// around bugs. | 79 /// around bugs. |
80 final bool disableCacheFlushing; | 80 final bool disableCacheFlushing; |
81 | 81 |
82 /// Whether to report hints | 82 /// Whether to report hints |
83 final bool disableHints; | 83 final bool disableHints; |
84 | 84 |
85 /// Whether to display version information | 85 /// Whether to display version information |
86 final bool displayVersion; | 86 final bool displayVersion; |
87 | 87 |
88 /// A flag indicating whether access to field formal parameters should be | |
89 /// allowed in a constructor's initializer list. | |
90 final bool enableInitializingFormalAccess; | |
91 | |
92 /// Whether to enable null-aware operators (DEP 9). | 88 /// Whether to enable null-aware operators (DEP 9). |
93 final bool enableNullAwareOperators; | 89 final bool enableNullAwareOperators; |
94 | 90 |
95 /// Whether to strictly follow the specification when generating warnings on | 91 /// Whether to strictly follow the specification when generating warnings on |
96 /// "call" methods (fixes dartbug.com/21938). | 92 /// "call" methods (fixes dartbug.com/21938). |
97 final bool enableStrictCallChecks; | 93 final bool enableStrictCallChecks; |
98 | 94 |
99 /// Whether to relax restrictions on mixins (DEP 34). | 95 /// Whether to relax restrictions on mixins (DEP 34). |
100 final bool enableSuperMixins; | 96 final bool enableSuperMixins; |
101 | 97 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 buildSummaryOutput = args['build-summary-output'], | 168 buildSummaryOutput = args['build-summary-output'], |
173 buildSummaryOutputSemantic = args['build-summary-output-semantic'], | 169 buildSummaryOutputSemantic = args['build-summary-output-semantic'], |
174 buildSuppressExitCode = args['build-suppress-exit-code'], | 170 buildSuppressExitCode = args['build-suppress-exit-code'], |
175 dartSdkPath = args['dart-sdk'], | 171 dartSdkPath = args['dart-sdk'], |
176 dartSdkSummaryPath = args['dart-sdk-summary'], | 172 dartSdkSummaryPath = args['dart-sdk-summary'], |
177 definedVariables = definedVariables, | 173 definedVariables = definedVariables, |
178 analysisOptionsFile = args['options'], | 174 analysisOptionsFile = args['options'], |
179 disableCacheFlushing = args['disable-cache-flushing'], | 175 disableCacheFlushing = args['disable-cache-flushing'], |
180 disableHints = args['no-hints'], | 176 disableHints = args['no-hints'], |
181 displayVersion = args['version'], | 177 displayVersion = args['version'], |
182 enableInitializingFormalAccess = args['initializing-formal-access'], | |
183 enableNullAwareOperators = args['enable-null-aware-operators'], | 178 enableNullAwareOperators = args['enable-null-aware-operators'], |
184 enableStrictCallChecks = args['enable-strict-call-checks'], | 179 enableStrictCallChecks = args['enable-strict-call-checks'], |
185 enableSuperMixins = args['supermixin'], | 180 enableSuperMixins = args['supermixin'], |
186 enableTypeChecks = args['enable_type_checks'], | 181 enableTypeChecks = args['enable_type_checks'], |
187 hintsAreFatal = args['fatal-hints'], | 182 hintsAreFatal = args['fatal-hints'], |
188 ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'], | 183 ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'], |
189 lints = args['lints'], | 184 lints = args['lints'], |
190 log = args['log'], | 185 log = args['log'], |
191 machineFormat = args['machine'] || args['format'] == 'machine', | 186 machineFormat = args['machine'] || args['format'] == 'machine', |
192 packageConfigPath = args['packages'], | 187 packageConfigPath = args['packages'], |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 | 696 |
702 int _getNextFlagIndex(args, i) { | 697 int _getNextFlagIndex(args, i) { |
703 for (; i < args.length; ++i) { | 698 for (; i < args.length; ++i) { |
704 if (args[i].startsWith('--')) { | 699 if (args[i].startsWith('--')) { |
705 return i; | 700 return i; |
706 } | 701 } |
707 } | 702 } |
708 return i; | 703 return i; |
709 } | 704 } |
710 } | 705 } |
OLD | NEW |