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

Side by Side Diff: pkg/analyzer/lib/options.dart

Issue 560553002: Use pub list-package-dirs in analyzer command line (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: review- move deprecated message to --help Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/bin/analyzer.dart ('k') | pkg/analyzer/lib/source/package_map_provider.dart » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 options; 5 library options;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:args/args.dart'; 9 import 'package:args/args.dart';
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return options; 111 return options;
112 } 112 }
113 113
114 static CommandLineOptions _parse(List<String> args) { 114 static CommandLineOptions _parse(List<String> args) {
115 args = args.expand((String arg) => arg.split('=')).toList(); 115 args = args.expand((String arg) => arg.split('=')).toList();
116 var parser = new _CommandLineParser() 116 var parser = new _CommandLineParser()
117 ..addFlag('batch', abbr: 'b', help: 'Run in batch mode', 117 ..addFlag('batch', abbr: 'b', help: 'Run in batch mode',
118 defaultsTo: false, negatable: false) 118 defaultsTo: false, negatable: false)
119 ..addOption('dart-sdk', help: 'The path to the Dart SDK') 119 ..addOption('dart-sdk', help: 'The path to the Dart SDK')
120 ..addOption('package-root', abbr: 'p', 120 ..addOption('package-root', abbr: 'p',
121 help: 'The path to the package root') 121 help: 'The path to the package root. The flag package-root is deprecat ed. Remove to use package information computed by pub.')
122 ..addOption('format', 122 ..addOption('format',
123 help: 'Specifies the format in which errors are displayed') 123 help: 'Specifies the format in which errors are displayed')
124 ..addFlag('machine', 124 ..addFlag('machine',
125 help: 'Print errors in a format suitable for parsing (deprecated)', 125 help: 'Print errors in a format suitable for parsing (deprecated)',
126 defaultsTo: false, negatable: false) 126 defaultsTo: false, negatable: false)
127 ..addFlag('version', help: 'Print the analyzer version', 127 ..addFlag('version', help: 'Print the analyzer version',
128 defaultsTo: false, negatable: false) 128 defaultsTo: false, negatable: false)
129 ..addFlag('no-hints', help: 'Do not show hint results', 129 ..addFlag('no-hints', help: 'Do not show hint results',
130 defaultsTo: false, negatable: false) 130 defaultsTo: false, negatable: false)
131 ..addFlag('ignore-unrecognized-flags', 131 ..addFlag('ignore-unrecognized-flags',
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 _getNextFlagIndex(args, i) { 331 _getNextFlagIndex(args, i) {
332 for ( ; i < args.length; ++i) { 332 for ( ; i < args.length; ++i) {
333 if (args[i].startsWith('--')) { 333 if (args[i].startsWith('--')) {
334 return i; 334 return i;
335 } 335 }
336 } 336 }
337 return i; 337 return i;
338 } 338 }
339 } 339 }
OLDNEW
« no previous file with comments | « pkg/analyzer/bin/analyzer.dart ('k') | pkg/analyzer/lib/source/package_map_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698