File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
codepropertygraph/src/main/scala/io/shiftleft/codepropertygraph/cpgloading Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ object CpgLoader {
4040 load(absolutePath, persistTo = path.resolveSibling(s " ${path.getFileName}.fg " ))
4141 } else {
4242 // assuming it's flatgraph format
43- Cpg .withStorage(absolutePath)
43+ val cpg = Cpg .withStorage(absolutePath)
44+ logger.debug(s " Loaded Cpg with ${cpg.graph.nodeCount} nodes and ${cpg.graph.edgeCount} edges " )
45+ cpg
4446 }
4547 }
4648
@@ -58,7 +60,7 @@ object CpgLoader {
5860 if (persistTo != from)
5961 Files .deleteIfExists(persistTo)
6062
61- if (! Files .exists(absolutePath)) {
63+ val cpg = if (! Files .exists(absolutePath)) {
6264 throw new FileNotFoundException (s " given input file $absolutePath does not exist " )
6365 } else if (isProtoFormat(absolutePath)) {
6466 logger.debug(s " Converting $from from proto cpg into new flatgraph storage: $persistTo" )
@@ -73,6 +75,9 @@ object CpgLoader {
7375 s " unknown file format - we probed the first bytes but it didn't look like one of our known formats (proto.zip, flatgraph, overflowdb) "
7476 )
7577 }
78+ logger.debug(s " Loaded Cpg with ${cpg.graph.nodeCount} nodes and ${cpg.graph.edgeCount} edges " )
79+
80+ cpg
7681 }
7782
7883 /** Determine whether the CPG is a legacy (proto) CPG */
You can’t perform that action at this time.
0 commit comments