mirror of
https://github.com/tiennm99/styleguide.git
synced 2026-10-13 18:16:11 +00:00
Allow blank Doxygen-style comments. Patch by mball@google.com.
This commit is contained in:
1 parent
f550116b81
commit
a51c16b542
2 files changed
+4
No files matched your search
Vendored
+3
@@ -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]')
|
||||
|
||||
|
||||
Reference in new issue
Block a user