Skip to content

Commit 5745592

Browse files
authored
Update path to example CPGs (#1025)
* Update path to example CPGs. * Include imports.
1 parent 91b3905 commit 5745592

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,17 @@ https://docs.shiftleft.io/core-concepts/code-property-graph
8989

9090
Here's how you can load a cpg into ShiftLeft Tinkergraph [3] in the sbt console - the next section will list some queries you can interactively run from there.
9191

92-
There are some sample cpgs in this repository in the `resources/cpgs` directory.
92+
There are some sample cpgs in this repository in the `resources/testcode/cpgs` directory.
9393
You can run `./regenerate-test-cpgs.sh` to update them, but this requires the proprietary java2cpg installed locally.
9494

9595
### [Tinkergraph (in memory reference db)](http://tinkerpop.apache.org/docs/current/reference/#tinkergraph-gremlin)
9696
```
9797
sbt semanticcpg/console
9898
```
9999
```scala
100-
val cpg = io.shiftleft.codepropertygraph.cpgloading.CpgLoader.load("./resources/cpgs/helloshiftleft/cpg.bin.zip")
100+
import io.shiftleft.codepropertygraph.Cpg
101+
import io.shiftleft.semanticcpg.language._
102+
val cpg = io.shiftleft.codepropertygraph.cpgloading.CpgLoader.load("./resources/testcode/cpgs/hello-shiftleft-0.0.5/cpg.bin.zip")
101103
```
102104

103105
# Querying the cpg

0 commit comments

Comments
 (0)