Some documentation of gn check --check-generated
R=brettw@chromium.org
Bug: 57
Change-Id: I1cc43e9cb27332f1a6136ad70219586d5e9c70a2
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/4280
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Brett Wilson <brettw@chromium.org>
diff --git a/tools/gn/command_check.cc b/tools/gn/command_check.cc
index 93099f7..3c74fc1 100644
--- a/tools/gn/command_check.cc
+++ b/tools/gn/command_check.cc
@@ -55,7 +55,7 @@
const char kCheck[] = "check";
const char kCheck_HelpShort[] = "check: Check header dependencies.";
const char kCheck_Help[] =
- R"(gn check <out_dir> [<label_pattern>] [--force]
+ R"(gn check <out_dir> [<label_pattern>] [--force] [--check-generated]
GN's include header checker validates that the includes for C-like source
files match the build dependency graph.
@@ -74,6 +74,11 @@
Ignores specifications of "check_includes = false" and checks all
target's files that match the target label.
+ --check-generated
+ Generated files are normally not checked since they do not exist
+ until after a build. With this flag, those generated files that
+ can be found on disk are also checked.
+
What gets checked
The .gn file may specify a list of targets to be checked in the list
@@ -88,6 +93,9 @@
- GN opens all C-like source files in the targets to be checked and scans
the top for includes.
+ - Generated files (that might not exist yet) are ignored unless
+ the --check-generated flag is provided.
+
- Includes with a "nogncheck" annotation are skipped (see
"gn help nogncheck").