Skip to content

Commit 07599d0

Browse files
isooskevmoo
authored andcommitted
Detect import that point outside of the lib. Fixes dart-lang#44. (dart-lang#46)
1 parent b8efbad commit 07599d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/src/summary.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ class DartFileSummary {
6262
/// Whether the file provides a public API for the package users.
6363
bool get isPublicApi => isInLib && !isInLibSrc;
6464

65+
/// Whether the file has any local import that point outside of the lib/
66+
bool get hasOutsideLibDependency =>
67+
directLibs != null &&
68+
directLibs.any((String lib) => lib.startsWith('path:'));
69+
6570
Map<String, dynamic> toJson() {
6671
var map = <String, dynamic>{
6772
'uri': uri,

0 commit comments

Comments
 (0)