Make code more consistent
This commit is contained in:
parent
c9a5d9845b
commit
cab68cba25
@ -1,8 +1,7 @@
|
||||
" Author: Lucas Kolstad <lkolstad@uw.edu>
|
||||
" Description: gcc linter for asm files
|
||||
|
||||
let g:ale_asm_gcc_options =
|
||||
\ get(g:, 'ale_asm_gcc_options', '-Wall')
|
||||
let g:ale_asm_gcc_options = get(g:, 'ale_asm_gcc_options', '-Wall')
|
||||
|
||||
function! ale_linters#asm#gcc#GetCommand(buffer) abort
|
||||
return 'gcc -x assembler -fsyntax-only '
|
||||
|
@ -48,4 +48,3 @@ call ale#linter#Define('chef', {
|
||||
\ 'command_callback': 'ale_linters#chef#foodcritic#GetCommand',
|
||||
\ 'callback': 'ale_linters#chef#foodcritic#Handle',
|
||||
\})
|
||||
|
||||
|
@ -40,4 +40,5 @@ call ale#linter#Define('dockerfile', {
|
||||
\ 'name': 'hadolint',
|
||||
\ 'executable': 'hadolint',
|
||||
\ 'command': 'hadolint -',
|
||||
\ 'callback': 'ale_linters#dockerfile#hadolint#Handle' })
|
||||
\ 'callback': 'ale_linters#dockerfile#hadolint#Handle',
|
||||
\})
|
||||
|
@ -39,4 +39,5 @@ call ale#linter#Define('elixir', {
|
||||
\ 'name': 'credo',
|
||||
\ 'executable': 'mix',
|
||||
\ 'command': 'mix credo suggest --format=flycheck --read-from-stdin %s',
|
||||
\ 'callback': 'ale_linters#elixir#credo#Handle' })
|
||||
\ 'callback': 'ale_linters#elixir#credo#Handle',
|
||||
\})
|
||||
|
@ -18,8 +18,11 @@ function! ale_linters#go#gobuild#GetCommand(buffer, goenv_output) abort
|
||||
\ 'GOROOT': a:goenv_output[1],
|
||||
\}
|
||||
endif
|
||||
|
||||
" Run go test in local directory with relative path
|
||||
return 'GOPATH=' . s:go_env.GOPATH . ' cd ' . fnamemodify(bufname(a:buffer), ':.:h') . ' && go test -c -o /dev/null ./'
|
||||
return 'GOPATH=' . s:go_env.GOPATH
|
||||
\ . ' cd ' . fnamemodify(bufname(a:buffer), ':.:h')
|
||||
\ . ' && go test -c -o /dev/null ./'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#go#gobuild#Handler(buffer, lines) abort
|
||||
|
@ -27,7 +27,7 @@ endfunction
|
||||
function! ale_linters#handlebars#embertemplatelint#Handle(buffer, lines) abort
|
||||
if len(a:lines) == 0
|
||||
return []
|
||||
end
|
||||
endif
|
||||
|
||||
let l:output = []
|
||||
|
||||
|
@ -51,7 +51,7 @@ function! ale_linters#nim#nimcheck#Handle(buffer, lines) abort
|
||||
endfunction
|
||||
|
||||
|
||||
function! ale_linters#nim#nimcheck#GetCommand(buffer)
|
||||
function! ale_linters#nim#nimcheck#GetCommand(buffer) abort
|
||||
return 'nim check --path:' . fnameescape(fnamemodify(bufname(a:buffer), ':p:h')) . ' --threads:on --verbosity:0 --colors:off --listFullPaths %t'
|
||||
endfunction
|
||||
|
||||
|
@ -6,8 +6,7 @@ if !exists('g:merlin')
|
||||
endif
|
||||
|
||||
function! ale_linters#ocaml#merlin#Handle(buffer, lines) abort
|
||||
let l:errors = merlin#ErrorLocList()
|
||||
return l:errors
|
||||
return merlin#ErrorLocList()
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('ocaml', {
|
||||
@ -16,4 +15,3 @@ call ale#linter#Define('ocaml', {
|
||||
\ 'command': 'true',
|
||||
\ 'callback': 'ale_linters#ocaml#merlin#Handle',
|
||||
\})
|
||||
|
||||
|
@ -32,9 +32,9 @@ function! ale_linters#ruby#rubocop#Handle(buffer, lines) abort
|
||||
endfunction
|
||||
|
||||
function! ale_linters#ruby#rubocop#GetCommand(buffer) abort
|
||||
return 'rubocop --format emacs --force-exclusion ' .
|
||||
\ g:ale_ruby_rubocop_options .
|
||||
\ ' --stdin ' . bufname(a:buffer)
|
||||
return 'rubocop --format emacs --force-exclusion '
|
||||
\ . g:ale_ruby_rubocop_options
|
||||
\ . ' --stdin ' . bufname(a:buffer)
|
||||
endfunction
|
||||
|
||||
" Set this option to change Rubocop options.
|
||||
|
Loading…
Reference in New Issue
Block a user