Commit 28d3cba2 authored by titzer's avatar titzer Committed by Commit bot

[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}
parent 5ef27c25
# 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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment