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

Side by Side Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 1437703003: Improves options validation type safety (#24885). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | pkg/analyzer/lib/source/analysis_options_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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 context.directory.manager; 5 library context.directory.manager;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:core' hide Resource; 10 import 'dart:core' hide Resource;
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 498 }
499 }); 499 });
500 500
501 // In case options files are removed, revert to default options. 501 // In case options files are removed, revert to default options.
502 if (optionsRemoved) { 502 if (optionsRemoved) {
503 info.context.analysisOptions = new AnalysisOptionsImpl(); 503 info.context.analysisOptions = new AnalysisOptionsImpl();
504 return; 504 return;
505 } 505 }
506 506
507 // Analysis options are processed 'in-line'. 507 // Analysis options are processed 'in-line'.
508 YamlMap analyzer = options[AnalyzerOptions.analyzer]; 508 YamlNode analyzer = options[AnalyzerOptions.analyzer];
509 if (analyzer == null) { 509 if (analyzer is! YamlMap) {
510 // No options for analyzer. 510 // No options for analyzer.
511 return; 511 return;
512 } 512 }
513 513
514 configureContextOptions(info.context, options); 514 configureContextOptions(info.context, options);
515 515
516 // Set ignore patterns. 516 // Set ignore patterns.
517 YamlList exclude = analyzer[AnalyzerOptions.exclude]; 517 YamlList exclude = analyzer[AnalyzerOptions.exclude];
518 if (exclude != null) { 518 if (exclude != null) {
519 setIgnorePatternsForContext(info, exclude); 519 setIgnorePatternsForContext(info, exclude);
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 var path = resourceProvider.pathContext.fromUri(uri); 1454 var path = resourceProvider.pathContext.fromUri(uri);
1455 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; 1455 packageMap[name] = <Folder>[resourceProvider.getFolder(path)];
1456 } 1456 }
1457 }); 1457 });
1458 return <UriResolver>[new SdkExtUriResolver(packageMap)]; 1458 return <UriResolver>[new SdkExtUriResolver(packageMap)];
1459 } else { 1459 } else {
1460 return const <UriResolver>[]; 1460 return const <UriResolver>[];
1461 } 1461 }
1462 } 1462 }
1463 } 1463 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/source/analysis_options_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698