mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-25 04:16:50 +08:00
Make it possible to override awk --lint option (#4114)
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>
This commit is contained in:
@@ -7,19 +7,19 @@ After:
|
||||
Execute(The default command should be correct):
|
||||
AssertLinter 'gawk',
|
||||
\ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
|
||||
\ . ' -f %t --lint /dev/null'
|
||||
\ . ' --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 }')
|
||||
\ . ' -f %t --lint /dev/null'
|
||||
\ . ' --lint -f %t /dev/null'
|
||||
|
||||
Execute(The options should be configurable):
|
||||
let b:ale_awk_gawk_executable = 'gawk'
|
||||
let b:ale_awk_gawk_options = '--something'
|
||||
let b:ale_awk_gawk_options = '--lint=no-ext'
|
||||
|
||||
AssertLinter 'gawk',
|
||||
\ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
|
||||
\ . ' --something -f %t --lint /dev/null'
|
||||
\ . ' --lint --lint=no-ext -f %t /dev/null'
|
||||
|
||||
Reference in New Issue
Block a user