Commit f24a0d3e authored by John Parent's avatar John Parent
Browse files

Add include filter

parent ac3d2db8
Pipeline #232861 failed with stages
in 9 minutes and 1 second
......@@ -83,6 +83,14 @@ class BindingsGenerator:
if not self.opts.skip_formatting:
maybe_format_file_in_place(file_name)
def remove_duplicate_includes(self, includes):
incs = set()
for inc in includes:
filename = os.path.basename(inc)
if filename in incs:
includes.discard(inc)
incs.add(filename)
def get_include_str(self, found_includes):
include_str = ""
for f in found_includes:
......@@ -712,7 +720,10 @@ class BindingsGenerator:
:param is_custom: A boolean value to describe if the namespace has been added via customization
:return: None
"""
import pdb
pdb.set_trace()
self.remove_duplicate_includes(found_includes)
self.indent += " " * 2
keys = {
"includes": self.get_include_str(sorted(found_includes)),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment