Skip to content

Commit

Permalink
put back filter lines into parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
maximenoel8 committed Sep 17, 2024
1 parent 303240e commit 749f88c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion terracumber/tf_module_cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ def filter_module_references(maintf_content, tf_resources_to_keep):
def remove_unselected_tf_resources(maintf_file, tf_resources_to_keep, tf_resources_to_delete):
with open(maintf_file, 'r') as file:
raw_data = file.read()
filtered_lines = [line for line in raw_data if not line.lstrip().startswith("//")]
# filtered_lines = [line for line in raw_data if not line.lstrip().startswith("//")]
for line in raw_data:
if not line.startswith("//"):
filtered_lines = line
else:
logger.info(f"Remove comment line : {line}")
data = ''.join(filtered_lines)
logger.info(f"Remove comments : {data}")
modules = data.split("module ")
Expand Down

0 comments on commit 749f88c

Please sign in to comment.