1
0
Fork 0
mirror of https://gitlab.com/lvra/lvra.gitlab.io.git synced 2025-05-02 04:08:29 +02:00
lvra.gitlab.io/test_trailing_spaces.sh
2024-04-16 07:26:02 +02:00

9 lines
218 B
Bash
Executable file

#!/bin/bash
TRAILING_SPACES=$(find content -name '*.md' -exec grep -EHn ' +$' {} \;)
if [[ -n "$TRAILING_SPACES" ]]; then
echo "Error: these files have trailing spaces!"
echo "$TRAILING_SPACES"
exit 1
fi