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

jinja-variable-lower-case wrongly detects printed strings as variables #3463

Closed
tacerus opened this issue Dec 31, 2023 · 1 comment
Closed
Labels
type: bug Something isn't working

Comments

@tacerus
Copy link

tacerus commented Dec 31, 2023

Issue Summary

Hi,

if printing strings inside of a {{ statement, the tool complains about jinja-variable-lower-case:

For example:

{{ ' trustGuestRxFilters=\'yes\'' if iftype == 'direct' else '' }}

Results in:

All variables should use lower case: '{{ variable }}': trustGuestRxFilters (jinja-variable-lower-case)

Albeit trustGuestRxFilters not being a variable, but a printed string. The only variable in this line is iftype, which is lower case.

Which component(s) of AVD impacted

others

How do you run AVD ?

None

Steps to reproduce

Create a Jinja template with


{{ ' trustGuestRxFilters=\'yes\'' if iftype == 'direct' else '' }}

Relevant log output

All variables should use lower case: '{{ variable }}': trustGuestRxFilters (jinja-variable-lower-case)


### Contributing Guide

- [X] I agree to follow this project's Code of Conduct
@tacerus tacerus added the type: bug Something isn't working label Dec 31, 2023
@tacerus
Copy link
Author

tacerus commented Dec 31, 2023

Apologies, I accidentally sent this to the wrong repository.
Moved to aristanetworks/j2lint#85.

@tacerus tacerus closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant