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

Unified Diff: tools/presubmit.py

Issue 82803005: Make sure files end with exactly one new line and police this in presubmit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: retry upload Created 7 years, 1 month 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 | « tools/generate-trig-table.py ('k') | tools/testrunner/local/junit_output.py » ('j') | 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 9f4834c2190981b57e19df834fa2d3b4900a380b..56eac8ecea47aa9c4501a21ee7506df55911af71 100755
--- a/tools/presubmit.py
+++ b/tools/presubmit.py
@@ -362,6 +362,9 @@ class SourceProcessor(SourceFileProcessor):
else:
print "%s has trailing whitespaces in line %s." % (name, linenumbers)
result = False
+ 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
« no previous file with comments | « tools/generate-trig-table.py ('k') | tools/testrunner/local/junit_output.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698