... | ... | @@ -23,7 +23,7 @@ Use 192.0.2.0/24 (see [RFC5737](https://tools.ietf.org/html/rfc5737) and 2001:db |
|
|
|
|
|
We sprinkle comments in code with keywords to indicate pending work.
|
|
|
|
|
|
In Stork, `TODO` is preferred. If there is a corresponding ticket, feel free to specify its number in the comment. Unless other wise specified, issue #1234 means a ticket in the Gilab, available at http://gitlab.isc.org/isc-projects/stork.
|
|
|
In Stork, `TODO` is preferred. If there is a corresponding ticket, feel free to specify its number in the comment. Unless other wise specified, issue #1234 means a ticket in the Gitlab, available at http://gitlab.isc.org/isc-projects/stork.
|
|
|
|
|
|
## Function/method comments
|
|
|
Every non-trivial (trivial means one or two liner, such as getter or setter) function and method MUST be documented. While it's appreciated, the documentation doesn't have to be very thorough. Well expressed sentence is often enough. Make sure the description is as useful as possible. "Returns URL string" is bad. "Returns agent's contact point URL as a string" is much better.
|
... | ... | @@ -175,7 +175,7 @@ Unless there's a compelling reason to do so neither member value getter methods |
|
|
It is extremely important to examine all arguments passed into a log
|
|
|
statement to ensure they will produce safe values at runtime:
|
|
|
- Can the argument (or any part of it) be NULL? If so is this taken into account?
|
|
|
- If the argument invokes any fuctions, are they exception safe?
|
|
|
- If the argument invokes any functions, are they exception safe?
|
|
|
- If it involves indirection, does this always resolve into a usable value?
|
|
|
- If it raises an exception, is the exception caught? This includes double errors, i.e., log statements in an exception handler.
|
|
|
|
... | ... | @@ -197,7 +197,6 @@ examples of such guidelines. These are reference purposes only; |
|
|
unless explicitly stated we also adopt some part of other guidelines,
|
|
|
they are not part of the Stork's coding guidelines.
|
|
|
|
|
|
* Google: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
|
|
|
* Mozilla: https://developer.mozilla.org/en/Mozilla_Coding_Style_Guide
|
|
|
* XORP: http://cvsweb.xorp.org/cgi-bin/cvsweb.cgi/xorp/devnotes/coding-style.txt?rev=1.7;content-type=text%2Fplain
|
|
|
|
|
|
* Google: https://google.github.io/styleguide/cppguide.html
|
|
|
* Mozilla: https://firefox-source-docs.mozilla.org/code-quality/coding-style/index.html
|
|
|
* XORP: https://fossies.org/linux/xorp/devnotes/coding-style.txt |