Tell rewrite_includes to ignore node_modules

Change-Id: Ibd82b52d15f9de7fbbd4a5a91d7be8310f6568d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249135
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Kevin Lubick 2019-10-17 15:03:00 -04:00 committed by Skia Commit-Bot
parent 5f827ee657
commit 87fe9b0395

View File

@ -38,7 +38,8 @@ roots = [
# Don't count our local Vulkan headers as Skia headers;
# we don't want #include <vulkan/vulkan_foo.h> rewritten to point to them.
blacklist = ['include/third_party/vulkan']
# Nor do we care about things in node_modules, used by *Kits.
ignorelist = ['include/third_party/vulkan', 'node_modules']
assert '/' in [os.sep, os.altsep]
def fix_path(p):
@ -48,7 +49,7 @@ def fix_path(p):
headers = {}
for root in roots:
for path, _, files in os.walk(root):
if not any(snippet in fix_path(path) for snippet in blacklist):
if not any(snippet in fix_path(path) for snippet in ignorelist):
for file_name in files:
if file_name.endswith('.h'):
if file_name in headers: