summaryrefslogtreecommitdiff
path: root/whitespace.sh
diff options
context:
space:
mode:
authorMarijn van der Werf <marijn.vanderwerf@gmail.com>2017-05-09 01:34:14 +0200
committerYamaArashi <YamaArashi@users.noreply.github.com>2017-05-08 16:53:21 -0700
commitbb5ba377365fbb5818c974f5ebaa4716154bb21f (patch)
tree04bdf1f0fc1befa052553144d478f0eb5638cd06 /whitespace.sh
parente75c3262f37483d3503126bebf8bf8b7b662d345 (diff)
Detect trailing whitespace
Diffstat (limited to 'whitespace.sh')
-rwxr-xr-xwhitespace.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/whitespace.sh b/whitespace.sh
new file mode 100755
index 000000000..7075fbd4e
--- /dev/null
+++ b/whitespace.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if grep -Enr "\s+\$" src; then
+ # Trailing whitespace detected
+ exit 1
+fi