summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-17 10:10:25 +0100
committerw0rp <devw0rp@gmail.com>2017-05-17 10:10:25 +0100
commit164c4efb323f77e27942a824bd84fae91eb16db4 (patch)
tree777fd50029eba9e2414e857dc14c61da7a255b75 /autoload
parent5790df12722a31e913750fad955f2a4f0ed76269 (diff)
downloadale-164c4efb323f77e27942a824bd84fae91eb16db4.zip
Fix #556 Remove duplicate error messages from clang++
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers/gcc.vim9
1 files changed, 7 insertions, 2 deletions
diff --git a/autoload/ale/handlers/gcc.vim b/autoload/ale/handlers/gcc.vim
index eb42b27a..09a1848d 100644
--- a/autoload/ale/handlers/gcc.vim
+++ b/autoload/ale/handlers/gcc.vim
@@ -99,12 +99,17 @@ function! ale#handlers#gcc#HandleGCCFormat(buffer, lines) abort
continue
endif
- call add(l:output, {
+ let l:obj = {
\ 'lnum': l:match[2] + 0,
\ 'col': l:match[3] + 0,
\ 'type': l:match[4] =~# 'error' ? 'E' : 'W',
\ 'text': s:RemoveUnicodeQuotes(l:match[5]),
- \})
+ \}
+
+ " clang++ and some other tools can output duplicated errors.
+ if empty(l:output) || l:output[-1] != l:obj
+ call add(l:output, l:obj)
+ endif
endif
endfor