Pass input via stdin and filename as arg to clj-kondo (#4315)

This allows using linters like `:namespace-name-mismatch`.

This replaces: https://github.com/dense-analysis/ale/pull/4109
This commit is contained in:
Christoph Frick 2022-09-22 00:24:01 +02:00 committed by GitHub
parent e73f0f5cb3
commit a56d51ec1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -8,7 +8,8 @@ function! ale_linters#clojure#clj_kondo#GetCommand(buffer) abort
let l:command = 'clj-kondo'
\ . ale#Pad(l:options)
\ . ' --lint %t'
\ . ' --lint -'
\ . ' --filename %s'
return l:command
endfunction

View File

@ -6,10 +6,10 @@ After:
Execute(The default command should be correct):
AssertLinter 'clj-kondo', 'clj-kondo'
\ . ' --cache --lint %t'
\ . ' --cache --lint - --filename %s'
Execute(Extra options should be supported):
let g:ale_clojure_clj_kondo_options = '--config ./clj-kondo/config.edn'
AssertLinter 'clj-kondo', 'clj-kondo'
\ . ' --config ./clj-kondo/config.edn --lint %t'
\ . ' --config ./clj-kondo/config.edn --lint - --filename %s'