File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -916,6 +916,10 @@ message CameraDetection
916916 //
917917 enum Color
918918 {
919+ // Allow aliases in enum
920+ //
921+ option allow_alias = true ;
922+
919923 // Color of the shape is unknown (must not be used in ground
920924 // truth).
921925 //
@@ -931,6 +935,7 @@ message CameraDetection
931935
932936 // Shape with gray color.
933937 //
938+ COLOR_GRAY = 3 ;
934939 COLOR_GREY = 3 ;
935940
936941 // Shape with white color.
Original file line number Diff line number Diff line change @@ -223,6 +223,10 @@ message StationaryObject
223223 //
224224 enum Material
225225 {
226+ // Allow aliases in enum
227+ //
228+ option allow_alias = true ;
229+
226230 // Type of the material is unknown (must not be used in ground
227231 // truth).
228232 //
@@ -254,6 +258,7 @@ message StationaryObject
254258
255259 // Glass structure.
256260 //
261+ MATERIAL_GLASS = 7 ;
257262 MATERIAL_GLAS = 7 ;
258263
259264 // Mud structure.
@@ -303,6 +308,10 @@ message StationaryObject
303308 //
304309 enum Color
305310 {
311+ // Allow aliases in enum
312+ //
313+ option allow_alias = true ;
314+
306315 // Color is unknown (must not be used in ground truth).
307316 //
308317 COLOR_UNKNOWN = 0 ;
@@ -339,8 +348,9 @@ message StationaryObject
339348 //
340349 COLOR_BLACK = 8 ;
341350
342- // GREY .
351+ // GRAY .
343352 //
353+ COLOR_GRAY = 9 ;
344354 COLOR_GREY = 9 ;
345355
346356 // White.
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ def test_correct_enum_name(self):
2525 if matchComment is not None :
2626 statement = line [: matchComment .start ()]
2727 comment = line [matchComment .end () :]
28+ elif re .search ("option allow_alias" , line ):
29+ statement = ""
30+ comment = ""
2831 else :
2932 statement = line
3033 comment = ""
@@ -123,6 +126,9 @@ def test_invalid_enum(self):
123126 if matchComment is not None :
124127 statement = line [: matchComment .start ()]
125128 comment = line [matchComment .end () :]
129+ elif re .search ("option allow_alias" , line ):
130+ statement = ""
131+ comment = ""
126132 else :
127133 statement = line
128134 comment = ""
You can’t perform that action at this time.
0 commit comments