| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.src.command_line.arguments; | 5 library analyzer.src.command_line.arguments; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/file_system/file_system.dart'; | 9 import 'package:analyzer/file_system/file_system.dart'; |
| 10 import 'package:analyzer/src/context/builder.dart'; | 10 import 'package:analyzer/src/context/builder.dart'; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // | 39 // |
| 40 builderOptions.dartSdkSummaryPath = args[sdkSummaryPathOption]; | 40 builderOptions.dartSdkSummaryPath = args[sdkSummaryPathOption]; |
| 41 builderOptions.defaultAnalysisOptionsFilePath = | 41 builderOptions.defaultAnalysisOptionsFilePath = |
| 42 args[analysisOptionsFileOption]; | 42 args[analysisOptionsFileOption]; |
| 43 builderOptions.defaultPackageFilePath = args[packagesOption]; | 43 builderOptions.defaultPackageFilePath = args[packagesOption]; |
| 44 builderOptions.defaultPackagesDirectoryPath = args[packageRootOption]; | 44 builderOptions.defaultPackagesDirectoryPath = args[packageRootOption]; |
| 45 // | 45 // |
| 46 // Analysis options. | 46 // Analysis options. |
| 47 // | 47 // |
| 48 AnalysisOptionsImpl defaultOptions = new AnalysisOptionsImpl(); | 48 AnalysisOptionsImpl defaultOptions = new AnalysisOptionsImpl(); |
| 49 defaultOptions.enableInitializingFormalAccess = | |
| 50 args[enableInitializingFormalAccessFlag]; | |
| 51 defaultOptions.enableStrictCallChecks = args[enableStrictCallChecksFlag]; | 49 defaultOptions.enableStrictCallChecks = args[enableStrictCallChecksFlag]; |
| 52 defaultOptions.enableSuperMixins = args[enableSuperInMixinFlag]; | 50 defaultOptions.enableSuperMixins = args[enableSuperInMixinFlag]; |
| 53 defaultOptions.implicitCasts = !args[noImplicitCastsFlag]; | 51 defaultOptions.implicitCasts = !args[noImplicitCastsFlag]; |
| 54 defaultOptions.implicitDynamic = !args[noImplicitDynamicFlag]; | 52 defaultOptions.implicitDynamic = !args[noImplicitDynamicFlag]; |
| 55 defaultOptions.strongMode = args[strongModeFlag]; | 53 defaultOptions.strongMode = args[strongModeFlag]; |
| 56 builderOptions.defaultOptions = defaultOptions; | 54 builderOptions.defaultOptions = defaultOptions; |
| 57 // | 55 // |
| 58 // Declared variables. | 56 // Declared variables. |
| 59 // | 57 // |
| 60 Map<String, String> declaredVariables = <String, String>{}; | 58 Map<String, String> declaredVariables = <String, String>{}; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 .replaceAll('\r', '\n') | 245 .replaceAll('\r', '\n') |
| 248 .split('\n') | 246 .split('\n') |
| 249 .where((String line) => line.isNotEmpty)); | 247 .where((String line) => line.isNotEmpty)); |
| 250 return newArgs; | 248 return newArgs; |
| 251 } on FileSystemException { | 249 } on FileSystemException { |
| 252 // Don't modify args if the file does not exist or cannot be read. | 250 // Don't modify args if the file does not exist or cannot be read. |
| 253 } | 251 } |
| 254 } | 252 } |
| 255 return args; | 253 return args; |
| 256 } | 254 } |
| OLD | NEW |