Write newlines at the end of C files. (issue 1413193006 by brettw@chromium.org)

0 views
Skip to first unread message

bre...@chromium.org

unread,
Oct 19, 2015, 9:42:24 PM10/19/15
to dpr...@chromium.org, grit-de...@googlegroups.com
Reviewers: Dirk Pranke,

Description:
Write newlines at the end of C files.

When Grit generates C files for converting message IDs to strings, the
generated
code did not have a newline at the end. This caused problems for Mac where
we
warn for such cases.

This patch adds the missing newline so we can remove the special-case code.

Please review this at https://codereview.chromium.org/1413193006/

Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master

Affected files (+1, -1 lines):
M grit/format/c_format.py


Index: grit/format/c_format.py
diff --git a/grit/format/c_format.py b/grit/format/c_format.py
index
06b94393302305ec079c5771725cddab281851e2..5e10b988da9dc126e90b1e97c5d4745194a743e7
100644
--- a/grit/format/c_format.py
+++ b/grit/format/c_format.py
@@ -45,7 +45,7 @@ def Format(root, lang='en', output_dir='.'):
if isinstance(item, message.MessageNode):
yield _FormatMessage(item, lang)

- yield '\n default:\n return 0;\n }\n}'
+ yield '\n default:\n return 0;\n }\n}\n'


def _HexToOct(match):


dpr...@chromium.org

unread,
Oct 19, 2015, 9:45:13 PM10/19/15
to bre...@chromium.org, grit-de...@googlegroups.com

brettw@chromium.org via codereview.chromium.org

unread,
Oct 19, 2015, 9:49:08 PM10/19/15
to dpr...@chromium.org, bre...@chromium.org, grit-de...@googlegroups.com
Committed patchset #1 (id:1) manually as
4066463928d64337e6d70046aa4f18b833a2d0e3 (presubmit successful).

https://codereview.chromium.org/1413193006/
Reply all
Reply to author
Forward
0 new messages