summaryrefslogtreecommitdiff
path: root/pre-commit.sh
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-08 12:54:40 -0400
committerpommicket <pommicket@gmail.com>2025-09-08 12:54:40 -0400
commitb3fd7c6de341644616a5f67be36b256686032f37 (patch)
tree0ecd0897dcbd6867578cdd97c3bf5d25ec15c773 /pre-commit.sh
parent829e49647ffa465786ea1d08e409faa75e1036cb (diff)
Various cleanup to spec
Diffstat (limited to 'pre-commit.sh')
-rwxr-xr-xpre-commit.sh11
1 files changed, 11 insertions, 0 deletions
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