diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index b18e18f4e8..96bd094c22 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -26,6 +26,17 @@ DEFAULT_LINT_FILTERS = [ '-whitespace/braces', ] +# These filters will always be removed, even if the caller specifies a filter +# set, as they are problematic or broken in some way. +# +# Justifications for each filter: +# - build/c++11 : Rvalue ref checks are unreliable (false positives), +# include file and feature blacklists are +# google3-specific. +BLACKLIST_LINT_FILTERS = [ + '-build/c++11', +] + ### Description checks def CheckChangeHasTestField(input_api, output_api): @@ -120,6 +131,7 @@ def CheckChangeLintsClean(input_api, output_api, source_file_filter=None, cpplint._cpplint_state.ResetErrorCounts() lint_filters = lint_filters or DEFAULT_LINT_FILTERS + lint_filters.extend(BLACKLIST_LINT_FILTERS) cpplint._SetFilters(','.join(lint_filters)) # We currently are more strict with normal code than unit tests; 4 and 5 are diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py index 8f52a9ffd3..5457170b8a 100755 --- a/tests/presubmit_unittest.py +++ b/tests/presubmit_unittest.py @@ -1867,6 +1867,7 @@ class CannedChecksUnittest(PresubmitTestsBase): self.mox.ReplayAll() members = [ 'DEFAULT_LINT_FILTERS', + 'BLACKLIST_LINT_FILTERS', 'CheckBuildbotPendingBuilds', 'CheckChangeHasBugField', 'CheckChangeHasDescription', 'CheckChangeHasNoStrayWhitespace',