Azure / Azure/azure-cli-dev-tools

Valid Example Failing Linter Test

Offen
#67 1 Kommentar 0 Reaktionen 1 zugewiesene Person Beansprucht von @haroldrandom Auf GitHub ansehen
bug Linter
Vorherrschende Sprache
Python
Sterne
91
Forks
134
Ø Merge
2 Std. 51 Min.
Gemergte PRs (30 T.)
1

Beschreibung

**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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.