summaryrefslogtreecommitdiff
path: root/ale_linters/awk
diff options
context:
space:
mode:
authorBarnabás Ágoston <agostonbarna@users.noreply.github.com>2022-03-20 14:52:22 +0100
committerGitHub <noreply@github.com>2022-03-20 13:52:22 +0000
commit5c7019f394588bdc29d7573f5063198c2803dfe4 (patch)
tree34ba90590da7975f283917a072b442f0a0de5737 /ale_linters/awk
parentc42fee3da52eda8d63946918fdc1060d8c0b0b62 (diff)
downloadale-5c7019f394588bdc29d7573f5063198c2803dfe4.zip
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>
Diffstat (limited to 'ale_linters/awk')
-rw-r--r--ale_linters/awk/gawk.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/ale_linters/awk/gawk.vim b/ale_linters/awk/gawk.vim
index f795c57d..fe961ae3 100644
--- a/ale_linters/awk/gawk.vim
+++ b/ale_linters/awk/gawk.vim
@@ -9,8 +9,9 @@ function! ale_linters#awk#gawk#GetCommand(buffer) abort
" gawk from attempting to execute the body of the script
" it is linting.
return '%e --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
+ \ . ' --lint'
\ . ale#Pad(ale#Var(a:buffer, 'awk_gawk_options'))
- \ . ' -f %t --lint /dev/null'
+ \ . ' -f %t /dev/null'
endfunction
call ale#linter#Define('awk', {