Enforce that source files end in a newline (#153)

This commit is contained in:
gbrodman 2019-07-03 12:16:11 -04:00 committed by GitHub
parent 888bc158fe
commit 8afc4f4d3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,6 +82,11 @@ PRESUBMITS = {
}, REQUIRED): }, REQUIRED):
"File did not include the license header.", "File did not include the license header.",
# Files must end in a newline
PresubmitCheck(r".*\n$", ("java", "js", "soy", "sql", "py", "sh", "gradle"),
{"node_modules/"}, REQUIRED):
"Source files must end in a newline.",
# System.(out|err).println should only appear in tools/ # System.(out|err).println should only appear in tools/
PresubmitCheck( PresubmitCheck(
r".*\bSystem\.(out|err)\.print", "java", { r".*\bSystem\.(out|err)\.print", "java", {