OLD | NEW |
---|---|
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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
477 (OptionsProcessor p) => p.optionsProcessed(info.context, options)); | 477 (OptionsProcessor p) => p.optionsProcessed(info.context, options)); |
478 | 478 |
479 // Analysis options are processed 'in-line'. | 479 // Analysis options are processed 'in-line'. |
480 // TODO(pq): consider pushing exclude handling into a plugin. | 480 // TODO(pq): consider pushing exclude handling into a plugin. |
481 YamlMap analyzer = options['analyzer']; | 481 YamlMap analyzer = options['analyzer']; |
482 if (analyzer == null) { | 482 if (analyzer == null) { |
483 // No options for analyzer. | 483 // No options for analyzer. |
484 return; | 484 return; |
485 } | 485 } |
486 | 486 |
487 // Set strong mode. | |
488 var strongMode = analyzer['strong-mode']; | |
489 if (strongMode != null && strongMode == true) { | |
Brian Wilkerson
2015/10/13 20:12:02
The expression "strongMode != null" isn't necessar
| |
490 AnalysisContext context = info.context; | |
491 AnalysisOptionsImpl options = | |
492 new AnalysisOptionsImpl.from(context.analysisOptions); | |
493 options.strongMode = true; | |
Jennifer Messerly
2015/10/13 20:00:28
we had an issue at some point where we also needed
pquitslund
2015/10/13 20:10:58
Oh! Interesting. Leaf/Brian?
Brian Wilkerson
2015/10/13 20:12:02
I don't remember. But eventually, to support this
Leaf
2015/10/13 20:20:38
Will we be analyzing the SDK in strong mode with t
Jennifer Messerly
2015/10/13 20:20:54
yeah. I guess this isn't a big issue yet, until we
| |
494 context.analysisOptions = options; | |
495 } | |
496 | |
487 // Set ignore patterns. | 497 // Set ignore patterns. |
488 YamlList exclude = analyzer['exclude']; | 498 YamlList exclude = analyzer['exclude']; |
489 if (exclude != null) { | 499 if (exclude != null) { |
490 setIgnorePatternsForContext(info, exclude); | 500 setIgnorePatternsForContext(info, exclude); |
491 } | 501 } |
492 } | 502 } |
493 | 503 |
494 @override | 504 @override |
495 void refresh(List<Resource> roots) { | 505 void refresh(List<Resource> roots) { |
496 // Destroy old contexts | 506 // Destroy old contexts |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1432 var path = resourceProvider.pathContext.fromUri(uri); | 1442 var path = resourceProvider.pathContext.fromUri(uri); |
1433 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; | 1443 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; |
1434 } | 1444 } |
1435 }); | 1445 }); |
1436 return <UriResolver>[new SdkExtUriResolver(packageMap)]; | 1446 return <UriResolver>[new SdkExtUriResolver(packageMap)]; |
1437 } else { | 1447 } else { |
1438 return const <UriResolver>[]; | 1448 return const <UriResolver>[]; |
1439 } | 1449 } |
1440 } | 1450 } |
1441 } | 1451 } |
OLD | NEW |