Commit aed892eb authored by danakj@chromium.org's avatar danakj@chromium.org

Teach cpplint include-what-you-use about chromium hash_set and hash_map.

For hash_map and hash_set, we should include "base/hashtables.h", not
the <hash_set> or <hash_map> standard headers.

R=maruel@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/14139002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194047 0039d316-1c4b-4281-b951-d872f2087c98
parent fd79e0d2
......@@ -114,6 +114,14 @@ def CheckChangeLintsClean(input_api, output_api, source_file_filter=None):
'-readability/casting,-runtime/int,-runtime/virtual,'
'-whitespace/braces')
# Replace <hash_map> and <hash_set> as headers that need to be included
# with "base/hash_tables.h" instead.
cpplint._re_pattern_templates = [
(a, b, 'base/hash_tables.h')
if header in ('<hash_map>', '<hash_set>') else (a, b, header)
for (a, b, header) in cpplint._re_pattern_templates
]
# We currently are more strict with normal code than unit tests; 4 and 5 are
# the verbosity level that would normally be passed to cpplint.py through
# --verbose=#. Hopefully, in the future, we can be more verbose.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment