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

Issue 2900253003: [Reland] Add presubmit rule banning relative header includes (Closed)

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

Description

[Reland] Add presubmit rule banning relative header includes This CL was reverted because it had a bug making it catch all changes to C++ files in the directories it applied to (I thought the fact that I had successfully uploaded the CL itself verified the rule wouldn't trigger on unrelated changes...but PRESUBMIT.py is not a C++ file). I have fixed the bug in this version. Original CL: https://codereview.chromium.org/2900173003 Revert: https://codereview.chromium.org/2897383002 Original description: 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/2900253003 Cr-Commit-Position: refs/heads/master@{#475587} Committed: https://chromium.googlesource.com/chromium/src/+/6802cf635c938aabaf9d06ab7394009feb0887fd

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add test cases #

Patch Set 3 : Remove redundant test classes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -0 lines) Patch
M PRESUBMIT.py View 1 2 chunks +49 lines, -0 lines 0 comments Download
M PRESUBMIT_test.py View 1 2 1 chunk +63 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (6 generated)
rlanday
I apologize for the previous version of my presubmit rule accidentally flagging every C++ file ...
3 years, 7 months ago (2017-05-24 21:10:37 UTC) #2
jochen (gone - plz use gerrit)
can you please add a test for this?
3 years, 7 months ago (2017-05-26 11:43:43 UTC) #3
rlanday
On 2017/05/26 at 11:43:43, jochen wrote: > can you please add a test for this? ...
3 years, 7 months ago (2017-05-26 23:58:42 UTC) #6
jochen (gone - plz use gerrit)
lgtm
3 years, 6 months ago (2017-05-29 14:12:32 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/2900253003/40001
3 years, 6 months ago (2017-05-30 17:36:45 UTC) #9
commit-bot: I haz the power
3 years, 6 months ago (2017-05-30 17:48:49 UTC) #12
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/6802cf635c938aabaf9d06ab7394...

Powered by Google App Engine
This is Rietveld 408576698