Skip to content

Commit

Permalink
🔥 Code Cleanup (#52)
Browse files Browse the repository at this point in the history
* 🔥 Removed unused query

* ⚡ Improved schema violation check

* 🔥 Removed EdgeLabel from drivers

* 🔥 Removed the rest of the enums

* 🔥 Removed some more code

* 💚 Fixing build
  • Loading branch information
DavidBakerEffendi authored Feb 3, 2021
1 parent d069098 commit d8d84bc
Show file tree
Hide file tree
Showing 36 changed files with 531 additions and 925 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added

### Changed
- Replaced Plume enums with `codepropertygraph` constants

### Fixed

Expand Down
9 changes: 0 additions & 9 deletions cpgconv/src/main/scala/io/github/plume/oss/Traversals.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ object Traversals {
.asJava
}

def getWholeGraph(graph: Graph): util.List[(StoredNode, util.List[Edge])] = {
Cpg(graph).all
.map { node =>
(node, node.outE.asScala.toList.asJava)
}
.l
.asJava
}

import overflowdb.traversal._
def getProgramStructure(graph: Graph): util.List[Edge] = {
val edgesFromFile: List[Edge] = Cpg(graph).file
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

139 changes: 0 additions & 139 deletions plume/src/main/kotlin/io/github/plume/oss/domain/enums/VertexLabel.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package io.github.plume.oss.domain.exceptions

import io.github.plume.oss.domain.enums.EdgeLabel
import io.shiftleft.codepropertygraph.generated.nodes.NewNodeBuilder

/**
* Thrown when an invalid edge connection is attempted to be created between two [NewNodeBuilder]s.
*/
class PlumeSchemaViolationException(fromV: NewNodeBuilder, toV: NewNodeBuilder, edgeLabel: EdgeLabel) :
class PlumeSchemaViolationException(fromV: NewNodeBuilder, toV: NewNodeBuilder, edgeLabel: String) :
RuntimeException("CPG schema violation adding a $edgeLabel edge from ${fromV.javaClass.simpleName} to ${toV.javaClass.simpleName}")
Loading

0 comments on commit d8d84bc

Please sign in to comment.