[formatting] Remove the formatting requirement for 2 empty lines between declarations.
R=mstarzinger@chromium.org,rossberg@chromium.org,bmeurer@chromium.org,hpayer@chromium.org,jochen@chromium.org BUG= Review URL: https://codereview.chromium.org/1600873002 Cr-Commit-Position: refs/heads/master@{#33485}
This commit is contained in:
parent
5ef27c25e9
commit
28d3cba243
@ -1,4 +1,4 @@
|
||||
# Defines the Google C++ style for automatic reformatting.
|
||||
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
BasedOnStyle: Google
|
||||
MaxEmptyLinesToKeep: 2
|
||||
MaxEmptyLinesToKeep: 1
|
||||
|
@ -354,30 +354,6 @@ class SourceProcessor(SourceFileProcessor):
|
||||
if not contents.endswith('\n') or contents.endswith('\n\n'):
|
||||
print "%s does not end with a single new line." % name
|
||||
result = False
|
||||
# Check two empty lines between declarations.
|
||||
if name.endswith(".cc"):
|
||||
line = 0
|
||||
lines = []
|
||||
parts = contents.split('\n')
|
||||
while line < len(parts) - 2:
|
||||
if self.EndOfDeclaration(parts[line]):
|
||||
if self.StartOfDeclaration(parts[line + 1]):
|
||||
lines.append(str(line + 1))
|
||||
line += 1
|
||||
elif parts[line + 1] == "" and \
|
||||
self.StartOfDeclaration(parts[line + 2]):
|
||||
lines.append(str(line + 1))
|
||||
line += 2
|
||||
line += 1
|
||||
if len(lines) >= 1:
|
||||
linenumbers = ', '.join(lines)
|
||||
if len(lines) > 1:
|
||||
print "%s does not have two empty lines between declarations " \
|
||||
"in lines %s." % (name, linenumbers)
|
||||
else:
|
||||
print "%s does not have two empty lines between declarations " \
|
||||
"in line %s." % (name, linenumbers)
|
||||
result = False
|
||||
# Sanitize flags for fuzzer.
|
||||
if "mjsunit" in name:
|
||||
match = FLAGS_LINE.search(contents)
|
||||
|
Loading…
Reference in New Issue
Block a user