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 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): # //---------------------------------------------------------- # 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, diff --git a/cpplint/cpplint_unittest.py b/cpplint/cpplint_unittest.py index 457ee9d..3426323 100755 --- a/cpplint/cpplint_unittest.py +++ b/cpplint/cpplint_unittest.py @@ -2202,9 +2202,19 @@ class CpplintTest(CpplintTestBase): self.TestLint('//////', '') self.TestLint('////// x', '') self.TestLint('/// x', '') + self.TestLint('///< x', '') # After-member Doxygen comment + self.TestLint('//!< x', '') # After-member Doxygen comment self.TestLint('///', '') # Empty Doxygen comment self.TestLint('////x', 'Should have a space between // and comment' ' [whitespace/comments] [4]') + self.TestLint('//!