Closed ddeepwell closed 2 months ago
Files identified in the description:
None
If these files are incorrect, please update the component name
section of the description or use the component bot command.
Whoops. Just noticed this would be better served in the https://github.com/ansible/ansible-lint repo. I'm not sure how to move it there.
The issue was duplicated at #4233.
Summary
ansible-lint --fix
does not respect the maximum yaml line length in a repo where the line length is specified in a .yamllint file and multi-line strings use double quotes with a \ to wrap onto the next line.When running
ansible-lint --fix
twice, the double quotes and line split are removed on the first pass, followed by a line-length error on the second pass.Issue Type
Bug Report
Component Name
lint
Ansible Version
Configuration
OS / Environment
MacOS Sonoma 14.5
Steps to Reproduce
A minimum test repo contains two files:
1)
.yamllint
file:and 2) a
roles/arole/tasks/main.yml
file:Then run
ansible-lint --fix
twice.Expected Results
I expected the multi-line string to be ignored since the fix would have broken the max line length limit.
Actual Results
Code of Conduct