# Ansible-test validate-modules sanity test: reject option/alias names equal up to casing belonging to different options

**URL:** <https://forum.ansible.com/t/ansible-test-validate-modules-sanity-test-reject-option-alias-names-equal-up-to-casing-belonging-to-different-options/7092>\
**Category:** Collection Development\
**Tags:** news-for-maintainers, module, plugin, ansible-test\
**Created:** [July 6, 2024, 6:31am UTC](https://forum.ansible.com/t/ansible-test-validate-modules-sanity-test-reject-option-alias-names-equal-up-to-casing-belonging-to-different-options/7092 "2024-07-06T06:31:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [July 6, 2024, 6:31am UTC](https://forum.ansible.com/t/ansible-test-validate-modules-sanity-test-reject-option-alias-names-equal-up-to-casing-belonging-to-different-options/7092/1 "2024-07-06T06:31:59Z")

</div>

The ansible-test’s validate-modules sanity test that comes with ansible-core devel now has a new check for option names and aliases that are equal up to casing, but do not belong to the same option. These will be flagged with the `option-equal-up-to-casing` error code. This was added in [validate-modules: reject option/alias names equal up to casing belonging to different options by felixfontein · Pull Request #83530 · ansible/ansible · GitHub](https://github.com/ansible/ansible/pull/83530).

This happens for example if you have two options, `foo` and `bar`, and `bar` has an alias `Foo`. Or if you have two distinct options `foo` and `foO`. This generally indicates bad module/plugin UX or even bugs.

For example, if you have two distinct options, `timeout` and `timeOut`, one of them should be an alias of the other - it is very surprising if they would have different meaning (i.e. set two different timeouts).

Another example is a plugin which has an option `name`, and another option `net_name` which has an alias `name`. If the user sets `name`, they set both options to that value. (If `net_name` is also provided, you actually have to dwell through the option management to find out whether it beats `name` or not.) This is very likely a bug/oversight which so far wasn’t indicated by the sanity tests.

(You can still have names that are equal up to casing for the same option. If `timeOut` is an alias for the option `timeout`, the new check will not complain about that. That’s a valid use-case for aliases - you should still check out [[Vote ended on 2024-07-02] Avoid using aliases for module options](http://forum.ansible.com/t/6069) though.)
