summaryrefslogtreecommitdiff
path: root/custom-checks
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-21 11:50:59 +0000
committerw0rp <devw0rp@gmail.com>2017-02-21 11:50:59 +0000
commit884109c6f4591ad057465b02fddae62c7be92c7f (patch)
tree8250216949be98ab22f0566d0507575f072fe423 /custom-checks
parent3c4af280f03aed86a5ff99fc7a66984ec322b5cf (diff)
downloadale-884109c6f4591ad057465b02fddae62c7be92c7f.zip
Add an extra custom check for using endif instead of end, etc.
Diffstat (limited to 'custom-checks')
-rwxr-xr-xcustom-checks6
1 files changed, 6 insertions, 0 deletions
diff --git a/custom-checks b/custom-checks
index 798049e3..0a1c96f7 100755
--- a/custom-checks
+++ b/custom-checks
@@ -67,6 +67,12 @@ check_line() {
if [[ "$line" =~ ' '+$ ]]; then
output_error 'Trailing whitespace'
fi
+
+ endif_regex='^ * end?i? *$'
+
+ if [[ "$line" =~ $endif_regex ]]; then
+ output_error 'Write endif, not en, end, or endi'
+ fi
}
# Loop through all of the vim files and keep track of the file line numbers.