From b3fd7c6de341644616a5f67be36b256686032f37 Mon Sep 17 00:00:00 2001 From: pommicket Date: Mon, 8 Sep 2025 12:54:40 -0400 Subject: Various cleanup to spec --- pre-commit.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 pre-commit.sh (limited to 'pre-commit.sh') diff --git a/pre-commit.sh b/pre-commit.sh new file mode 100755 index 0000000..995cc0a --- /dev/null +++ b/pre-commit.sh @@ -0,0 +1,11 @@ +#!/bin/bash +for file in site/*.html; do + echo "Checking $file..." + # Check with Nu validator (https://github.com/validator/validator) if installed + which vnu >/dev/null && vnu $file || exit 1 + # /dev/null is to force file names to be printed (grep -H is a GNU extension) + if grep -n '\s$' /dev/null $file; then + echo "$file has trailing white space." + exit 1 + fi +done -- cgit v1.2.3