Skip to content

Commit 0e136d4

Browse files
Remove unused node properties and fix formatting
1 parent 1f3ce69 commit 0e136d4

3 files changed

Lines changed: 7 additions & 62 deletions

File tree

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/PropertyNames.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ public class PropertyNames {
4141
and trade off between false negatives and false positives). */
4242
public static final String CANONICAL_NAME = "CANONICAL_NAME";
4343

44-
45-
public static final String CLASS_NAME = "CLASS_NAME";
46-
47-
48-
public static final String CLASS_SHORT_NAME = "CLASS_SHORT_NAME";
49-
5044
/** Identifier which uniquely describes a CLOSURE_BINDING. This property is used to match captured LOCAL nodes with the corresponding CLOSURE_BINDING nodes */
5145
public static final String CLOSURE_BINDING_ID = "CLOSURE_BINDING_ID";
5246

@@ -196,19 +190,13 @@ it is referenced but not defined in the code (applies both to insular
196190
to have exactly one METHOD node for each METHOD_FULL_NAME */
197191
public static final String METHOD_FULL_NAME = "METHOD_FULL_NAME";
198192

199-
200-
public static final String METHOD_SHORT_NAME = "METHOD_SHORT_NAME";
201-
202193
/** The modifier type is a free-form string. The following are known modifier types:
203194
`STATIC`, `PUBLIC`, `PROTECTED`, `PRIVATE`, `ABSTRACT`, `NATIVE`, `CONSTRUCTOR`, `VIRTUAL`. */
204195
public static final String MODIFIER_TYPE = "MODIFIER_TYPE";
205196

206197
/** Name of represented object, e.g., method name (e.g. "run") */
207198
public static final String NAME = "NAME";
208199

209-
210-
public static final String NODE_LABEL = "NODE_LABEL";
211-
212200
/** Start offset into the CONTENT property of the corresponding FILE node.
213201
The offset is such that parts of the content can easily
214202
be accessed via `content.substring(offset, offsetEnd)`.
@@ -235,9 +223,6 @@ This means that the offset must be measured in utf16 encoding (i.e. neither in
235223
between each other. */
236224
public static final String OVERLAYS = "OVERLAYS";
237225

238-
239-
public static final String PACKAGE_NAME = "PACKAGE_NAME";
240-
241226
/** AST node type name emitted by parser. */
242227
public static final String PARSER_TYPE_NAME = "PARSER_TYPE_NAME";
243228

@@ -259,9 +244,6 @@ This means that the offset must be measured in utf16 encoding (i.e. neither in
259244
implementor to fit the source language. */
260245
public static final String SIGNATURE = "SIGNATURE";
261246

262-
263-
public static final String SYMBOL = "SYMBOL";
264-
265247
/** The static type decl of a TYPE. This property is matched against the FULL_NAME
266248
of TYPE_DECL nodes. It is required to have exactly one TYPE_DECL for each
267249
different TYPE_DECL_FULL_NAME */
@@ -290,8 +272,6 @@ This means that the offset must be measured in utf16 encoding (i.e. neither in
290272
add(AST_PARENT_FULL_NAME);
291273
add(AST_PARENT_TYPE);
292274
add(CANONICAL_NAME);
293-
add(CLASS_NAME);
294-
add(CLASS_SHORT_NAME);
295275
add(CLOSURE_BINDING_ID);
296276
add(CLOSURE_ORIGINAL_NAME);
297277
add(CODE);
@@ -323,21 +303,17 @@ This means that the offset must be measured in utf16 encoding (i.e. neither in
323303
add(LINE_NUMBER);
324304
add(LINE_NUMBER_END);
325305
add(METHOD_FULL_NAME);
326-
add(METHOD_SHORT_NAME);
327306
add(MODIFIER_TYPE);
328307
add(NAME);
329-
add(NODE_LABEL);
330308
add(OFFSET);
331309
add(OFFSET_END);
332310
add(ORDER);
333311
add(OVERLAYS);
334-
add(PACKAGE_NAME);
335312
add(PARSER_TYPE_NAME);
336313
add(POSSIBLE_TYPES);
337314
add(ROOT);
338315
add(SECONDARY_ID);
339316
add(SIGNATURE);
340-
add(SYMBOL);
341317
add(TYPE_DECL_FULL_NAME);
342318
add(TYPE_FULL_NAME);
343319
add(VALUE);

schema/src/main/scala/io/shiftleft/codepropertygraph/schema/CpgSchema.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ class CpgSchema(builder: SchemaBuilder) {
2323

2424
val shortcuts = Shortcuts(builder, base, method, ast, typeSchema, fs)
2525

26-
val sourceSpecific = Comment(builder, base, ast, fs)
27-
val tags = Tags(builder, base, typeSchema, method, ast, fs, callGraph)
28-
val binding = Binding(builder, base, typeSchema, method, callGraph)
29-
val annotation = Annotation(builder, base, method, typeSchema, ast, shortcuts)
30-
val finding = Finding(builder, base)
31-
val hidden = Hidden(builder, base, method, typeSchema, ast, cfg, fs, callGraph, pdg, tags, shortcuts)
26+
val sourceSpecific = Comment(builder, base, ast, fs)
27+
val tags = Tags(builder, base, typeSchema, method, ast, fs, callGraph)
28+
val binding = Binding(builder, base, typeSchema, method, callGraph)
29+
val annotation = Annotation(builder, base, method, typeSchema, ast, shortcuts)
30+
val finding = Finding(builder, base)
31+
val hidden = Hidden(builder, base, method, typeSchema, ast, cfg, fs, callGraph, pdg, tags, shortcuts)
3232
val protoSerialize = ProtoSerialize(builder, ast)
3333
}
3434

schema/src/main/scala/io/shiftleft/codepropertygraph/schema/Tags.scala

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package io.shiftleft.codepropertygraph.schema
22

3-
import io.shiftleft.codepropertygraph.schema.CpgSchema.PropertyDefaults
4-
import flatgraph.schema.Property.ValueType
53
import flatgraph.schema._
64

75
object Tags extends SchemaBase {
@@ -44,36 +42,7 @@ object Tags extends SchemaBase {
4442
import callGraph._
4543
implicit private val schemaInfo: SchemaInfo = SchemaInfo.forClass(getClass)
4644

47-
// node properties
48-
val symbol = builder
49-
.addProperty(name = "SYMBOL", valueType = ValueType.String, comment = "")
50-
.mandatory(PropertyDefaults.String)
51-
.protoId(ProtoIds.Symbol)
52-
53-
val methodShortName = builder
54-
.addProperty(name = "METHOD_SHORT_NAME", valueType = ValueType.String, comment = "")
55-
.mandatory(PropertyDefaults.String)
56-
.protoId(ProtoIds.MethodShortName)
57-
58-
val packageName = builder
59-
.addProperty(name = "PACKAGE_NAME", valueType = ValueType.String, comment = "")
60-
.mandatory(PropertyDefaults.String)
61-
.protoId(ProtoIds.PackageName)
62-
63-
val className = builder
64-
.addProperty(name = "CLASS_NAME", valueType = ValueType.String, comment = "")
65-
.mandatory(PropertyDefaults.String)
66-
.protoId(ProtoIds.ClassName)
67-
68-
val classShortName = builder
69-
.addProperty(name = "CLASS_SHORT_NAME", valueType = ValueType.String, comment = "")
70-
.mandatory(PropertyDefaults.String)
71-
.protoId(ProtoIds.ClassShortName)
72-
73-
val nodeLabel = builder
74-
.addProperty(name = "NODE_LABEL", valueType = ValueType.String, comment = "")
75-
.mandatory(PropertyDefaults.String)
76-
.protoId(ProtoIds.NodeLabel)
45+
// node properties
7746

7847
val taggedBy = builder
7948
.addEdgeType(name = "TAGGED_BY", comment = "Edges from nodes to the tags they are tagged by.")

0 commit comments

Comments
 (0)