| Index: presubmit_support.py
|
| diff --git a/presubmit_support.py b/presubmit_support.py
|
| index 814d3fc37a0d812bbb2bc977293ffe61113eb6d8..e8981e0d75a8d5e326f4105ce8fe836b2578365e 100755
|
| --- a/presubmit_support.py
|
| +++ b/presubmit_support.py
|
| @@ -12,6 +12,7 @@ __version__ = '1.6.1'
|
| # caching (between all different invocations of presubmit scripts for a given
|
| # change). We should add it as our presubmit scripts start feeling slow.
|
|
|
| +import cpplint
|
| import cPickle # Exposed through the API.
|
| import cStringIO # Exposed through the API.
|
| import contextlib
|
| @@ -247,6 +248,7 @@ class InputApi(object):
|
| # so that presubmit scripts don't have to import them.
|
| self.basename = os.path.basename
|
| self.cPickle = cPickle
|
| + self.cpplint = cpplint
|
| self.cStringIO = cStringIO
|
| self.glob = glob.glob
|
| self.json = json
|
| @@ -283,6 +285,16 @@ class InputApi(object):
|
| fopen=file, os_path=self.os_path, glob=self.glob)
|
| self.verbose = verbose
|
|
|
| + # Replace <hash_map> and <hash_set> as headers that need to be included
|
| + # with "base/hash_tables.h" instead.
|
| + # Access to a protected member _XX of a client class
|
| + # pylint: disable=W0212
|
| + self.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
|
| + ]
|
| +
|
| def PresubmitLocalPath(self):
|
| """Returns the local path of the presubmit script currently being run.
|
|
|
|
|