Skip to content

Commit

Permalink
dartfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollins-g committed Apr 9, 2020
1 parent e0904ee commit 9c1de3c
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions lib/src/model/package.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,19 @@ class Package extends LibraryContainer
bool get isLocal {
if (_isLocal == null) {
_isLocal = (
// Document as local if this is the default package.
packageMeta == packageGraph.packageMeta ||
// Assume we want to document an embedded SDK as local if
// it has libraries defined in the default package.
// TODO(jcollins-g): Handle case where embedder SDKs can be
// assembled from multiple locations?
packageGraph.hasEmbedderSdk &&
packageMeta.isSdk &&
libraries.any(
(l) => path.isWithin(packageGraph.packageMeta.dir.path,
// Document as local if this is the default package.
packageMeta == packageGraph.packageMeta ||
// Assume we want to document an embedded SDK as local if
// it has libraries defined in the default package.
// TODO(jcollins-g): Handle case where embedder SDKs can be
// assembled from multiple locations?
packageGraph.hasEmbedderSdk &&
packageMeta.isSdk &&
libraries.any((l) => path.isWithin(
packageGraph.packageMeta.dir.path,
(l.element.source.fullName))) ||
// autoIncludeDependencies means everything is local.
packageGraph.config.autoIncludeDependencies
) &&
// autoIncludeDependencies means everything is local.
packageGraph.config.autoIncludeDependencies) &&
// Regardless of the above rules, do not document as local if
// we excluded this package by name.
!packageGraph.config.isPackageExcluded(name);
Expand Down

0 comments on commit 9c1de3c

Please sign in to comment.