mirror of
https://github.com/dense-analysis/ale.git
synced 2026-10-09 14:55:52 +08:00
Add a script for custom checks to enforce using the abort flag for functions and trailing whitespace, and fix existing issues.
This commit is contained in:
1 parent
e4a4fcd26b
commit
d7ed49f849
36 files changed
+134
-43
No files matched your search
@@ -11,7 +11,7 @@ if !exists('g:ale_linters_sh_shell_default_shell')
|
||||
endif
|
||||
endif
|
||||
|
||||
function! ale_linters#sh#shell#GetExecutable(buffer)
|
||||
function! ale_linters#sh#shell#GetExecutable(buffer) abort
|
||||
let l:banglines = getbufline(a:buffer, 1)
|
||||
|
||||
" Take the shell executable from the hashbang, if we can.
|
||||
@@ -29,11 +29,11 @@ function! ale_linters#sh#shell#GetExecutable(buffer)
|
||||
return g:ale_linters_sh_shell_default_shell
|
||||
endfunction
|
||||
|
||||
function! ale_linters#sh#shell#GetCommand(buffer)
|
||||
function! ale_linters#sh#shell#GetCommand(buffer) abort
|
||||
return ale_linters#sh#shell#GetExecutable(a:buffer) . ' -n'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#sh#shell#Handle(buffer, lines)
|
||||
function! ale_linters#sh#shell#Handle(buffer, lines) abort
|
||||
" Matches patterns line the following:
|
||||
"
|
||||
" bash: line 13: syntax error near unexpected token `d'
|
||||
|
||||
Reference in new issue
Block a user