Add option to configure allowed '--fix' parameters / allowed 'write_list' entries #4236
Unanswered
frq-asgard-josi
asked this question in
Ideas
Replies: 1 comment
-
For internal use we already added a patch providing this functionality. I could provide this as a PR if this proposal receives positive feedback. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use case
We would like to configure a subset of autofixes in the .ansible-lint config file which are applied when using the --fix option. We do however, not want to enable --fix by default. Users should still be able to use ansible-lint without having their files changed.
Currently the only way to exclude autofixes is by specifying the write_list in the config file but this automatically applies --fix even if ommited in the command.
Proposed Solution
To solve this, we could use an additional 'write_exclude_list' parameter to specify which autofixes we want to disable. This should be completely backwards compatible since we wouldn't change the behavior of existing config options in any way.
Beta Was this translation helpful? Give feedback.
All reactions