Open
Description
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 https://github.com/ansible-middleware/wildfly/ wildfly.git
$ 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.
Metadata
Assignees
Type
Projects
Status
Roadmap