For our taint analysis implementation, we need to refactor the Violation struct to be able to represent both single region (what we support currently) violations as well as "code flow" violations.
While doing so, I noticed that ServerViolation is a manual copy of Violation, created so we can serialize the values differently on the server. This is no longer necessary, so we might as well clean it up.
What is your solution?
ServerViolation was introduced because we needed the edit_type serialization to remain snake_case, but the kernel needed it to be camelCase so serde_v8 could parse stella violations.
What problem are you trying to solve?
For our taint analysis implementation, we need to refactor the
Violation
struct to be able to represent both single region (what we support currently) violations as well as "code flow" violations.While doing so, I noticed that
ServerViolation
is a manual copy of Violation, created so we can serialize the values differently on the server. This is no longer necessary, so we might as well clean it up.What is your solution?
ServerViolation
was introduced because we needed theedit_type
serialization to remain snake_case, but the kernel needed it to be camelCase soserde_v8
could parse stella violations.This was made unnecessary by https://github.com/DataDog/datadog-static-analyzer/pull/382, which changed the naming away from "editType".
Alternatives considered
What the reviewer should know