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[spacing] invalid suggestion #4329

Open
rpelisse opened this issue Sep 12, 2024 · 0 comments
Open

jinja[spacing] invalid suggestion #4329

rpelisse opened this issue Sep 12, 2024 · 0 comments
Labels
bug new Triage required

Comments

@rpelisse
Copy link

rpelisse commented Sep 12, 2024

Summary

We got the following warning on our code base associated to an invalid suggestion. We could fix the underlying spacing issue, so it went away, but it would probably be best to fix the rule to offer a correct fix for this situation:

jinja[spacing]: Jinja2 spacing could be improved: {{ eap_prereqs_packages + [ eap_install. java.package_name ] }} -> {{ eap_prereqs_packages + }} (warning)
Issue Type
  • Bug Report
OS / ENVIRONMENT
(2.16) [root@79c4779411aa work]# cat /etc/redhat-release 
Fedora release 40 (Forty)
(2.16) [root@79c4779411aa work]# python --version
Python 3.12.5
(2.16) [root@79c4779411aa work]# ansible-lint --version
ansible-lint 24.9.0 using ansible-core:2.16.0 ansible-compat:24.9.0 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.8
STEPS TO REPRODUCE
$ git clone 
$ cd wildfly.git/
$ git checkout -b lint-issue 396036f8bde3d1f75389ab98f9e98f98f015970f
$ ansible-lint # look for the warning on file roles/wildfly_install/tasks/prereqs.yml, line 71
Desired Behavior

The correct suggestion should be:

jinja[spacing]: Jinja2 spacing could be improved: {{ eap_prereqs_packages + [ eap_install. java.package_name ] }} -> {{ eap_prereqs_packages + [eap_install. java.package_name] }} (warning)
Actual Behavior

See description above.

@rpelisse rpelisse added bug new Triage required labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new Triage required
Projects
Status: No status
Development

No branches or pull requests

1 participant