test spell check

This commit is contained in:
Nathan Anderson 2025-10-01 00:08:26 -06:00
parent 903e6b06f1
commit cf2d874f08
2 changed files with 26 additions and 17 deletions

View File

@ -27,6 +27,12 @@ fi
# Spell check # Spell check
if command -v aspell &> /dev/null; then if command -v aspell &> /dev/null; then
# Check if aspell can find dictionaries
if ! aspell dump dicts 2>/dev/null | grep -q "en"; then
echo "⚠️ aspell found but no English dictionaries available"
echo " Make sure ASPELL_CONF is set correctly in your direnv"
echo " Skipping spell check"
else
echo "Running spell check..." echo "Running spell check..."
MISSPELLED=0 MISSPELLED=0
for file in $STAGED_MD_FILES; do for file in $STAGED_MD_FILES; do
@ -44,6 +50,7 @@ if command -v aspell &> /dev/null; then
echo "Use 'git commit --no-verify' to skip if needed." echo "Use 'git commit --no-verify' to skip if needed."
exit 1 exit 1
fi fi
fi
else else
echo "⚠️ aspell not found, skipping spell check" echo "⚠️ aspell not found, skipping spell check"
fi fi

View File

@ -23,13 +23,15 @@
]; ];
shellHook = '' shellHook = ''
echo "Hugo development environment loaded" # export ASPELL_CONF="dict-dir ${pkgs.aspellDicts.en}/lib/aspell"
echo "Hugo version: $(hugo version)"
# Auto-install git hooks if not already installed # Auto-install git hooks if not already installed
if [ ! -L .git/hooks/pre-commit ]; then if [ ! -L .git/hooks/pre-commit ]; then
bash scripts/install_hooks.sh bash scripts/install_hooks.sh
fi fi
echo "Hugo development environment loaded" echo "Hugo development environment loaded"
echo "Hugo version: $(hugo version)"
''; '';
}; };
} }