-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] Linter rule for service_name.json #3186
Conversation
def _store_parsers(parser, parser_keys, parser_values, sub_parser_keys, sub_parser_values): | ||
for s in parser.subparsers.values(): | ||
parser_keys.append(_get_parser_name(s)) | ||
parser_values.append(s) | ||
if _is_group(s): | ||
for c in s.choices.values(): | ||
sub_parser_keys.append(_get_parser_name(c)) | ||
sub_parser_values.append(c) | ||
_store_parsers(c, parser_keys, parser_values, sub_parser_keys, sub_parser_values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reuse the same function in azure-cli-core
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reuse code from azure-cli-extensions
for help_file in help_files: | ||
if help_file.command: | ||
high_command_set.add(help_file.command.split()[0]) | ||
print('high_command_set:') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is high command
an existing term or coined by you? Is it OK to use command group
to refer to the same thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The left most word in a command, e.g., vm
, disk
. Let me add a comment.
Check format of service_name.json. Command and AzureServiceName are required. Others are optional.
Each highest level command group should have reference in service_name.json.
It only runs on modified extensions. I have tested it with modification on extension. This PR itself will not modify any extension.
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
azdev style <YOUR_EXT>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update
src/index.json
automatically.The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify
src/index.json
.