aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2024-01-10 10:32:44 +0100
committerGuido Günther <agx@sigxcpu.org>2024-01-10 10:32:44 +0100
commit75cda5279eef3b158aae399d1086dde2975446be (patch)
tree12057f1cd9d8d274c1743c146ded8da5ca5eb915
parentdbd1b36695eea32278564dd4a0b49056aaa2e47f (diff)
Validate shell completion functions
We for zsh we can at least catch syntax errors and use shellcheck for bash.
-rw-r--r--Makefile6
-rw-r--r--debian/control3
-rwxr-xr-xdebian/rules1
3 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a1914f6d..81a0d913 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,12 @@ syntax-check:
type-check:
mypy gbp
+shell-check:
+ @echo "# Validating zsh completion"
+ zsh debian/zsh/_gbp
+ @echo "# Validating bash completion"
+ shellcheck --shell=bash debian/git-buildpackage.bash-completion
+
docs:
$(MAKE) -C docs
$(MAKE) apidocs
diff --git a/debian/control b/debian/control
index 9fd54a19..4462a1c5 100644
--- a/debian/control
+++ b/debian/control
@@ -38,6 +38,9 @@ Build-Depends:
# For the network tests
curl <!nocheck>,
python3-requests <!nocheck>,
+# For shell validation
+ shellcheck <!nocheck>,
+ zsh <!nocheck>,
Standards-Version: 4.6.1
Vcs-Git: https://git.sigxcpu.org/cgit/git-buildpackage/
Vcs-Browser: https://git.sigxcpu.org/cgit/git-buildpackage/
diff --git a/debian/rules b/debian/rules
index 76f08c3b..1c586b60 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,7 @@
override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
make
+ make shell-check
endif
execute_after_dh_auto_build: