-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Problem
Currently, the VSCode Ansible extension provides linting via ansible-lint
, but does not support automatic fixing on save. The new --fix
flag (see ansible-lint autofix docs) allows for auto-remediation of detected issues. Integrating this as an optional or default behavior on save would streamline workflows and improve playbook quality.
Solution
- When saving an Ansible YAML file, VSCode should run
ansible-lint --fix
. - Optionally, provide a configuration toggle to enable/disable autofix on save.
- Show user feedback if fixes are applied or if errors occur.
This could be compared to a feature like Autoformatting on save from e.g. the RedHat YAML Extension
Alternatives
No response
Additional context
- Reduces manual effort for fixing lint errors.
- Keeps playbooks clean and consistent.
- Leverages new capabilities in ansible-lint for a modern development experience.
References
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Type
Projects
Status
No status