You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
I expected the multi-line string to be ignored since the fix would have broken the max line length limit.
Actual Results
ERROR Rule specific fix not applied for: yaml/yaml roles/arole/tasks/main.yml:4WARNING Listing 1 violation(s) that are fatalyaml[line-length]: Line too long (94 > 88 characters)roles/arole/tasks/main.yml:4Read documentation for instructions on how to ignore specific rule violations. Rule Violation Summary count tag profile rule associated tags 1 yaml[line-length] basic formatting, yaml Failed: 1 failure(s), 0 warning(s) on 4 files. Last profile that met the validation criteria was 'min'.
Code of Conduct
I agree to follow the Ansible Code of Conduct
The text was updated successfully, but these errors were encountered:
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:
.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
The text was updated successfully, but these errors were encountered: