In cpplint, permit Dodxygen C++ annotations, which come after members, e.g.
int var; //!< Brief description after the member
or
int var; ///< Brief description after the member
Cf. http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html#memberdoc
Currently, cpplint accepts comments after members, cf.
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Implementation_Comments#Implementation_Comments
and it accepts also the doxygen comments of the type "///" (followed by a new line) and
"/// " (followed by a comment). Only the Doxygen annotations, which come
after members are rejected, which is fixed by this patch.
Review URL: https://codereview.appspot.com/14607044
Patch from Tobias Burnus <burnus@net-b.de>.
diff --git a/cpplint/cpplint.py b/cpplint/cpplint.py
index 70912e2..84cc1cd 100755
--- a/cpplint/cpplint.py
+++ b/cpplint/cpplint.py
@@ -2627,10 +2627,15 @@
# //----------------------------------------------------------
# or are an empty C++ style Doxygen comment, like:
# ///
+ # or C++ style Doxygen comments placed after the variable:
+ # ///< Header comment
+ # //!< Header comment
# or they begin with multiple slashes followed by a space:
# //////// Header comment
match = (Search(r'[=/-]{4,}\s*$', line[commentend:]) or
Search(r'^/$', line[commentend:]) or
+ Search(r'^!< ', line[commentend:]) or
+ Search(r'^/< ', line[commentend:]) or
Search(r'^/+ ', line[commentend:]))
if not match:
error(filename, linenum, 'whitespace/comments', 4,