Criteria for command module's "check command"

I am working on this old issue issue #30073. If someone runs one of these

`
command: hg clone https://bitbucket.org/yeukhon/hello

./hacking/test-module -m lib/ansible/modules/commands/command.py -a
“hg clone https://bitbucket.org/yeukhon/hello

`

We are going to see something like this

`

{
“cmd”: “hg clone https://bitbucket.org/yeukhon/hello”,
“invocation”: {

}
},
“warnings”: [
“Consider using hg module rather than running hg”
]
}

`

Now git doesn’t have this problem because git is not listed in command.py 's “command” variable on L117

`
commands = { ‘hg’: ‘hg’, ‘curl’: ‘get_url or uri’, ‘wget’: ‘get_url or uri’, ‘svn’: ‘subversion’, ‘service’: ‘service’ … }

`

I can remove hg from the list, but what about svn? It sounds like we let author of the module to decide whether or not the module should be included. This warning exists to remind people they can look to the module list rather than using command.

We can’t just assume all modules should have this warning. For example, take aws_s3 module, the name “aws_s3” requires us to convert to “aws s3” in order for the warning to make sense. So we either remove this warning completely, or we spend time working through a complex code to determiner whether something exist as a binary on the machine.

My vote: remove this completely because (1) selective warning is bad, and (2) we don’t want Ansible to guess (for the latter proposal).

As a maintainer for the hg module, I am okay excluding hg from this list, so we should ask svn module owners as well.