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

Lint: Warn-if Jinja2 in Cylc comment #5226

Closed
wxtim opened this issue Nov 14, 2022 · 1 comment · Fixed by #5363
Closed

Lint: Warn-if Jinja2 in Cylc comment #5226

wxtim opened this issue Nov 14, 2022 · 1 comment · Fixed by #5363
Labels

Comments

@wxtim
Copy link
Member

wxtim commented Nov 14, 2022

Summary

In Cylc config files Jinja2 in comments is evaluated. This may or may not be what the user wants and is more likely than not to be an unexpected behavior.

Seealso: cylc/cylc-textmate-grammar#36 (review)

Desired behaviour:

#!jinja2
# flow.cylc file
{% set X = 41 %}
# {% set X = 42 %}
...
cylc lint .
WARNING: 4: Jinja2 in "# {% set X = 42 %}" will be evaluated

Pull requests welcome!

@wxtim wxtim added this to the cylc-8.1.0 milestone Nov 14, 2022
@oliver-sanders oliver-sanders modified the milestones: cylc-8.1.0, some-day Nov 15, 2022
@wxtim wxtim mentioned this issue Feb 13, 2023
8 tasks
@wxtim
Copy link
Member Author

wxtim commented Feb 13, 2023

Merged into #4917

@wxtim wxtim closed this as completed Feb 13, 2023
@oliver-sanders oliver-sanders modified the milestones: some-day, cylc-8.1.2 Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants