ComplianceAsCode / content-test-filtering

System for Automatic Filtering of Tests for ComplianceAsCode project
8 stars 6 forks source link

bugfix: JinjaAnalysis: handle recursive macros #43

Open maage opened 1 year ago

maage commented 1 year ago

Fixes #42 tested with tree listed.

It is feasible to create recursive jinja macros. This keeps tab what macros has been seen at each point and skip if so.

As we keep tab of whole path to macro, it should catch situation with recursions with two or more steps too. (A -> B -> C -> A)