mirror of
https://github.com/dense-analysis/ale
synced 2024-12-28 00:52:20 +00:00
5c7019f394
Currently, it's not possible to override the awk `--lint` option with ```viml let g:ale_awk_gawk_options = '--lint=no-ext' ``` although this could be useful for those who only use gawk and don't want to get these lint errors: > FEATURE X is a gawk extension The idea is to move the default `--lint` option before the `awk_gawk_options` in the gawk.vim code to give the custom `--lint=...` option a higher precedence. Co-authored-by: Barnabás Ágoston <barna@agoston.dev>
26 lines
837 B
Plaintext
26 lines
837 B
Plaintext
Before:
|
|
call ale#assert#SetUpLinterTest('awk', 'gawk')
|
|
|
|
After:
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
Execute(The default command should be correct):
|
|
AssertLinter 'gawk',
|
|
\ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
|
|
\ . ' --lint -f %t /dev/null'
|
|
|
|
Execute(The executable should be configurable):
|
|
let b:ale_awk_gawk_executable = '/other/gawk'
|
|
|
|
AssertLinter '/other/gawk',
|
|
\ ale#Escape('/other/gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
|
|
\ . ' --lint -f %t /dev/null'
|
|
|
|
Execute(The options should be configurable):
|
|
let b:ale_awk_gawk_executable = 'gawk'
|
|
let b:ale_awk_gawk_options = '--lint=no-ext'
|
|
|
|
AssertLinter 'gawk',
|
|
\ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
|
|
\ . ' --lint --lint=no-ext -f %t /dev/null'
|