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

Issue 229423002: Improve public header file checking (Closed)

Created:
6 years, 8 months ago by brettw
Modified:
6 years, 8 months ago
Reviewers:
scottmg
CC:
chromium-reviews, tfarina, rginda+watch_chromium.org, erikwright+watch_chromium.org, yoshiki+watch_chromium.org
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262747

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : include static cast for 64 bit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+234 lines, -92 lines) Patch
M BUILD.gn View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M third_party/freetype2/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M tools/gn/c_include_iterator.h View 1 chunk +18 lines, -7 lines 0 comments Download
M tools/gn/c_include_iterator.cc View 1 2 3 4 chunks +39 lines, -16 lines 0 comments Download
M tools/gn/c_include_iterator_unittest.cc View 1 5 chunks +51 lines, -13 lines 0 comments Download
M tools/gn/header_checker.h View 2 chunks +7 lines, -2 lines 0 comments Download
M tools/gn/header_checker.cc View 5 chunks +68 lines, -25 lines 0 comments Download
M tools/gn/header_checker_unittest.cc View 3 chunks +25 lines, -10 lines 0 comments Download
M tools/gn/input_conversion.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/input_file_manager.h View 1 chunk +2 lines, -1 line 0 comments Download
M tools/gn/input_file_manager.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M tools/gn/variables.cc View 1 chunk +10 lines, -14 lines 0 comments Download
M tools/gn/visibility.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
brettw
6 years, 8 months ago (2014-04-08 22:33:21 UTC) #1
scottmg
lgtm https://codereview.chromium.org/229423002/diff/30001/tools/gn/c_include_iterator.h File tools/gn/c_include_iterator.h (right): https://codereview.chromium.org/229423002/diff/30001/tools/gn/c_include_iterator.h#newcode35 tools/gn/c_include_iterator.h:35: // line number into *line_number; ; -> .
6 years, 8 months ago (2014-04-08 23:07:20 UTC) #2
brettw
6 years, 8 months ago (2014-04-09 18:16:47 UTC) #3
Message was sent while issue was closed.
Committed patchset #3 manually as r262747 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698