Index: tools/gn/variables.cc |
diff --git a/tools/gn/variables.cc b/tools/gn/variables.cc |
index 472554ae964f57c484f687bafbc14e249c50533d..0f3ede7e181b1812e064bbab9b7a3ec549e134db 100644 |
--- a/tools/gn/variables.cc |
+++ b/tools/gn/variables.cc |
@@ -442,6 +442,27 @@ const char kCheckIncludes_Help[] = |
" This does not affect other targets that depend on the current target,\n" |
" it just skips checking the includes of the current target's files.\n" |
"\n" |
+ "Controlling includes individually\n" |
+ "\n" |
+ " If only certain includes are problematic, you can annotate them\n" |
+ " individually rather than disabling header checking on an entire\n" |
+ " target. Add the string \"nogncheck\" to the include line:\n" |
+ "\n" |
+ " #include \"foo/something_weird.h\" // nogncheck (bug 12345)\n" |
+ "\n" |
+ " It is good form to include a reference to a bug (if the include is\n" |
+ " improper, or some other comment expressing why the header checker\n" |
+ " doesn't work for this particular case.\n" |
+ "\n" |
+ " The most common reason to need \"nogncheck\" is conditional includes.\n" |
+ " The header checker does not understand the preprocessor, so may flag\n" |
+ " some includes as improper even if the dependencies and #defines are\n" |
+ " always matched correctly:\n" |
+ "\n" |
+ " #if defined(ENABLE_DOOM_MELON)\n" |
+ " #include \"doom_melon/beam_controller.h\" // nogncheck\n" |
+ " #endif\n" |
+ "\n" |
"Example\n" |
"\n" |
" source_set(\"busted_includes\") {\n" |