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

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

Issue 22865011: Fix warnings in analyzer_experimental (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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_experimental/lib/analyzer.dart ('k') | no next file » | 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 'package:args/args.dart'; 7 import 'package:args/args.dart';
8 import 'package:path/path.dart'; 8 import 'package:path/path.dart';
9 9
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 static _showUsage(parser) { 148 static _showUsage(parser) {
149 print('Usage: $_BINARY_NAME [options...] <libraries to analyze...>'); 149 print('Usage: $_BINARY_NAME [options...] <libraries to analyze...>');
150 print(parser.getUsage()); 150 print(parser.getUsage());
151 print(''); 151 print('');
152 print('For more information, see http://www.dartlang.org/tools/analyzer.'); 152 print('For more information, see http://www.dartlang.org/tools/analyzer.');
153 } 153 }
154 154
155 static String _getVersion() { 155 static String _getVersion() {
156 try { 156 try {
157 Path versionPath = join(dirname(Platform.script), '..', 'version');; 157 String versionPath = join(dirname(Platform.script), '..', 'version');;
158 File versionFile = new File.fromPath(versionPath); 158 File versionFile = new File(versionPath);
159 return versionFile.readAsStringSync().trim(); 159 return versionFile.readAsStringSync().trim();
160 } catch (_) { 160 } catch (_) {
161 // This happens when the script is not running in the context of an SDK. 161 // This happens when the script is not running in the context of an SDK.
162 return "<unknown>"; 162 return "<unknown>";
163 } 163 }
164 } 164 }
165 } 165 }
166 166
167 /** 167 /**
168 * Commandline argument parser. 168 * Commandline argument parser.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 _getNextFlagIndex(args, i) { 257 _getNextFlagIndex(args, i) {
258 for ( ; i < args.length; ++i) { 258 for ( ; i < args.length; ++i) {
259 if (args[i].startsWith('--')) { 259 if (args[i].startsWith('--')) {
260 return i; 260 return i;
261 } 261 }
262 } 262 }
263 return i; 263 return i;
264 } 264 }
265 } 265 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/lib/analyzer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698