Skip to content

Commit fa58869

Browse files
committed
fix(sonarcloud): add missing default cases to case statements
Fixes S131 violations: - quality-loop-helper.sh: Add default case for unknown PR status - terminal-title-helper.sh: Add default cases for terminal detection These were the 3 critical SonarCloud issues reported in postflight.
1 parent ff6239c commit fa58869

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

.agent/scripts/quality-loop-helper.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,9 @@ pr_review_loop() {
816816
fi
817817
fi
818818
;;
819+
*)
820+
print_warning "Unknown PR status: $status"
821+
;;
819822
esac
820823

821824
iteration=$(increment_iteration)

.agent/scripts/terminal-title-helper.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ detect_terminal() {
9999
echo "hyper"
100100
return 0
101101
;;
102+
*)
103+
# Not a known TERM_PROGRAM, continue to TERM check
104+
;;
102105
esac
103106

104107
# Check by TERM variable for other terminals
@@ -107,6 +110,9 @@ detect_terminal() {
107110
echo "compatible"
108111
return 0
109112
;;
113+
*)
114+
# Not a known TERM, continue to other checks
115+
;;
110116
esac
111117

112118
# Check for Windows Terminal

0 commit comments

Comments
 (0)