summaryrefslogtreecommitdiff
path: root/.tools/jobs/spaces.sh
diff options
context:
space:
mode:
Diffstat (limited to '.tools/jobs/spaces.sh')
-rwxr-xr-x.tools/jobs/spaces.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/.tools/jobs/spaces.sh b/.tools/jobs/spaces.sh
new file mode 100755
index 000000000..b0f485dbe
--- /dev/null
+++ b/.tools/jobs/spaces.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+find -H . -type f -name "*.txt" -exec sed -i 's/[[:blank:]]*$//' {} \;
+
+export RES=$(git diff --name-only)
+if [[ -n "${RES}" ]]; then
+ echo "Extra spaces before new lines detected in files:"
+ git diff --name-only
+ exit 1
+fi