Skip to content

Commit 68f5224

Browse files
committed
Clearly spell out rules for enum field values
Signed-off-by: Pierre R. Mai <pmai@pmsf.de>
1 parent d9b19c5 commit 68f5224

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

content/contributing/naming_conventions.adoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ message EnvironmentalConditions
4141
}
4242
----
4343

44-
Enum field names shall use _UPPER_SNAKE_CASE_.
45-
Enum fields shall always be prefixed with the name of the corresponding enum.
46-
The first enum field should always use the suffix _UNKNOWN_.
47-
The second enum field should always use the suffix _OTHER_.
44+
Enum field value names shall use _UPPER_SNAKE_CASE_.
45+
Enum field value names shall always be prefixed with the name of the corresponding enum.
46+
47+
For enum fields that are concerned with ground truth or sensor data, the first two enum values shall always be defined with the following rules:
48+
The first enum field value shall always use the suffix _UNKNOWN_.
49+
The second enum field value shall always use the suffix _OTHER_.
4850

4951
[source,protobuf,linenums]
5052
----
@@ -61,4 +63,6 @@ message EnvironmentalConditions
6163
AMBIENT_ILLUMINATION_LEVEL1 = 2;
6264
}
6365
}
64-
----
66+
----
67+
68+
Other enum fields, especially purely technical fields, can deviate from the rules for the first two field values.

0 commit comments

Comments
 (0)