Azure / Azure/azure-cli-dev-tools
Valid Example Failing Linter Test
- Dominant language
- Python
- Stars
- 91
- Forks
- 134
- Avg merge
- 2h 51m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
A clear and concise description of what the bug is.
The following command fails 'faulty_help_example_parameters_rule' in linter.
az batch pool set --account-endpoint https://accountname.location.batch.azure.com --account-name MyAccount --application-package-references app01#1.0 --pool-id mypool
I believe this is because linter code uses shlex.split(command, comment=True) to split the command. Since we pass in comment=True, the part after hash is considered a comment and linter gives an error that the command is missing --pool-id which is a required parameter. Also according to documentation for --application-package-references, app#1.0 is a valid value for the parameter.
**To Reproduce**
Steps to reproduce the behavior.
Run the above command through the linter.
**Expected behavior**
A clear and concise description of what you expected to happen.
Linter will fail with the following error:
'''
Help-Entry: `batch pool set` -
There is a violation:
"az batch pool set --account-endpoint https://accountname.location.batch.azure.com --account-name MyAccount --application-package-references app01#1.0 --pool-id mypool" is not a valid command.
the following arguments are required: --pool-id.
'''
**Environment summary**
Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (`az --version`) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)
**Additional context**
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.