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 #Messages
Total messages: 12 (6 generated)
|