[bind10-dev] coding guidelines

Francis Dupont fdupont at isc.org
Sun Oct 14 10:30:26 UTC 2012


I was reading the coding guideline wiki
(http://bind10.isc.org/wiki/CodingGuidelines)
and I got some questions/comments:

 - Close all file and socket objects: running tests (aka make check) on
  some systems show it is not enforced in tests. Perhaps it doesn't
  matter, perhaps it is too easy to leak a file or socket descriptor?
  (PS: the messages are from a closing python in debug mode as far as
   I can remember)

 - Ordering Include Files: the proposed order is the opposite of the
  usual one but IMHO it is from the statement about header files themselves.
  BTW how this applies to config.h?

 - Ordering Include Files: this section MUST decide about <> vs "" and
  IMHO suggest full relative paths (i.e., dns/message.h even in the
  src/lib/dns directory): the idea is to have *only* -I$(xxx)/src/lib
  in the Makefile. BTW this avoids ambiguity with 2 headers with the
  same name.

 - Tabs & Indentation: the reference to subversion is obsolete.

 - Operator Overloading "deprecated rule": IMHO the idea was to avoid
  a concrete (vs. abstract) class where all operators can be hidden
  (BTW this could make testing a challenge :-).

 - Non-copyable Classes: should be updated according to ticket 2144
  and non-assignable added

Thanks

Francis Dupont <fdupont at isc.org>


More information about the bind10-dev mailing list