feat: check for trailing spaces in CI
This commit is contained in:
9
test_trailing_spaces.sh
Executable file
9
test_trailing_spaces.sh
Executable 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
|
||||
Reference in New Issue
Block a user