Add an extra custom check for using endif instead of end, etc.
This commit is contained in:
parent
3c4af280f0
commit
884109c6f4
@ -258,7 +258,8 @@ function! ale#handlers#HandleGhcFormat(buffer, lines) abort
|
|||||||
else
|
else
|
||||||
let l:type = ''
|
let l:type = ''
|
||||||
let l:text = l:match[3]
|
let l:text = l:match[3]
|
||||||
end
|
endif
|
||||||
|
|
||||||
let l:type = l:type ==# '' ? 'E' : toupper(l:type[0])
|
let l:type = l:type ==# '' ? 'E' : toupper(l:type[0])
|
||||||
|
|
||||||
call add(l:output, {
|
call add(l:output, {
|
||||||
|
@ -67,6 +67,12 @@ check_line() {
|
|||||||
if [[ "$line" =~ ' '+$ ]]; then
|
if [[ "$line" =~ ' '+$ ]]; then
|
||||||
output_error 'Trailing whitespace'
|
output_error 'Trailing whitespace'
|
||||||
fi
|
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.
|
# Loop through all of the vim files and keep track of the file line numbers.
|
||||||
|
Loading…
Reference in New Issue
Block a user