summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-02-10 09:20:45 +0000
committerGitHub <noreply@github.com>2017-02-10 09:20:45 +0000
commit5bda8271437dd24e4af52580b3e0fe236c2bbd95 (patch)
treed65e31a96c7e2d57cbc0f373b1c8035aa74b4165
parent5de445c041432b602c590a175809d89837cdf2b8 (diff)
parentd3e7d3d5e794dbce9802733a2bcc25e01f82b92b (diff)
downloadale-5bda8271437dd24e4af52580b3e0fe236c2bbd95.zip
Merge pull request #327 from jparise/credo-stdin-filename
Pass the buffer's filename to Credo
-rw-r--r--ale_linters/elixir/credo.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/ale_linters/elixir/credo.vim b/ale_linters/elixir/credo.vim
index f79106d9..4eb5e4d0 100644
--- a/ale_linters/elixir/credo.vim
+++ b/ale_linters/elixir/credo.vim
@@ -3,8 +3,8 @@
function! ale_linters#elixir#credo#Handle(buffer, lines) abort
" Matches patterns line the following:
"
- " stdin:19: F: Pipe chain should start with a raw value.
- let l:pattern = '\v^stdin:(\d+):?(\d+)?: (.): (.+)$'
+ " lib/filename.ex:19:7: F: Pipe chain should start with a raw value.
+ let l:pattern = '\v^.+:(\d+):?(\d+)?: (.): (.+)$'
let l:output = []
for l:line in a:lines
@@ -41,5 +41,5 @@ endfunction
call ale#linter#Define('elixir', {
\ 'name': 'credo',
\ 'executable': 'mix',
- \ 'command': 'mix credo suggest --format=flycheck --read-from-stdin',
+ \ 'command': 'mix credo suggest --format=flycheck --read-from-stdin %s',
\ 'callback': 'ale_linters#elixir#credo#Handle' })