summaryrefslogtreecommitdiffstats
path: root/tools/gn/header_checker_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Improve GN public header file checkingbrettw@chromium.org2014-04-101-10/+25
| | | | | | | | | | | | | | | | | This makes the header checker and include iterator work from InputFiles (which basically just hold the file buffer) rather than just raw strings. This allows us to reference these files from Err. Some extra line/char tracking is now in the include iterator so we can actually quote from and annotate the place in the source file where the bad include is, which looks much nicer than "the file blah included blah". It also makes it possible to write much shorter error messages that still make sense. This adds visibility checking as previously documented in the help for "public" and a unit test for that. This updates the documentation for "public" which was wrong (it referred to patterns which was not used). R=scottmg@chromium.org Reland of https://codereview.chromium.org/229423002/ Review URL: https://codereview.chromium.org/231813002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263082 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 262747 "Improve GN public header file checking"wjia@chromium.org2014-04-091-25/+10
| | | | | | | | | | | | | | | | | | | | | | | | | It failed Win x64 Builder: http://build.chromium.org/p/chromium.win/builders/Win%20x64%20Builder/builds/17043/steps/compile/logs/stdio > Improve GN public header file checking > > This makes the header checker and include iterator work from InputFiles (which basically just hold the file buffer) rather than just raw strings. This allows us to reference these files from Err. > > Some extra line/char tracking is now in the include iterator so we can actually quote from and annotate the place in the source file where the bad include is, which looks much nicer than "the file blah included blah". It also makes it possible to write much shorter error messages that still make sense. > > This adds visibility checking as previously documented in the help for "public" and a unit test for that. > > This updates the documentation for "public" which was wrong (it referred to patterns which was not used). > > R=scottmg@chromium.org > > Review URL: https://codereview.chromium.org/229423002 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/231293003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262755 0039d316-1c4b-4281-b951-d872f2087c98
* Improve GN public header file checkingbrettw@chromium.org2014-04-091-10/+25
| | | | | | | | | | | | | | | | This makes the header checker and include iterator work from InputFiles (which basically just hold the file buffer) rather than just raw strings. This allows us to reference these files from Err. Some extra line/char tracking is now in the include iterator so we can actually quote from and annotate the place in the source file where the bad include is, which looks much nicer than "the file blah included blah". It also makes it possible to write much shorter error messages that still make sense. This adds visibility checking as previously documented in the help for "public" and a unit test for that. This updates the documentation for "public" which was wrong (it referred to patterns which was not used). R=scottmg@chromium.org Review URL: https://codereview.chromium.org/229423002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262747 0039d316-1c4b-4281-b951-d872f2087c98
* Add optional public header checking to GN buildbrettw@chromium.org2014-04-071-0/+102
You can invoke this either using the "--check" argument to the gen command (for use on buildbots) or by running "gn check" (for developer on-demand use). This adds support for "public" headers for a target, and an optional "--check" flag to the gen command that implements checkdeps-like include checking. Basically if you include a file that's declared in the build, it has to be in the public section of one of your dependents (or that dependent doesn't have a public section, which implies everything is public). This roughly maps to Blaze's behavior around the public headers. Moves modp_b64 build file to main tree. Remove modp_b64 hack for older versions of VC missing stdint (this included basictypes which caused a header check failure). I also added some base dependencies and some other minor build changes to solve some other issues identified by the check. The remaining one is that a file in base/metrics depends on ipc (!) BUG= R=scottmg@chromium.org Review URL: https://codereview.chromium.org/216903004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262216 0039d316-1c4b-4281-b951-d872f2087c98