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

Issue 2900173003: Add presubmit rule banning relative header includes (Closed)

Created:
3 years, 7 months ago by rlanday
Modified:
3 years, 7 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add presubmit rule banning relative header includes Relative header includes (#include path containing "../") can be used to cheat the dependency system because they're not checked properly. This CL adds a presubmit rule to catch these. This rules applies to third_party/WebKit, but not anywhere else in third_party/. There's one currently existing file I know of that would fail this rule: ppapi/lib/gl/include/GLES2/gl2.h I did not change this file when cleaning up the other headers since it appears to be code imported from a third-party repo. I guess whoever updates this file will have to bypass the rule. BUG=724264 Review-Url: https://codereview.chromium.org/2900173003 Cr-Commit-Position: refs/heads/master@{#474396} Committed: https://chromium.googlesource.com/chromium/src/+/90089e1929d8ec7bda755456e7a54808a2c843ea

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -0 lines) Patch
M PRESUBMIT.py View 2 chunks +38 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (9 generated)
rlanday
Example of what the error looks like: You added one or more relative #include paths ...
3 years, 7 months ago (2017-05-23 22:35:29 UTC) #4
jochen (gone - plz use gerrit)
lgtm
3 years, 7 months ago (2017-05-24 19:38:58 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2900173003/1
3 years, 7 months ago (2017-05-24 19:46:59 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/90089e1929d8ec7bda755456e7a54808a2c843ea
3 years, 7 months ago (2017-05-24 19:52:40 UTC) #12
danakj
This is failing on a CL that does not add such includes. https://chromium-review.googlesource.com/c/513043
3 years, 7 months ago (2017-05-24 20:12:52 UTC) #14
danakj
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2897383002/ by danakj@chromium.org. ...
3 years, 7 months ago (2017-05-24 20:13:11 UTC) #15
danakj
3 years, 7 months ago (2017-05-24 20:13:56 UTC) #16
Message was sent while issue was closed.
On 2017/05/24 20:12:52, danakj wrote:
> This is failing on a CL that does not add such includes.
> https://chromium-review.googlesource.com/c/513043

Notably:

% git show|grep "\.\./"|wc -l
0

Powered by Google App Engine
This is Rietveld 408576698