diff --git a/autoload/ale/handlers.vim b/autoload/ale/handlers.vim index 93282a4..96be427 100644 --- a/autoload/ale/handlers.vim +++ b/autoload/ale/handlers.vim @@ -258,7 +258,8 @@ function! ale#handlers#HandleGhcFormat(buffer, lines) abort else let l:type = '' let l:text = l:match[3] - end + endif + let l:type = l:type ==# '' ? 'E' : toupper(l:type[0]) call add(l:output, { diff --git a/custom-checks b/custom-checks index 798049e..0a1c96f 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.