Skip to content

Commit

Permalink
Filtering out "too mary errors emitted" diags
Browse files Browse the repository at this point in the history
Because they're completely useless and incredibly annoying.
  • Loading branch information
Valloric committed Nov 25, 2013
1 parent 0185147 commit b085ca7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/ycm/completers/cpp/clang_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
MIN_LINES_IN_FILE_TO_PARSE ) )
NO_DIAGNOSTIC_MESSAGE = 'No diagnostic for current line!'
PRAGMA_DIAG_TEXT_TO_IGNORE = '#pragma once in main file'
TOO_MANY_ERRORS_DIAG_TEXT_TO_IGNORE = 'too many errors emitted, stopping now'


class ClangCompleter( Completer ):
Expand Down Expand Up @@ -293,6 +294,11 @@ def _FilterDiagnostics( diagnostics ):
#
# See our issue #216 and upstream bug:
# http://llvm.org/bugs/show_bug.cgi?id=16686
return [ x for x in diagnostics if x.text_ != PRAGMA_DIAG_TEXT_TO_IGNORE ]
#
# The second thing we want to filter out are those incredibly annoying "too
# many errors emitted" diagnostics that are utterly useless.
return [ x for x in diagnostics if
x.text_ != PRAGMA_DIAG_TEXT_TO_IGNORE and
x.text_ != TOO_MANY_ERRORS_DIAG_TEXT_TO_IGNORE ]


0 comments on commit b085ca7

Please sign in to comment.