summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-20 12:57:41 +0100
committerw0rp <devw0rp@gmail.com>2017-05-20 12:57:41 +0100
commitd012fd1f09c4ffb89130110fa37d4e10fb1c9b6b (patch)
treed7e7886c82941de65cb8c0b7f5e4d1ae63d5480a
parent0646b2861f2d41c694ad83c072255802d75ec705 (diff)
downloadale-d012fd1f09c4ffb89130110fa37d4e10fb1c9b6b.zip
Revert "Fix #556 Remove duplicate error messages from clang++"
This reverts commit 164c4efb323f77e27942a824bd84fae91eb16db4.
-rw-r--r--autoload/ale/handlers/gcc.vim9
-rw-r--r--test/handler/test_gcc_handler.vader26
2 files changed, 2 insertions, 33 deletions
diff --git a/autoload/ale/handlers/gcc.vim b/autoload/ale/handlers/gcc.vim
index 09a1848d..eb42b27a 100644
--- a/autoload/ale/handlers/gcc.vim
+++ b/autoload/ale/handlers/gcc.vim
@@ -99,17 +99,12 @@ function! ale#handlers#gcc#HandleGCCFormat(buffer, lines) abort
continue
endif
- let l:obj = {
+ call add(l:output, {
\ '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
diff --git a/test/handler/test_gcc_handler.vader b/test/handler/test_gcc_handler.vader
index 2934bbee..72b7c541 100644
--- a/test/handler/test_gcc_handler.vader
+++ b/test/handler/test_gcc_handler.vader
@@ -94,29 +94,3 @@ Execute(The GCC handler shouldn't complain about #pragma once for headers):
\ ale#handlers#gcc#HandleGCCFormat(347, [
\ '<stdin>:1:1: warning: #pragma once in main file [enabled by default]',
\ ])
-
-Execute(The GCC handler should eliminate duplicated clang errors):
- AssertEqual
- \ [
- \ {'lnum': 2, 'col': 10, 'type': 'E', 'text': '''a.h'' file not found'},
- \ {'lnum': 4, 'col': 10, 'type': 'E', 'text': 'empty filename'},
- \ ],
- \ ale#handlers#gcc#HandleGCCFormat(347, [
- \ '<stdin>:2:10: fatal error: ''a.h'' file not found',
- \ '#include "a.h"',
- \ ' ^~~~~',
- \ '',
- \ '<stdin>:2:10: fatal error: ''a.h'' file not found',
- \ '#include "a.h"',
- \ ' ^~~~~',
- \ '',
- \ '<stdin>:4:10: error: empty filename',
- \ '',
- \ '<stdin>:4:10: error: empty filename',
- \ '#include ""',
- \ ' ^',
- \ '',
- \ '<stdin>:4:10: error: empty filename',
- \ '#include ""',
- \ ' ^',
- \ ])