feat: check for trailing spaces in CI #24

Merged
gabmus merged 2 commits from feat/trailing_spaces_check into main 2024-04-16 01:34:55 -04:00
2 changed files with 13 additions and 0 deletions
Showing only changes of commit 13360a21f0 - Show all commits

View File

@@ -6,6 +6,10 @@ test-links:
script:
- python3 ./test_links.py
test-trailing-spaces:
script:
- ./test_trailing_spaces.sh
test-build:
image: registry.gitlab.com/pages/hugo/hugo_extended
script:

9
test_trailing_spaces.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/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