Merge branch 'master' of github.com:multilang-depends/depends
This commit is contained in:
commit
933150b026
|
@ -50,7 +50,7 @@ The CLI tool usage could be listed by ```depends --help```, like following:
|
|||
-h, --help Display this help and exit
|
||||
-s, --strip-leading-path Strip the leading path.
|
||||
|
||||
-m, --map Output DV8 dependency map file.
|
||||
-m, --n-map-files Output DV8 dependency map file.
|
||||
-p, --namepattern=<namePathPattern>
|
||||
The name path separators.[default(/),dot(.)
|
||||
|
||||
|
|
|
@ -150,6 +150,9 @@ public abstract class DependencyGenerator {
|
|||
Entity fromFile = fromEntity.getAncestorOfType(FileEntity.class);
|
||||
Entity toFile = toEntity.getAncestorOfType(FileEntity.class);
|
||||
|
||||
// If the toEntity is above the file level (e.g. a package), then toFile will be null.
|
||||
if (toFile == null) return null;
|
||||
|
||||
return new DependencyDetail(
|
||||
new LocationInfo(stripper.stripFilename(fromObject),typeOf(fromEntity),stripper.stripFilename(fromFile.getQualifiedName()),fromLineNumber),
|
||||
new LocationInfo(stripper.stripFilename(toObject),typeOf(toEntity),stripper.stripFilename(toFile.getQualifiedName()),toEntity.getLine()));
|
||||
|
|
Loading…
Reference in New Issue