-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup of sample scripts and operator extension #480
Conversation
import gremlin.scala.GremlinScala | ||
import io.shiftleft.semanticcpg.language.Steps | ||
|
||
class ArithmeticTrav(raw: GremlinScala[nodes.Arithmetic]) extends Steps[nodes.Arithmetic](raw) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this class be deleted?
|
||
import io.shiftleft.codepropertygraph.generated.nodes | ||
|
||
class Arithmetic(val call: nodes.Call) extends AnyRef {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto - is there any reason to have an empty class? The extends AnyRef
can also be dropped as it is implicit.
@@ -4,12 +4,10 @@ import io.shiftleft.codepropertygraph.generated.nodes | |||
import io.shiftleft.semanticcpg.language._ | |||
import io.shiftleft.semanticcpg.language.types.expressions.Identifier | |||
|
|||
class ArrayAccess(node: nodes.Call) { | |||
class ArrayAccess(val call: nodes.Call) extends AnyRef { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto w/ the AnyRef
. There are a few others below, too.
implicit def arrayAccessToCall( | ||
node: operatorextension.nodes.ArrayAccess): io.shiftleft.semanticcpg.language.nodemethods.CallMethods = | ||
node.call | ||
implicit def toOpsAstNodeTrav2[NodeType <: nodes.AstNode]( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth dropping the 2
in the name, I'm not too sure what it means here!
Concerning empty classes: they are not entirely empty, they do have that |
ArrayAccess