From a608aaf312bab74937b85b073bbf21d5a9eb4724 Mon Sep 17 00:00:00 2001 From: charliemirabile <46761267+charliemirabile@users.noreply.github.com> Date: Sun, 21 Sep 2025 16:40:18 -0400 Subject: [PATCH 1/4] script-lint: add dev_sockets.sh We forgot to add dev_sockets.sh to list of scripts to be linted in script-lint.sh when it was introduced. Fixes: f063e49 ("container-compose: switch to unix sockets for nginx") --- script-lint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script-lint.sh b/script-lint.sh index 10cf94fa..6bef5fa0 100755 --- a/script-lint.sh +++ b/script-lint.sh @@ -5,6 +5,7 @@ require shellcheck set -ex +shellcheck dev_sockets.sh shellcheck script-lint.sh shellcheck test.sh shellcheck orbit/warpdrive.sh From d93da93dcb67eebf0c205d2a988022321993df4a Mon Sep 17 00:00:00 2001 From: charliemirabile <46761267+charliemirabile@users.noreply.github.com> Date: Sun, 21 Sep 2025 16:43:25 -0400 Subject: [PATCH 2/4] script-lint: add orbit/start.sh We forgot to add start.sh to list of scripts to be linted in script-lint.sh when it was introduced. Fixes: 0bbf8a3 ("orbit: Containerfile: move start command to script") --- script-lint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script-lint.sh b/script-lint.sh index 6bef5fa0..ea1afe9d 100755 --- a/script-lint.sh +++ b/script-lint.sh @@ -9,6 +9,7 @@ shellcheck dev_sockets.sh shellcheck script-lint.sh shellcheck test.sh shellcheck orbit/warpdrive.sh +shellcheck orbit/start.sh shellcheck denis/configure.sh shellcheck mailman/inspector.sh shellcheck git/admin.sh From 20bf86ac780f71af8a2d4beb3884515643507b8f Mon Sep 17 00:00:00 2001 From: charliemirabile <46761267+charliemirabile@users.noreply.github.com> Date: Sun, 21 Sep 2025 16:47:44 -0400 Subject: [PATCH 3/4] script-lint: add start.sh We forgot to add start.sh to list of scripts to be linted in script-lint.sh when we imported the CI code from circumference. Fixes: 930b740 ("CI: move code into singularity repo") --- script-lint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script-lint.sh b/script-lint.sh index ea1afe9d..a30ccdfa 100755 --- a/script-lint.sh +++ b/script-lint.sh @@ -5,6 +5,7 @@ require shellcheck set -ex +shellcheck start.sh shellcheck dev_sockets.sh shellcheck script-lint.sh shellcheck test.sh From 9e6ad7d4efe01992b4189090cf51a9a21f111b88 Mon Sep 17 00:00:00 2001 From: charliemirabile <46761267+charliemirabile@users.noreply.github.com> Date: Sun, 21 Sep 2025 16:49:06 -0400 Subject: [PATCH 4/4] script-lint: monitor for new scripts It is easy to forget to add scripts to script-lint.sh. Run a find command to search for any files ending in `.sh` and check how many are found against a known good count. This ensures that script lint will fail if a new script is added and it is not updated. This is not perfect since there are scipts like the githooks that do not have a .sh extension, but it should cover most cases and make it easy to do the right thing. Obviously it is concievable that a script might come along which we do not want to lint for some reason. In that case it is fine to just increment the number we check for without adding a call to shellcheck. It just makes sure that that choice is explicit. --- script-lint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script-lint.sh b/script-lint.sh index a30ccdfa..40b70a16 100755 --- a/script-lint.sh +++ b/script-lint.sh @@ -22,3 +22,5 @@ shellcheck git/hooks/post-update # -x needed to make shellcheck follow `source` command shellcheck -x backup/backup.sh shellcheck -x backup/restore.sh + +test "$(git ls-tree -r HEAD | grep -c '.*\.sh$')" -eq "13" || (echo "New script detected. Does it need to be added to script-lint?" && false)