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

Unified Diff: tools/gn/command_format.cc

Issue 2481423002: Convert gn docstrings to C++11 raw strings. (Closed)
Patch Set: Fixes Created 4 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/gn/command_desc.cc ('k') | tools/gn/command_gen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « tools/gn/command_desc.cc ('k') | tools/gn/command_gen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698