summaryrefslogtreecommitdiff
path: root/custom-checks
diff options
context:
space:
mode:
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.