refactor --check-type and --package-path and service initialization for language repos#11779
Merged
Conversation
1028d54 to
7798ec9
Compare
timovv
reviewed
Aug 26, 2025
timovv
reviewed
Aug 27, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the package checking tool to replace the factory pattern with a composition-based approach for language-specific validations. The main goal is to modernize the architecture by using dependency injection and a more flexible language detection mechanism.
- Replaced
--check-typeoption parameter with individual sub-commands for each check type - Changed
--package-pathoption to default to current directory instead of being required - Replaced inheritance-based language services with composition-based language-specific checks
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| PackageCheckTool.cs | Refactored command structure to use sub-commands instead of options, updated to use ILanguageChecks interface |
| ServiceRegistrations.cs | Updated DI container to register new composition-based language check services |
| LanguageSpecificCheckResolver.cs | New resolver service for detecting and selecting appropriate language-specific check implementations |
| PythonLanguageSpecificChecks.cs | New composition-based Python language check implementation |
| JavaScriptLanguageSpecificChecks.cs | New composition-based JavaScript language check implementation |
| JavaLanguageSpecificChecks.cs | New composition-based Java language check implementation |
| GoLanguageSpecificChecks.cs | New composition-based Go language check implementation |
| DotNetLanguageSpecificChecks.cs | New composition-based .NET language check implementation |
| LanguageChecks.cs | New unified language checks service that delegates to language-specific implementations |
| ILanguageSpecificChecks.cs | New interface defining the contract for language-specific check implementations |
| CLICheckResponse.cs | Added utility method for creating responses from process results |
| SharedOptions.cs | Updated PackagePath option to use current directory as default and made it optional |
Comments suppressed due to low confidence (1)
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/Package/PackageCheckTool.cs:31
- The SupportedLanguage property returns "JavaScript" but the LanguageSpecificCheckResolver expects language names to match what's extracted from Language-Settings.ps1. Based on the resolver's detection logic, this should likely be "js" or another value that matches the PowerShell script output.
this.languageChecks = languageChecks;
Co-authored-by: Timo van Veenendaal <timov@microsoft.com>
…iptLanguageSpecificChecks.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…-sdk-tools into refactorservice
benbp
reviewed
Aug 27, 2025
benbp
reviewed
Aug 27, 2025
benbp
reviewed
Aug 27, 2025
benbp
reviewed
Aug 27, 2025
…ageSpecificChecks.cs Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
…-sdk-tools into refactorservice
timovv
approved these changes
Aug 27, 2025
l0lawrence
added a commit
to l0lawrence/azure-sdk-tools
that referenced
this pull request
Aug 28, 2025
…zation for language repos (Azure#11779)" This reverts commit d2dfe8f.
danieljurek
pushed a commit
that referenced
this pull request
Aug 29, 2025
…or language repos (#11779) * this? * this * need to fix * do not need a default it will do nothing * remove default * updating * update package tool * add Go * rename * add .net and java * add other lang outline * spelling * make a helper func * nit * renames * update checks * also update CLI tool command to remove check-type * can_handle higher level, add interfaces for mocking * remove checkHelper * make var private * set default current working directory * run pwsh command * Update tools/azsdk-cli/Azure.Sdk.Tools.Cli/Commands/SharedOptions.cs Co-authored-by: Timo van Veenendaal <timov@microsoft.com> * dotnet * Update tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/JavaScriptLanguageSpecificChecks.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * constructor overload * Update tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/GoLanguageSpecificChecks.cs Co-authored-by: Ben Broderick Phillips <ben@benbp.net> * correcting code --------- Co-authored-by: Timo van Veenendaal <timov@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
radhgupta
pushed a commit
to radhgupta/azure-sdk-tools
that referenced
this pull request
Sep 9, 2025
…or language repos (Azure#11779) * this? * this * need to fix * do not need a default it will do nothing * remove default * updating * update package tool * add Go * rename * add .net and java * add other lang outline * spelling * make a helper func * nit * renames * update checks * also update CLI tool command to remove check-type * can_handle higher level, add interfaces for mocking * remove checkHelper * make var private * set default current working directory * run pwsh command * Update tools/azsdk-cli/Azure.Sdk.Tools.Cli/Commands/SharedOptions.cs Co-authored-by: Timo van Veenendaal <timov@microsoft.com> * dotnet * Update tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/JavaScriptLanguageSpecificChecks.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * constructor overload * Update tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/GoLanguageSpecificChecks.cs Co-authored-by: Ben Broderick Phillips <ben@benbp.net> * correcting code --------- Co-authored-by: Timo van Veenendaal <timov@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.