CLI-131 fix: Apply 1 SonarQube suggestion#92
Open
sonarqube-agent[bot] wants to merge 7 commits intomasterfrom
Open
CLI-131 fix: Apply 1 SonarQube suggestion#92sonarqube-agent[bot] wants to merge 7 commits intomasterfrom
sonarqube-agent[bot] wants to merge 7 commits intomasterfrom
Conversation
… integrate update - Add agentExtensions registry to CliState with upsertAgentExtension and findExtensionsByProject helpers; migrate existing state files on load - Add migration system that rewrites legacy hook configs to the full analysis pipeline (secrets + A3S); invoked from integrate command - Update hook templates and hooks installer to support the full pipeline - Update integrate claude to run migrations and register the sonar-a3s PostToolUse extension in the agentExtensions registry
…tion - Add analyzeFile API method to SonarQubeClient (SonarQube Cloud only, calls api.sonarcloud.io/a3s-analysis/analyses); add SONAR_CLI_SONARCLOUD_API_URL env var override for test environments - Add connectionType field to ResolvedAuth so callers can determine cloud vs on-premise without a second loadState() call - Add analyze a3s subcommand for standalone A3S analysis on a single file - Add analyze <file> full pipeline command: secrets scan → A3S analysis; secrets detection short-circuits A3S to avoid false positives - Fix: omit branchName from request when not provided (null caused 400) - Fix: return "--file is required" error when --file flag is missing - Add unit tests (analyze-a3s) and integration tests with fake server; extend test harness with withA3sExtension, A3S endpoint, macOS symlink normalization (realpathSync), and SONAR_CLI_SONARCLOUD_API_URL injection
…tive
- Replace python3 JSON parsing in bash hooks with grep/cut (no external runtimes)
- Extract installHook() as atomic primitive with per-hook installDir and scope
- Per-hook scope ('global'|'project') replaces single isGlobal flag across all hooks
- A3S hook always installs to projectRoot; secrets hooks follow globalDir when set
- Rename installSecretScanningHooks → installHooks across all call sites
- Derive upsert marker from scriptPath first segment; unify scriptSubdir+scriptName → scriptPath
- Update and fix tests to reflect new routing behavior
Commit 1 of SonarQube suggestions Fully fixed issues: - [typescript:S107] AZzYxV7OXN7jUgP8c5rJ: Async function 'runFinalVerification' has too many parameters (8). Maximum allowed is 7. Generated by SonarQube Agent
9140621 to
ee3a753
Compare
Base automatically changed from
feature/kk/CLI-98-A3S-Claude-Code-integration
to
master
March 12, 2026 12:05
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.
This PR includes automated code changes to address 1 SonarQube issues: MAJOR (1).
View Project in SonarCloud
Fixed Issues
typescript:S107 - Async function 'runFinalVerification' has too many parameters (8). Maximum allowed is 7. • MAJOR • View issue
Location:
src/cli/commands/integrate/claude/index.ts:439Why is this an issue?
What changed
Defines the
FinalVerificationParamsinterface that groups all 8 parameters ofrunFinalVerificationinto a single object type. This provides the data structure needed to refactor the function signature from 8 individual parameters down to one, resolving the 'too many parameters' code smell.Directly fixes the 'too many parameters' issue by replacing the 8 individual parameters of
runFinalVerificationwith a singleparams: FinalVerificationParamsobject parameter. The parameters are then destructured inside the function body, preserving the same internal logic while reducing the parameter count from 8 to 1.Updates the first call site of
runFinalVerificationto pass an object literal (opening{) instead of positional arguments, matching the new single-parameter signature that fixes the 'too many parameters' issue.At the first call site, converts the positional argument
projectInfo.rootto the named propertyprojectRoot: projectInfo.rootwithin the object literal, since the parameter name differs from the expression being passed. This is required for the refactored function signature.Closes the object literal at the first call site by changing
);to});, completing the conversion from positional arguments to a single object parameter.Updates the second call site of
runFinalVerificationto pass an object literal (opening{) instead of positional arguments, matching the new single-parameter signature that fixes the 'too many parameters' issue.At the second call site, converts the positional argument
projectInfo.rootto the named propertyprojectRoot: projectInfo.rootwithin the object literal, since the parameter name differs from the expression being passed. This is required for the refactored function signature.Closes the object literal at the second call site by changing
);to});, completing the conversion from positional arguments to a single object parameter.SonarQube Remediation Agent uses AI. Check for mistakes.
DISCLAIMER: Remediation Agent will not be triggered again on this (self authored) PR