-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{CI} azdev style check ignore aaz folder #26492
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
Conversation
️✔️AzureCLI-FullTest
|
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
CI |
pylintrc
Outdated
| @@ -1,5 +1,5 @@ | |||
| [MASTER] | |||
| ignore=tests,generated,vendored_sdks,privates | |||
| ignore=tests,generated,vendored_sdks,privates,aaz | |||
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.
Will this also make src/azure-cli-core/azure/cli/core/aaz unchecked?
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.
I'm just testing first to see if it can improve the test speed.
These parameters are more complicated than we think.
- The ignore parameter represents
Files or directories to be skipped. They should be base names, not paths. - The ignore-patterns parameter represents
Files or directories matching the regular expression patterns are skipped.The regex matches against base names, not paths. - The ignore-paths parameter represents
Files or directories matching the regular expressions patterns to the ignore-list, but I use the pylint 2.11.1 version test and it doesn't work.
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.
I think it may be a good idea to rename aaz folders under azure/cli/command_modules (such as azure/cli/command_modules/network/aaz) to aaz_generated. It will make linter's configuration much easier.
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.
I very much agree with your idea, we should rename all the directories generated by CodeGen to aaz_generated, not only main modules, but also extensions,
But I'm not too sure how much this affects CodeGen.
We can discuss this with @kairu-ms and I'll keep trying to see if there is a way to exclude directories.
| [MASTER] | ||
| ignore=tests,generated,vendored_sdks,privates | ||
| ignore-patterns=test.*,azure_devops_build.* | ||
| ignore-paths=.*/command_modules/.*/aaz |
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
ignoreparameter represents Files or directories to be skipped. They should be base names, not paths. - The
ignore-patternsparameter represents Files or directories matching the regular expression patterns are skipped. The regex matches against base names, not paths. - The
ignore-pathsparameter represents Files or directories matching the regular expressions patterns to the ignore-list.
We need include /core/aaz folder, so useignore-pathshere.
Reference code: https://github.com/pylint-dev/pylint/blob/main/examples/pylintrc#L48-L60
|
@wangzelin007 Do we also want to apply this change to azure-cli-extensions repo? |
azure-cli-extensions repo do not have azdev style check, and we can simple add |
* update * update * Update __init__.py * update
Related command
Description
azdev styleignore aaz folder, reduce the check time from 75min to 35min.It will still scan the core/aaz folder, as shown in the screenshot:
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.