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

Side by Side Diff: pkg/analyzer_cli/lib/src/build_mode.dart

Issue 2196393003: Mark analyzer_cli as strong-mode clean (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « pkg/analyzer_cli/.analysis_options ('k') | pkg/analyzer_cli/lib/src/driver.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) 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.build_mode; 5 library analyzer_cli.src.build_mode;
6 6
7 import 'dart:core' hide Resource; 7 import 'dart:core' hide Resource;
8 import 'dart:io' as io; 8 import 'dart:io' as io;
9 9
10 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit; 10 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 /** 62 /**
63 * Perform a single loop step. 63 * Perform a single loop step.
64 */ 64 */
65 @override 65 @override
66 WorkResponse performRequest(WorkRequest request) { 66 WorkResponse performRequest(WorkRequest request) {
67 errorBuffer.clear(); 67 errorBuffer.clear();
68 outBuffer.clear(); 68 outBuffer.clear();
69 try { 69 try {
70 // Add in the dart-sdk argument if `dartSdkPath` is not null, otherwise it 70 // Add in the dart-sdk argument if `dartSdkPath` is not null, otherwise it
71 // will try to find the currently installed sdk. 71 // will try to find the currently installed sdk.
72 var arguments = new List.from(request.arguments); 72 var arguments = new List<String>.from(request.arguments);
73 if (dartSdkPath != null && 73 if (dartSdkPath != null &&
74 !arguments.any((arg) => arg.startsWith('--dart-sdk'))) { 74 !arguments.any((arg) => arg.startsWith('--dart-sdk'))) {
75 arguments.add('--dart-sdk=$dartSdkPath'); 75 arguments.add('--dart-sdk=$dartSdkPath');
76 } 76 }
77 // Prepare options. 77 // Prepare options.
78 CommandLineOptions options = 78 CommandLineOptions options =
79 CommandLineOptions.parse(arguments, (String msg) { 79 CommandLineOptions.parse(arguments, (String msg) {
80 throw new ArgumentError(msg); 80 throw new ArgumentError(msg);
81 }); 81 });
82 // Analyze and respond. 82 // Analyze and respond.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 'Illegal input file (must be "\$uri|\$path"): $sourceFile'); 382 'Illegal input file (must be "\$uri|\$path"): $sourceFile');
383 return null; 383 return null;
384 } 384 }
385 Uri uri = Uri.parse(sourceFile.substring(0, pipeIndex)); 385 Uri uri = Uri.parse(sourceFile.substring(0, pipeIndex));
386 String path = sourceFile.substring(pipeIndex + 1); 386 String path = sourceFile.substring(pipeIndex + 1);
387 uriToFileMap[uri] = new JavaFile(path); 387 uriToFileMap[uri] = new JavaFile(path);
388 } 388 }
389 return uriToFileMap; 389 return uriToFileMap;
390 } 390 }
391 } 391 }
OLDNEW
« no previous file with comments | « pkg/analyzer_cli/.analysis_options ('k') | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698