Lines Matching refs:input_api
63 def _V8PresubmitChecks(input_api, output_api): argument
66 sys.path.append(input_api.os_path.join(
67 input_api.PresubmitLocalPath(), 'tools'))
75 if not CppLintProcessor().Run(input_api.PresubmitLocalPath()):
77 if not SourceProcessor().Run(input_api.PresubmitLocalPath()):
81 if not CheckExternalReferenceRegistration(input_api.PresubmitLocalPath()):
84 if not CheckStatusFiles(input_api.PresubmitLocalPath()):
86 results.extend(CheckAuthorizedAuthor(input_api, output_api))
90 def _CheckUnwantedDependencies(input_api, output_api): argument
100 sys.path = sys.path + [input_api.os_path.join(
101 input_api.PresubmitLocalPath(), 'buildtools', 'checkdeps')]
110 for f in input_api.AffectedFiles():
117 deps_checker = checkdeps.DepsChecker(input_api.PresubmitLocalPath())
143 def _CheckNoInlineHeaderIncludesInNormalHeaders(input_api, output_api): argument
148 include_directive_pattern = input_api.re.compile(r'#include ".+-inl.h"')
156 input_api.DEFAULT_BLACK_LIST)
157 return input_api.FilterSourceFile(
163 for f in input_api.AffectedSourceFiles(FilterFile):
176 def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api): argument
188 inclusion_pattern = input_api.re.compile(r'(%s)\s*\(' % base_function_pattern)
189 comment_pattern = input_api.re.compile(r'//.*(%s)' % base_function_pattern)
190 exclusion_pattern = input_api.re.compile(
197 input_api.DEFAULT_BLACK_LIST)
198 return input_api.FilterSourceFile(
204 for f in input_api.AffectedSourceFiles(FilterFile):
219 def _CommonChecks(input_api, output_api): argument
222 results.extend(input_api.canned_checks.CheckOwners(
223 input_api, output_api, source_file_filter=None))
224 results.extend(input_api.canned_checks.CheckPatchFormatted(
225 input_api, output_api))
226 results.extend(_V8PresubmitChecks(input_api, output_api))
227 results.extend(_CheckUnwantedDependencies(input_api, output_api))
229 _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api))
231 _CheckNoInlineHeaderIncludesInNormalHeaders(input_api, output_api))
235 def _SkipTreeCheck(input_api, output_api): argument
239 if not input_api.AffectedSourceFiles(
242 return input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip'
245 def _CheckChangeLogFlag(input_api, output_api, warn): argument
248 if (input_api.change.BUG and input_api.change.BUG != 'none' and
249 not 'LOG' in input_api.change.tags):
260 def CheckChangeOnUpload(input_api, output_api): argument
262 results.extend(_CommonChecks(input_api, output_api))
263 results.extend(_CheckChangeLogFlag(input_api, output_api, True))
267 def CheckChangeOnCommit(input_api, output_api): argument
269 results.extend(_CommonChecks(input_api, output_api))
270 results.extend(_CheckChangeLogFlag(input_api, output_api, False))
271 results.extend(input_api.canned_checks.CheckChangeHasDescription(
272 input_api, output_api))
273 if not _SkipTreeCheck(input_api, output_api):
274 results.extend(input_api.canned_checks.CheckTreeIsOpen(
275 input_api, output_api,