summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-07-13 09:41:36 +0100
committerGitHub <noreply@github.com>2017-07-13 09:41:36 +0100
commitbc97735b6d8778add601e5e71ccbb99237da95eb (patch)
tree6ac1a2b6c87e98e953f7fbdd45994ab14ce061c2 /ale_linters
parent588595419739e3fec9cad921824e0e07aadb440d (diff)
parentdcbb0ffee536754df014085b03bf65cd2c21150f (diff)
downloadale-bc97735b6d8778add601e5e71ccbb99237da95eb.zip
Merge pull request #767 from elebow/rubocop-handle-empty-files-output
Rubocop: handle empty 'files' array in output
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/ruby/rubocop.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/ale_linters/ruby/rubocop.vim b/ale_linters/ruby/rubocop.vim
index 9d315be1..a539b1ae 100644
--- a/ale_linters/ruby/rubocop.vim
+++ b/ale_linters/ruby/rubocop.vim
@@ -28,6 +28,10 @@ function! ale_linters#ruby#rubocop#Handle(buffer, lines) abort
\}]
endtry
+ if l:errors['summary']['offense_count'] == 0 || empty(l:errors['files'])
+ return []
+ endif
+
let l:output = []
for l:error in l:errors['files'][0]['offenses']