add protection on finding min in list
@@ -86,7 +86,9 @@ class Runner:
results = resource_registry.scan(cf_file, {resource_name: resource},
skipped_checks)
# TODO refactor into context parsing
- start_line = min(list(find_lines(resource, '__startline__')))
+ find_lines_result_list = list(find_lines(resource, '__startline__'))
+ if len(find_lines_result_list)>=1:
+ start_line = min(find_lines_result_list)
end_line = max(list(find_lines(resource, '__endline__')))
entity_lines_range = [start_line, end_line - 1]
