Skip to content

Commit e448db6

Browse files
authored
Merge pull request diffblue#2708 from owen-jones-diffblue/coding-standard-class-comments
Document classes and member variables unless obvious
2 parents 98657d8 + 519370d commit e448db6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

CODING_STANDARD.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ Formatting is enforced using clang-format. For more information about this, see
5959
```
6060
Note that the `\file` tag must be immediately followed by a newline in order
6161
for Doxygen to relate the comment to the current file.
62-
- Each function should be preceded by a Doxygen comment describing that
63-
function. The format should match the [LLVM
62+
- Each class, member variable and function should be preceded by a Doxygen
63+
comment describing it when it is not immediately obvious what it does. The
64+
format should match the [LLVM
6465
guidelines](http://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments),
65-
with one extension: `\param` and `\return` comments longer than a single line
66-
should have subsequent lines indented by two spaces, so that the tags stand
67-
out. An example:
66+
with one extension: for functions, `\param` and `\return` comments longer than
67+
a single line should have subsequent lines indented by two spaces, so that the
68+
tags stand out. An example:
6869
```c++
6970
/// This sentence, until the first dot followed by whitespace, becomes
7071
/// the brief description. More detailed text follows. Feel free to
@@ -93,6 +94,7 @@ Formatting is enforced using clang-format. For more information about this, see
9394
- Use #ifdef DEBUG to guard debug code
9495
9596
# Naming
97+
- Identifiers should make clear the purpose of the thing they are naming.
9698
- Identifiers may use the characters `[a-z0-9_]` and should start with a
9799
lower-case letter (parameters in constructors may start with `_`).
98100
- Omit names of parameters or exception objects when they are not used. If

0 commit comments

Comments
 (0)