Replies: 3 comments 3 replies
-
@briantist A big thanks for opening this and including several ideas. While I personally do not love the idea of adding more configuration options to the linter, I also realise that we should find a solution for the problem. The classic answer for this dilemma would be a stable branch and a development one, but I am realistic that for our particular case this would not work: we do not have the manpower to maintain two branches and the project still needs to move fast. We could ask users that want the stable behavior to disable "experimental" tag in their config as we had a rule of always adding new rules as experimental. The tricky bit is that sometimes we introduce sub-rules (different tag like On the other hand, I think it might be quite easy to have two profile configurations. I will try to look if I can add versioning to profiles and have a an implicit 'latest'. The real benefit on having this is that you could use the latest code of the linter and still target a specific profile version that you accepted as being "safe" to use. If I would implement that I would use a CalVer for profile versions like |
Beta Was this translation helpful? Give feedback.
-
This is a brilliant idea @briantist. TY for taking the time to raise this, I think this is something we should prioritize. |
Beta Was this translation helpful? Give feedback.
-
I will admit that my work team started pushing changes to our internal Ansible repo, and our PRs started failing because of the new role prefix variable requirement. It broke our workflow. |
Beta Was this translation helpful? Give feedback.
-
This is tangentially related to #3178 but is a separate idea.
Problem
ansible-lint
in minor (maybe patch?) versionsansible-lint
may fail due only to brand new rules, during non-major upgradesSolutions that are not ideal
Proposal
profile_version
major
,minor
,patch
profile_version: major
, then regardless of other engine changes, the list of rules used will be the one that existed when this major version was first released (X.0.0
), even if new rules have been added to this profile since then.profile_version: minor
, you would get all rules in this profile that existed inX.Y.0
(but if a rule were added in a patch version you would not get that one).profile_version
can bepatch
to match existing behavior and encourage new rule adoption.Alternative variations
stable
/edge
or something like thatI'm sure there are some issues with the idea as it stands, but I hope this in an inspiration at least.
Beta Was this translation helpful? Give feedback.
All reactions