Index: tools/gn/command_format.cc |
diff --git a/tools/gn/command_format.cc b/tools/gn/command_format.cc |
index 282f56764599be0702f8d2ddd14d8d2d46668872..0849762550a211966247e42fadafa26d153e2b32 100644 |
--- a/tools/gn/command_format.cc |
+++ b/tools/gn/command_format.cc |
@@ -32,43 +32,44 @@ const char kFormat[] = "format"; |
const char kFormat_HelpShort[] = |
"format: Format .gn file."; |
const char kFormat_Help[] = |
- "gn format [--dump-tree] (--stdin | <build_file>)\n" |
- "\n" |
- " Formats .gn file to a standard format.\n" |
- "\n" |
- " The contents of some lists ('sources', 'deps', etc.) will be sorted to\n" |
- " a canonical order. To suppress this, you can add a comment of the form\n" |
- " \"# NOSORT\" immediately preceeding the assignment. e.g.\n" |
- "\n" |
- " # NOSORT\n" |
- " sources = [\n" |
- " \"z.cc\",\n" |
- " \"a.cc\",\n" |
- " ]\n" |
- "\n" |
- "Arguments\n" |
- "\n" |
- " --dry-run\n" |
- " Does not change or output anything, but sets the process exit code\n" |
- " based on whether output would be different than what's on disk.\n" |
- " This is useful for presubmit/lint-type checks.\n" |
- " - Exit code 0: successful format, matches on disk.\n" |
- " - Exit code 1: general failure (parse error, etc.)\n" |
- " - Exit code 2: successful format, but differs from on disk.\n" |
- "\n" |
- " --dump-tree\n" |
- " For debugging, dumps the parse tree to stdout and does not update\n" |
- " the file or print formatted output.\n" |
- "\n" |
- " --stdin\n" |
- " Read input from stdin and write to stdout rather than update\n" |
- " a file in-place.\n" |
- "\n" |
- "Examples\n" |
- " gn format //some/BUILD.gn\n" |
- " gn format some\\BUILD.gn\n" |
- " gn format /abspath/some/BUILD.gn\n" |
- " gn format --stdin\n"; |
+ R"(gn format [--dump-tree] (--stdin | <build_file>) |
+ |
+ Formats .gn file to a standard format. |
+ |
+ The contents of some lists ('sources', 'deps', etc.) will be sorted to a |
+ canonical order. To suppress this, you can add a comment of the form "# |
+ NOSORT" immediately preceeding the assignment. e.g. |
+ |
+ # NOSORT |
+ sources = [ |
+ "z.cc", |
+ "a.cc", |
+ ] |
+ |
+Arguments |
+ |
+ --dry-run |
+ Does not change or output anything, but sets the process exit code based |
+ on whether output would be different than what's on disk. This is useful |
+ for presubmit/lint-type checks. |
+ - Exit code 0: successful format, matches on disk. |
+ - Exit code 1: general failure (parse error, etc.) |
+ - Exit code 2: successful format, but differs from on disk. |
+ |
+ --dump-tree |
+ For debugging, dumps the parse tree to stdout and does not update the |
+ file or print formatted output. |
+ |
+ --stdin |
+ Read input from stdin and write to stdout rather than update a file |
+ in-place. |
+ |
+Examples |
+ gn format //some/BUILD.gn |
+ gn format some\\BUILD.gn |
+ gn format /abspath/some/BUILD.gn |
+ gn format --stdin |
+)"; |
namespace { |