summaryrefslogtreecommitdiff
path: root/.tools/jobs/newlines.sh
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-03-03 15:58:26 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-03 15:58:26 -0300
commit8a47b5ddffb66dd5f62033abd65126f3bb753d35 (patch)
treec24ee02654083c373d3dec30ebfe8a82b527b6f8 /.tools/jobs/newlines.sh
parentc1a17e31706c5b944442b0f8b43aa0147c770aef (diff)
downloadserverdata-8a47b5ddffb66dd5f62033abd65126f3bb753d35.tar.gz
serverdata-8a47b5ddffb66dd5f62033abd65126f3bb753d35.tar.bz2
serverdata-8a47b5ddffb66dd5f62033abd65126f3bb753d35.tar.xz
serverdata-8a47b5ddffb66dd5f62033abd65126f3bb753d35.zip
Add ci checks for bad new lines or trailing white spaces
Diffstat (limited to '.tools/jobs/newlines.sh')
-rwxr-xr-x.tools/jobs/newlines.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/.tools/jobs/newlines.sh b/.tools/jobs/newlines.sh
new file mode 100755
index 000000000..23309f70d
--- /dev/null
+++ b/.tools/jobs/newlines.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+find -H . -type f -name "*.txt" -o -name "*.conf" -exec dos2unix {} \;
+
+export RES=$(git diff --name-only)
+if [[ -n "${RES}" ]]; then
+ echo "Wrong new lines detected in files:"
+ git diff --name-only
+ exit 1
+fi