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

Unified Diff: tools/gn/variables.cc

Issue 1217093007: Add a //nogncheck anntation to GN include checker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months 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/docs/reference.md ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
« no previous file with comments | « tools/gn/docs/reference.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698