diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/CHANGELOG.md b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/CHANGELOG.md index d5677cd0003..5a2e2e1ed51 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/CHANGELOG.md +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/CHANGELOG.md @@ -12,6 +12,8 @@ ### Other Changes +- `noop` for methods where fixCheckErrors isn't fully supported if set to True for clarity + ## 0.5.10 (2025-12-08) ### Features Added diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Helpers/CommonLanguageHelpers.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Helpers/CommonLanguageHelpers.cs index b2acc646313..bdad7998ae9 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Helpers/CommonLanguageHelpers.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Helpers/CommonLanguageHelpers.cs @@ -93,6 +93,11 @@ public async Task ValidateChangelog( bool fixCheckErrors = false, CancellationToken ct = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for changelog validation."); + } + try { var (packageRepoRoot, errorResponse) = ValidatePackageAndDiscoverRepo(packagePath); @@ -128,6 +133,11 @@ public async Task ValidateReadme( bool fixCheckErrors = false, CancellationToken ct = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for README validation."); + } + try { var (packageRepoRoot, errorResponse) = ValidatePackageAndDiscoverRepo(packagePath); diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/DotNetLanguageService.Checks.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/DotNetLanguageService.Checks.cs index 1da515a6ea9..8b45625cd1a 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/DotNetLanguageService.Checks.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/DotNetLanguageService.Checks.cs @@ -12,6 +12,11 @@ public partial class DotnetLanguageService : LanguageService { public override async Task CheckGeneratedCode(string packagePath, bool fixCheckErrors = false, CancellationToken ct = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for generated code checks."); + } + try { logger.LogInformation("Starting generated code checks for .NET project at: {PackagePath}", packagePath); @@ -62,6 +67,11 @@ public override async Task CheckGeneratedCode(string packa public override async Task CheckAotCompat(string packagePath, bool fixCheckErrors = false, CancellationToken ct = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for AOT compatibility checks."); + } + try { logger.LogInformation("Starting AOT compatibility check for .NET project at: {PackagePath}", packagePath); diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/GoLanguageService.Checks.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/GoLanguageService.Checks.cs index fb7cbdf4839..1b59ead30ac 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/GoLanguageService.Checks.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/GoLanguageService.Checks.cs @@ -155,6 +155,11 @@ public async Task GetSDKPackageName(string repo, string packagePath, Can public override async Task UpdateSnippets(string packagePath, bool fixCheckErrors = false, CancellationToken cancellationToken = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for snippet updates in Go."); + } + return await Task.FromResult(new PackageCheckResponse()); } diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/JavaLanguageService.Checks.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/JavaLanguageService.Checks.cs index 30b14cc0a98..b04b36808d6 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/JavaLanguageService.Checks.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/JavaLanguageService.Checks.cs @@ -217,6 +217,11 @@ public override async Task LintCode(string packagePath, bo public override async Task UpdateSnippets(string packagePath, bool fixCheckErrors = false, CancellationToken cancellationToken = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for snippet updates in Java."); + } + try { logger.LogInformation("Starting code snippet update for Java project at: {PackagePath}", packagePath); @@ -265,6 +270,11 @@ public override async Task UpdateSnippets(string packagePa public override async Task AnalyzeDependencies(string packagePath, bool fixCheckErrors = false, CancellationToken cancellationToken = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for dependency analysis in Java."); + } + try { logger.LogInformation("Starting dependency analysis for Java project at: {PackagePath}", packagePath); diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/JavaScriptLanguageService.Checks.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/JavaScriptLanguageService.Checks.cs index aa41fe5aaf2..52603aac260 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/JavaScriptLanguageService.Checks.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/JavaScriptLanguageService.Checks.cs @@ -14,6 +14,11 @@ public partial class JavaScriptLanguageService : LanguageService public async Task ValidateSamplesAsync(string packagePath, bool fixCheckErrors = false, CancellationToken ct = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for sample validation in JavaScript."); + } + try { var result = await processHelper.Run(new( @@ -44,6 +49,11 @@ public async Task ValidateSamplesAsync(string packagePath, public override async Task UpdateSnippets(string packagePath, bool fixCheckErrors = false, CancellationToken cancellationToken = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for snippet updates in JavaScript."); + } + try { var result = await processHelper.Run(new( diff --git a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/PythonLanguageService.Checks.cs b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/PythonLanguageService.Checks.cs index a6781627d54..82fb3329ede 100644 --- a/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/PythonLanguageService.Checks.cs +++ b/tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/PythonLanguageService.Checks.cs @@ -14,6 +14,11 @@ public partial class PythonLanguageService : LanguageService { public override async Task UpdateSnippets(string packagePath, bool fixCheckErrors = false, CancellationToken cancellationToken = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for snippet updates in Python."); + } + try { logger.LogInformation("Starting snippet update for Python project at: {PackagePath}", packagePath); @@ -56,6 +61,11 @@ public override async Task UpdateSnippets(string packagePa public override async Task LintCode(string packagePath, bool fixCheckErrors = false, CancellationToken cancellationToken = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for code linting in Python."); + } + try { logger.LogInformation("Starting code linting for Python project at: {PackagePath}", packagePath); @@ -103,6 +113,11 @@ public override async Task LintCode(string packagePath, bo public override async Task FormatCode(string packagePath, bool fixCheckErrors = false, CancellationToken cancellationToken = default) { + if (fixCheckErrors) + { + return new PackageCheckResponse(0, "noop", "Fix mode is not supported for code formatting in Python."); + } + try { logger.LogInformation("Starting code formatting for Python project at: {PackagePath}", packagePath);