From 75cda5279eef3b158aae399d1086dde2975446be Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Wed, 10 Jan 2024 10:32:44 +0100 Subject: Validate shell completion functions We for zsh we can at least catch syntax errors and use shellcheck for bash. --- Makefile | 6 ++++++ debian/control | 3 +++ debian/rules | 1 + 3 files changed, 10 insertions(+) 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 , python3-requests , +# For shell validation + shellcheck , + zsh , 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: -- cgit v1.2.3