Skip to content

Commit 08b067c

Browse files
author
robin
committed
Fix ShellCheck warnings and update CI lint rules
sourcedialog: remove unused ck/scb variables, move SC2206/SC2034 directives to correct lines, split local+assign for scroll_color. CI: exclude SC1091/SC2034/SC2154 for examples/tutorials (false positives from dynamic library variables).
1 parent 12088ad commit 08b067c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
- name: Install shellcheck
5252
run: sudo apt-get update && sudo apt-get install -y shellcheck
5353
- name: Run shellcheck on examples
54-
run: shellcheck -s bash examples/* tutorial/*
54+
run: shellcheck -s bash --exclude=SC1091,SC2034,SC2154 examples/* tutorial/*

sourcedialog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,8 @@ _sd_listbox_draw() {
824824
[[ $mark == no ]] || (( x += _SD_MARK_WIDTH ))
825825
(( ilight - ifirst < height )) && _sd_pos "$(( y + ilight - ifirst ))" "$x"
826826

827-
local scroll_color="$sgr0$(_sd_fg "$_SD_LIST_FG")$(_sd_bg "$_SD_LIST_BG")"
827+
local scroll_color
828+
scroll_color="$sgr0$(_sd_fg "$_SD_LIST_FG")$(_sd_bg "$_SD_LIST_BG")"
828829
if (( ifirst > 0 )); then
829830
_sd_pos "$y" "$(( x + width - 1 ))"
830831
printf '%s' "${scroll_color}$_SD_SCROLL_UP"

0 commit comments

Comments
 (0)