Skip to content

Commit eaf8386

Browse files
Add Windows version of each exclusion item to duplicated list (#486)
1 parent fb96c46 commit eaf8386

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

macros/set_is_excluded.sql

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@
1818
{% endif %}
1919

2020

21-
{#- we exclude the resource if it is from the current project and matches the pattern -#}
21+
{#- we duplicate the exclusion list to account for windows directory patterns -#}
22+
{%- set exclude_all_os_paths_from_project = [] -%}
23+
2224
{%- for exclude_paths_pattern in var('exclude_paths_from_project',[]) -%}
25+
{%- set windows_path_pattern = exclude_paths_pattern | replace("/", "\\\\\\\\") -%}
26+
{%- do exclude_all_os_paths_from_project.extend([exclude_paths_pattern, windows_path_pattern]) -%}
27+
{%- endfor -%}
28+
29+
{#- we exclude the resource if it is from the current project and matches the pattern -#}
30+
{%- for exclude_paths_pattern in exclude_all_os_paths_from_project -%}
2331
{%- set matched_path = re.search(exclude_paths_pattern, resource_path, re.IGNORECASE) -%}
2432
{%- if matched_path and resource.package_name == project_name %}
2533
{% set ns.exclude = true %}

0 commit comments

Comments
 (0)