Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with parsing a yml template with jinja2 template #21

Open
kumareshsun opened this issue Aug 18, 2023 · 1 comment
Open

Issues with parsing a yml template with jinja2 template #21

kumareshsun opened this issue Aug 18, 2023 · 1 comment

Comments

@kumareshsun
Copy link

HI
I noticed this git hook, parses/lexers fine if the file extension is .j2 or without file extension for jinja2 code, but misses out on validating the YAML code.
If I change the file extension to .yml, it validates the YML but complains about jinja2 with the error below.

while scanning for the next token
found character '%' that cannot start any token
  in "ansible/roles/createCloudformationStack/templates/cloudformation/cfn-route53.yml", line 15, column 2
YAML parser/lexer exit before end of document.

How can I validate both jinja2 and yml when they're present in the same file?

@augke
Copy link

augke commented Nov 8, 2023

Hi @kumareshsun,

Apologies for the late reply. The is-not.yml test case file is an example of jinja2 inside a yaml file.

Could you please provide the input file you used to trigger this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants