3e333a0bf379d29b2eef50eb00e3632f2ec8d4e7
[docs.git] / docs / contributor-guides / coding-guidelines / coding-guidelines-yang.rst
1 .. _coding-guidelines-yang:
2
3 ##########################
4 Coding Guidelines for YANG
5 ##########################
6
7 *Note: This document is a work in progress.*
8
9 -  Do not use underscores ('_') in identifiers.
10    JDK 9 is on track to making underscores forbidden in identifiers, which means
11    we will need to map them and it is not going to be pleasant :-(
12 -  Each declaration needs to have either a description or a reference to a
13    defintion document (like an IETF draft)
14 -  Use typedefs to declare concepts. An UUID is typeless, so each instance
15    should have its scope, so we know its applicability domain.
16    'type string' should only be used to things like free-form comments and
17    similar. Please attach a 'units' statement whenever possible.
18 -  TBD