Skip to content

Commit ede44c7

Browse files
style: fix shfmt formatting by removing keep_padding from .editorconfig
keep_padding = true caused bizarre column-alignment when shfmt expanded inline { ... } blocks, aligning body content to the column of the opening brace rather than using normal indentation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2d6d6ee commit ede44c7

3 files changed

Lines changed: 33 additions & 21 deletions

File tree

.claude/skills/instance-status/scripts/cross-worktree-probe.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ for port in "${PORTS[@]}"; do
2929
cmd="$(ps -o command= -p "$pid" 2>/dev/null | head -c 200)"
3030
case "$port" in
3131
8080) kind=platform ;;
32-
8181|8282|8383|8484|8585|8686) kind=kas ;;
32+
8181 | 8282 | 8383 | 8484 | 8585 | 8686) kind=kas ;;
3333
8888) kind=docker-keycloak ;;
3434
5432) kind=docker-postgres ;;
35-
*) kind=unknown ;;
35+
*) kind=unknown ;;
3636
esac
3737
# Refine kind if process command says otherwise (e.g. a misbound port).
3838
case "$cmd" in
3939
*"/service "*) kind=platform ;;
40-
*opentdf-kas*|*"kas start"*) kind=kas ;;
40+
*opentdf-kas* | *"kas start"*) kind=kas ;;
4141
esac
4242

4343
printf '%s\ttcp\t%s\t%s\t%s\n' "$port" "$pid" "$cwd" "$kind"
@@ -51,7 +51,7 @@ done
5151
docker ps --format '{{.Names}}' 2>/dev/null | while IFS= read -r name; do
5252
[[ -z "$name" ]] && continue
5353
case "$name" in
54-
*-keycloak-*) printf 'compose\tdocker\t-\t%s\tcompose-project\n' "${name%-keycloak-*}" ;;
54+
*-keycloak-*) printf 'compose\tdocker\t-\t%s\tcompose-project\n' "${name%-keycloak-*}" ;;
5555
*-opentdfdb-*) printf 'compose\tdocker\t-\t%s\tcompose-project\n' "${name%-opentdfdb-*}" ;;
5656
esac
5757
done | sort -u

.claude/skills/scenario-doctor/scripts/diff-running-vs-intended.sh

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ done
3333
: "${INST_ROOT:?could not locate tests/instances/ above $PWD}"
3434

3535
inst="$INST_ROOT/$name/instance.yaml"
36-
[[ -f "$inst" ]] || { echo "no instance.yaml at $inst" >&2; exit 2; }
36+
[[ -f "$inst" ]] || {
37+
echo "no instance.yaml at $inst" >&2
38+
exit 2
39+
}
3740

3841
INST_DIR_PARENT="${INST_ROOT%/instances}"
3942
PLATFORM_DIST="$INST_DIR_PARENT/xtest/platform/dist"
@@ -51,12 +54,12 @@ declare -A PORT_OF=(
5154

5255
# Helper: resolve a pin (ref or dist) to expected_sha by reading .version.
5356
expected_sha_for() {
54-
local pin="$1" # could be a ref like 'main' or 'pr:3537', or a dist slug
57+
local pin="$1" # could be a ref like 'main' or 'pr:3537', or a dist slug
5558
for cand in "$PLATFORM_DIST"/*/; do
5659
[[ -f "$cand/.version" ]] || continue
57-
if grep -Fq "ref=$pin" "$cand/.version" \
58-
|| grep -Fq "ref=refs/pull/${pin#pr:}/head" "$cand/.version" \
59-
|| [[ "$(basename "${cand%/}")" == "$pin" ]]; then
60+
if grep -Fq "ref=$pin" "$cand/.version" ||
61+
grep -Fq "ref=refs/pull/${pin#pr:}/head" "$cand/.version" ||
62+
[[ "$(basename "${cand%/}")" == "$pin" ]]; then
6063
awk -F= '/^sha=/ {print substr($2,1,12); exit}' "$cand/.version"
6164
return
6265
fi
@@ -69,9 +72,15 @@ actual_sha_for_port() {
6972
local port="$1"
7073
local pid binary version
7174
pid="$(lsof -nP -iTCP:"$port" -sTCP:LISTEN 2>/dev/null | awk 'NR>1 {print $2; exit}')"
72-
[[ -z "$pid" ]] && { echo ""; return; }
75+
[[ -z "$pid" ]] && {
76+
echo ""
77+
return
78+
}
7379
binary="$(ps -o command= -p "$pid" 2>/dev/null | awk '{print $1}')"
74-
[[ -f "$binary" ]] || { echo "?"; return; }
80+
[[ -f "$binary" ]] || {
81+
echo "?"
82+
return
83+
}
7584
version="$(dirname "$binary")/.version"
7685
[[ -f "$version" ]] && awk -F= '/^sha=/ {print substr($2,1,12); exit}' "$version" || echo "?"
7786
}
@@ -84,7 +93,7 @@ health_of() {
8493

8594
# Extract pins from instance.yaml. yq optional; fall back to grep.
8695
get_pin() {
87-
local field="$1" # e.g. .platform OR .kas.km1
96+
local field="$1" # e.g. .platform OR .kas.km1
8897
if command -v yq >/dev/null 2>&1; then
8998
yq -r "($field.source.ref? // $field.dist? // \"\")" "$inst"
9099
else
@@ -117,9 +126,12 @@ pin="$(get_pin .platform)"
117126
exp="$(expected_sha_for "$pin")"
118127
act="$(actual_sha_for_port 8080)"
119128
hc="$(health_of 8080)"
120-
if [[ -z "$pin" ]]; then status=NO-PIN
121-
elif [[ -z "$act" ]]; then status=NOT-RUNNING
122-
elif [[ "$act" == "$exp" ]]; then status=MATCH
129+
if [[ -z "$pin" ]]; then
130+
status=NO-PIN
131+
elif [[ -z "$act" ]]; then
132+
status=NOT-RUNNING
133+
elif [[ "$act" == "$exp" ]]; then
134+
status=MATCH
123135
else status=WRONG-BINARY; fi
124136
printf 'platform\t8080\t%s\t%s\t%s\t%s\n' "${exp:-?}" "${act:--}" "$hc" "$status"
125137

@@ -140,9 +152,12 @@ for kas in "${kas_names[@]}"; do
140152
exp="$(expected_sha_for "$pin")"
141153
act="$(actual_sha_for_port "$port")"
142154
hc="$([[ "$port" != "?" ]] && health_of "$port" || echo -)"
143-
if [[ -z "$pin" ]]; then status=NO-PIN
144-
elif [[ -z "$act" ]]; then status=NOT-RUNNING
145-
elif [[ "$act" == "$exp" ]]; then status=MATCH
155+
if [[ -z "$pin" ]]; then
156+
status=NO-PIN
157+
elif [[ -z "$act" ]]; then
158+
status=NOT-RUNNING
159+
elif [[ "$act" == "$exp" ]]; then
160+
status=MATCH
146161
else status=WRONG-BINARY; fi
147162
printf '%s\t%s\t%s\t%s\t%s\t%s\n' "$kas" "$port" "${exp:-?}" "${act:--}" "$hc" "$status"
148163
done

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,5 @@ binary_next_line = false
1818
# Switch case indentation
1919
switch_case_indent = true
2020

21-
# Keep column alignment
22-
keep_padding = true
23-
2421
# Function brace on same line
2522
function_next_line = false

0 commit comments

Comments
 (0)