ci: add shellcheck linter (#37682)

- Adds `make lint-shell`. uses local `shellcheck` if its version
matches, otherwise runs the pinned image via docker or podman
- `.shellcheckrc` disables the most annoying rules
- Fixes findings across existing scripts

Fixes: #37648
Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-authored-by: Nicolas <bircni@icloud.com>
This commit is contained in:
silverwind
2026-05-22 22:22:04 +02:00
committed by GitHub
parent f0eb065df7
commit 570173b409
12 changed files with 51 additions and 18 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
if [ ! -f go.mod -o ! -d snap ]; then
if [ ! -f go.mod ] || [ ! -d snap ]; then
echo "This script should be run from the root of the gitea repository"
exit 1
fi
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
if [ ! -f go.mod -o ! -d snap ]; then
if [ ! -f go.mod ] || [ ! -d snap ]; then
echo "This script should be run from the root of the gitea repository"
exit 1
fi