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/file_system/physical_file_system.dart'; | 9 import 'package:analyzer/file_system/physical_file_system.dart'; |
10 import 'package:analyzer/src/command_line/arguments.dart'; | 10 import 'package:analyzer/src/command_line/arguments.dart'; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'], | 165 ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'], |
166 lints = args['lints'], | 166 lints = args['lints'], |
167 log = args['log'], | 167 log = args['log'], |
168 machineFormat = args['format'] == 'machine', | 168 machineFormat = args['format'] == 'machine', |
169 perfReport = args['x-perf-report'], | 169 perfReport = args['x-perf-report'], |
170 shouldBatch = args['batch'], | 170 shouldBatch = args['batch'], |
171 showPackageWarnings = args['show-package-warnings'] || | 171 showPackageWarnings = args['show-package-warnings'] || |
172 args['package-warnings'] || | 172 args['package-warnings'] || |
173 args['x-package-warnings-prefix'] != null, | 173 args['x-package-warnings-prefix'] != null, |
174 showPackageWarningsPrefix = args['x-package-warnings-prefix'], | 174 showPackageWarningsPrefix = args['x-package-warnings-prefix'], |
175 showSdkWarnings = args['show-sdk-warnings'] || args['warnings'], | 175 showSdkWarnings = args['sdk-warnings'], |
176 sourceFiles = args.rest, | 176 sourceFiles = args.rest, |
177 warningsAreFatal = args['fatal-warnings'], | 177 warningsAreFatal = args['fatal-warnings'], |
178 strongMode = args['strong'], | 178 strongMode = args['strong'], |
179 implicitCasts = !args['no-implicit-casts'], | 179 implicitCasts = !args['no-implicit-casts'], |
180 implicitDynamic = !args['no-implicit-dynamic'], | 180 implicitDynamic = !args['no-implicit-dynamic'], |
181 lintsAreFatal = args['fatal-lints'], | 181 lintsAreFatal = args['fatal-lints'], |
182 useAnalysisDriverMemoryByteStore = | 182 useAnalysisDriverMemoryByteStore = |
183 args['use-analysis-driver-memory-byte-store'], | 183 args['use-analysis-driver-memory-byte-store'], |
184 verbose = args['verbose']; | 184 verbose = args['verbose']; |
185 | 185 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
308 ..addFlag('fatal-warnings', | 308 ..addFlag('fatal-warnings', |
309 help: 'Treat non-type warnings as fatal.', | 309 help: 'Treat non-type warnings as fatal.', |
310 defaultsTo: false, | 310 defaultsTo: false, |
311 negatable: false) | 311 negatable: false) |
312 ..addFlag('fatal-lints', | 312 ..addFlag('fatal-lints', |
313 help: 'Treat lints as fatal.', defaultsTo: false, negatable: false) | 313 help: 'Treat lints as fatal.', defaultsTo: false, negatable: false) |
314 ..addFlag('package-warnings', | 314 ..addFlag('package-warnings', |
315 help: 'Show warnings from package: imports.', | 315 help: 'Show warnings from package: imports.', |
316 defaultsTo: false, | 316 defaultsTo: false, |
317 negatable: false) | 317 negatable: false) |
318 ..addFlag('show-package-warnings', | |
319 help: 'Show warnings from package: imports (deprecated).', | |
320 defaultsTo: false, | |
321 negatable: false) | |
322 ..addFlag('warnings', | |
323 help: 'Show warnings from SDK imports.', | |
324 defaultsTo: false, | |
325 negatable: false) | |
326 ..addFlag('show-sdk-warnings', | |
327 help: 'Show warnings from SDK imports (deprecated).', | |
328 defaultsTo: false, | |
329 negatable: false) | |
330 ..addFlag('help', | 318 ..addFlag('help', |
331 abbr: 'h', | 319 abbr: 'h', |
332 help: | 320 help: |
333 'Display this help message. Add --verbose to show hidden options.' , | 321 'Display this help message. Add --verbose to show hidden options.' , |
334 defaultsTo: false, | 322 defaultsTo: false, |
335 negatable: false) | 323 negatable: false) |
336 ..addFlag('verbose', | 324 ..addFlag('verbose', |
337 abbr: 'v', | 325 abbr: 'v', |
338 defaultsTo: false, | 326 defaultsTo: false, |
339 help: 'Verbose output.', | 327 help: 'Verbose output.', |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
412 ..addOption('x-package-warnings-prefix', | 400 ..addOption('x-package-warnings-prefix', |
413 help: | 401 help: |
414 'Show warnings from package: imports that match the given prefix', | 402 'Show warnings from package: imports that match the given prefix', |
415 hide: hide) | 403 hide: hide) |
416 ..addFlag('enable-conditional-directives', | 404 ..addFlag('enable-conditional-directives', |
417 help: | 405 help: |
418 'deprecated -- Enable support for conditional directives (DEP 40). ', | 406 'deprecated -- Enable support for conditional directives (DEP 40). ', |
419 defaultsTo: false, | 407 defaultsTo: false, |
420 negatable: false, | 408 negatable: false, |
421 hide: hide) | 409 hide: hide) |
410 ..addFlag('show-package-warnings', | |
Brian Wilkerson
2017/02/22 22:01:59
"remove the deprecated --show-package-warnings" -
devoncarew
2017/02/22 22:07:43
ack - this should have read "hide --show-package-w
| |
411 help: 'Show warnings from package: imports (deprecated).', | |
412 defaultsTo: false, | |
413 negatable: false, | |
414 hide: hide) | |
415 ..addFlag('sdk-warnings', | |
416 help: 'Show warnings from SDK imports.', | |
417 defaultsTo: false, | |
418 negatable: false, | |
419 hide: hide) | |
422 ..addFlag('log', | 420 ..addFlag('log', |
423 help: 'Log additional messages and exceptions.', | 421 help: 'Log additional messages and exceptions.', |
424 defaultsTo: false, | 422 defaultsTo: false, |
425 negatable: false, | 423 negatable: false, |
426 hide: hide) | 424 hide: hide) |
427 ..addFlag('enable_type_checks', | 425 ..addFlag('enable_type_checks', |
428 help: 'Check types in constant evaluation.', | 426 help: 'Check types in constant evaluation.', |
429 defaultsTo: false, | 427 defaultsTo: false, |
430 negatable: false, | 428 negatable: false, |
431 hide: hide) | 429 hide: hide) |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
516 'Usage: $_binaryName [options...] <directory or list of files>'); | 514 'Usage: $_binaryName [options...] <directory or list of files>'); |
517 errorSink.writeln(''); | 515 errorSink.writeln(''); |
518 errorSink.writeln(parser.usage); | 516 errorSink.writeln(parser.usage); |
519 errorSink.writeln(''); | 517 errorSink.writeln(''); |
520 errorSink.writeln(''' | 518 errorSink.writeln(''' |
521 Run "dartanalyzer -h -v" for verbose help output, including less commonly used o ptions. | 519 Run "dartanalyzer -h -v" for verbose help output, including less commonly used o ptions. |
522 For more information, see http://www.dartlang.org/tools/analyzer. | 520 For more information, see http://www.dartlang.org/tools/analyzer. |
523 '''); | 521 '''); |
524 } | 522 } |
525 } | 523 } |
OLD | NEW |