ansible / ansible-content-parser

Apache License 2.0
3 stars 4 forks source link

Do not perform Autofix when syntax check errors were found #35

Closed TamiTakamiya closed 9 months ago

TamiTakamiya commented 9 months ago

Issue: https://issues.redhat.com/browse/AAP-19351

Description

When the first ansible-lint run failed with syntax-check errors, Content Parser attempts to execute the second run. However, the first run executes autofixes on files w/o ystax-check errors on the first run and ansible-lint runs against different files from the original source. It is not how the code supposed to run. We should suppress autofixes on the first run when syntax-check errors were found.

Testing

Steps to test

Build the Content Parser following the instructions Run ansible-content-parser against Ansible code repositories to make sure if no function are broken.

Scenarios tested

https://github.com/IBM/Ansible-OpenShift-Provisioning/ was used for the test