[vim] fix golangci-lint in ALE and set it to remote
This commit is contained in:
parent
28266990bf
commit
b8904f6cb3
2 changed files with 26 additions and 2 deletions
22
bin/.local/bin/golangci-lintw
Executable file
22
bin/.local/bin/golangci-lintw
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
#set fish_trace 1
|
||||
|
||||
set file $argv[-1]
|
||||
#golangci-lint $argv[1..-2] | sed -n "/$file/,+2p"
|
||||
|
||||
set capture false
|
||||
|
||||
golangci-lint $argv[1..-2] | while read --local --line line
|
||||
if string match --quiet --regex '^.+:[0-9]+:' $line
|
||||
if test $file = (string match --regex '[^:]+' $line)
|
||||
set capture true
|
||||
else
|
||||
set capture false
|
||||
end
|
||||
end
|
||||
|
||||
if test $capture = true
|
||||
echo $line
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue