mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Allow blank Doxygen-style comments. Patch by mball@google.com.
This commit is contained in:
parent
f550116b81
commit
a51c16b542
3
cpplint/cpplint.py
vendored
3
cpplint/cpplint.py
vendored
|
@ -1736,9 +1736,12 @@ def CheckSpacing(filename, clean_lines, linenum, error):
|
|||
# but some lines are exceptions -- e.g. if they're big
|
||||
# comment delimiters like:
|
||||
# //----------------------------------------------------------
|
||||
# or are an empty C++ style Doxygen comment, like:
|
||||
# ///
|
||||
# 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:]))
|
||||
if not match:
|
||||
error(filename, linenum, 'whitespace/comments', 4,
|
||||
|
|
|
@ -1511,6 +1511,7 @@ class CpplintTest(CpplintTestBase):
|
|||
self.TestLint('//////', '')
|
||||
self.TestLint('////// x', '')
|
||||
self.TestLint('/// x', '')
|
||||
self.TestLint('///', '') # Empty Doxygen comment
|
||||
self.TestLint('////x', 'Should have a space between // and comment'
|
||||
' [whitespace/comments] [4]')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user