Azure / Azure/azure-cli-dev-tools

Valid Example Failing Linter Test

Ouverte
#67 1 commentaire 0 réactions 1 personne assignée Réclamée par @haroldrandom Voir sur GitHub
bug Linter
Langage dominant
Python
Étoiles
91
Forks
134
Merge moyen
2 h 51 min
PR mergées (30 j)
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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.