Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate the extension namespaces for extending Cpg and Step class. (#…
…160) This became necessary because we otherwise ended up with the Step extension methods as method on the Cpg class. Since this does not make sense it did not compile but was suggest in code completion and more important it ended up in the docs.
- Loading branch information
Showing
11 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...teps/ext/queryprimitives/Enrichable.scala → ...raph/ext/queryprimitives/Enrichable.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...aph/src/main/scala/io/shiftleft/codepropertygraph/ext/queryprimitivesext/Enrichable.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.shiftleft.codepropertygraph.ext.queryprimitivesext | ||
|
||
/** Sole purpose of this trait is to allow to enrich ('pimp') this DSL without the need of additional | ||
* imports a la `import x.y.z.Implicits._`. We're making use of the fact that package objects of | ||
* inherited traits are automatically part of implicit scope. This way, these extensions also show | ||
* up in scaladoc. | ||
* | ||
* Important: this project should *not* define anything in the `ext` package object. If it does, | ||
* it will be shadowed by enriching libraries. | ||
*/ | ||
trait Enrichable {} |
11 changes: 11 additions & 0 deletions
11
...ygraph/src/main/scala/io/shiftleft/codepropertygraph/ext/securityprofile/Enrichable.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.shiftleft.codepropertygraph.ext.securityprofile | ||
|
||
/** Sole purpose of this trait is to allow to enrich ('pimp') this DSL without the need of additional | ||
* imports a la `import x.y.z.Implicits._`. We're making use of the fact that package objects of | ||
* inherited traits are automatically part of implicit scope. This way, these extensions also show | ||
* up in scaladoc. | ||
* | ||
* Important: this project should *not* define anything in the `ext` package object. If it does, | ||
* it will be shadowed by enriching libraries. | ||
*/ | ||
trait Enrichable {} |
11 changes: 11 additions & 0 deletions
11
...pertygraph/src/main/scala/io/shiftleft/codepropertygraph/ext/semanticcpg/Enrichable.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.shiftleft.codepropertygraph.ext.semanticcpg | ||
|
||
/** Sole purpose of this trait is to allow to enrich ('pimp') this DSL without the need of additional | ||
* imports a la `import x.y.z.Implicits._`. We're making use of the fact that package objects of | ||
* inherited traits are automatically part of implicit scope. This way, these extensions also show | ||
* up in scaladoc. | ||
* | ||
* Important: this project should *not* define anything in the `ext` package object. If it does, | ||
* it will be shadowed by enriching libraries. | ||
*/ | ||
trait Enrichable {} |
4 changes: 2 additions & 2 deletions
4
...s/steps/ext/queryprimitives/package.scala → ...tygraph/ext/queryprimitives/package.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package io.shiftleft.queryprimitives.steps.ext | ||
package io.shiftleft.codepropertygraph.ext | ||
|
||
import io.shiftleft.codepropertygraph.Cpg | ||
import io.shiftleft.queryprimitives.steps.starters.NodeTypeStarters | ||
|
||
package object queryprimitives { | ||
|
||
implicit def toNodeTypeStarters(cpg: Cpg): NodeTypeStarters = | ||
new NodeTypeStarters(cpg) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.