| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 /// Whether to treat lints as fatal | 159 /// Whether to treat lints as fatal |
| 160 final bool lintsAreFatal; | 160 final bool lintsAreFatal; |
| 161 | 161 |
| 162 /// Initialize options from the given parsed [args]. | 162 /// Initialize options from the given parsed [args]. |
| 163 CommandLineOptions._fromArgs( | 163 CommandLineOptions._fromArgs( |
| 164 ArgResults args, Map<String, String> definedVariables) | 164 ArgResults args, Map<String, String> definedVariables) |
| 165 : buildAnalysisOutput = args['build-analysis-output'], | 165 : buildAnalysisOutput = args['build-analysis-output'], |
| 166 buildMode = args['build-mode'], | 166 buildMode = args['build-mode'], |
| 167 buildModePersistentWorker = args['persistent_worker'], | 167 buildModePersistentWorker = args['persistent_worker'], |
| 168 buildSummaryFallback = args['build-summary-fallback'], | 168 buildSummaryFallback = args['build-summary-fallback'], |
| 169 buildSummaryInputs = args['build-summary-input'], | 169 buildSummaryInputs = args['build-summary-input'] as List<String>, |
| 170 buildSummaryOnly = args['build-summary-only'], | 170 buildSummaryOnly = args['build-summary-only'], |
| 171 buildSummaryOnlyAst = args['build-summary-only-ast'], | 171 buildSummaryOnlyAst = args['build-summary-only-ast'], |
| 172 buildSummaryOnlyDiet = args['build-summary-only-diet'], | 172 buildSummaryOnlyDiet = args['build-summary-only-diet'], |
| 173 buildSummaryExcludeInformative = | 173 buildSummaryExcludeInformative = |
| 174 args['build-summary-exclude-informative'], | 174 args['build-summary-exclude-informative'], |
| 175 buildSummaryOutput = args['build-summary-output'], | 175 buildSummaryOutput = args['build-summary-output'], |
| 176 buildSummaryOutputSemantic = args['build-summary-output-semantic'], | 176 buildSummaryOutputSemantic = args['build-summary-output-semantic'], |
| 177 buildSuppressExitCode = args['build-suppress-exit-code'], | 177 buildSuppressExitCode = args['build-suppress-exit-code'], |
| 178 dartSdkPath = args['dart-sdk'], | 178 dartSdkPath = args['dart-sdk'], |
| 179 dartSdkSummaryPath = args['dart-sdk-summary'], | 179 dartSdkSummaryPath = args['dart-sdk-summary'], |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 | 708 |
| 709 int _getNextFlagIndex(args, i) { | 709 int _getNextFlagIndex(args, i) { |
| 710 for (; i < args.length; ++i) { | 710 for (; i < args.length; ++i) { |
| 711 if (args[i].startsWith('--')) { | 711 if (args[i].startsWith('--')) { |
| 712 return i; | 712 return i; |
| 713 } | 713 } |
| 714 } | 714 } |
| 715 return i; | 715 return i; |
| 716 } | 716 } |
| 717 } | 717 } |
| OLD | NEW |