Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: tools/presubmit.py

Issue 1600873002: [formatting] Remove the formatting requirement for 2 empty lines between declarations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « .clang-format ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/presubmit.py
diff --git a/tools/presubmit.py b/tools/presubmit.py
index 998656908dd67485312360ccc1c9572477b8e6fd..23940bb6861cf83517393cdda42e5ff68b84788a 100755
--- a/tools/presubmit.py
+++ b/tools/presubmit.py
@@ -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)
« no previous file with comments | « .clang-format ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698