From bb347a34dc73e2d14ef28b32f77d3d681bf56022 Mon Sep 17 00:00:00 2001 From: "sonarqube-agent[bot]" <210722872+sonarqube-agent[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 05:04:02 +0000 Subject: [PATCH] fix: Address 2 SonarQube issues Fixed issues: - AZ7wF1S9I9TVtwnJfdRg for typescript:S7780 rule - AZ7wF1UnI9TVtwnJfdRh for typescript:S7780 rule Generated by SonarQube Agent (task: c3035933-50ce-45be-89bf-50d2c834f6ef) --- src/cli/commands/integrate/git/tools/husky/shell-fragments.ts | 2 +- src/cli/commands/integrate/git/tools/native/shell-fragments.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/commands/integrate/git/tools/husky/shell-fragments.ts b/src/cli/commands/integrate/git/tools/husky/shell-fragments.ts index 89e5e8bb3..2f6105bef 100644 --- a/src/cli/commands/integrate/git/tools/husky/shell-fragments.ts +++ b/src/cli/commands/integrate/git/tools/husky/shell-fragments.ts @@ -41,7 +41,7 @@ export function getRecognizedHuskyMarkers(hook: GitHookType): string[] { function huskyBinBlock(): string { return [ String.raw`CLEAN_PATH=$(echo "$PATH" | tr ':' '\n' | grep -v node_modules | tr '\n' ':' | sed 's/:$//')`, - String.raw`SONAR_BIN=$(PATH=$CLEAN_PATH command -v sonar 2>/dev/null || :)`, + 'SONAR_BIN=$(PATH=$CLEAN_PATH command -v sonar 2>/dev/null || :)', `[ -z "$SONAR_BIN" ] && { echo "${SONAR_HOOK_SKIP_SECRETS_MESSAGE}"; exit 0; }`, ].join('\n'); } diff --git a/src/cli/commands/integrate/git/tools/native/shell-fragments.ts b/src/cli/commands/integrate/git/tools/native/shell-fragments.ts index b0520fe43..b04f0b9ce 100644 --- a/src/cli/commands/integrate/git/tools/native/shell-fragments.ts +++ b/src/cli/commands/integrate/git/tools/native/shell-fragments.ts @@ -44,7 +44,7 @@ export function getRecognizedNativeMarkers(hook: GitHookType): string[] { function nativeBinBlock(): string { return [ // `|| :` avoids exiting under `sh -e` when `command -v` fails (missing sonar). - String.raw`SONAR_BIN=$(command -v sonar 2>/dev/null || :)`, + `SONAR_BIN=$(command -v sonar 2>/dev/null || :)`, `[ -z "$SONAR_BIN" ] && { echo "${SONAR_HOOK_SKIP_SECRETS_MESSAGE}"; exit 0; }`, ].join('\n'); }