def _CheckChange(input_api, output_api): results = [] original_sys_path = sys.path try: sys.path += [input_api.PresubmitLocalPath()] from tracing_build import check_gni error = check_gni.GniCheck() if error: results.append(output_api.PresubmitError(error)) finally: sys.path = original_sys_path black_list = input_api.DEFAULT_BLACK_LIST + (".*_pb2.py$", ) results += input_api.RunTests( input_api.canned_checks.GetPylint( input_api, output_api, extra_paths_list=_GetPathsToPrepend(input_api), pylintrc='../pylintrc', black_list=black_list)) results += _CheckRegisteredMetrics(input_api, output_api) results += _CheckRegisteredDiagnostics(input_api, output_api) results += _WarnOnReservedInfosChanges(input_api, output_api) results += _CheckProtoNamespace(input_api, output_api) return results
def _CheckChange(input_api, output_api): results = [] original_sys_path = sys.path try: sys.path += [input_api.PresubmitLocalPath()] from tracing_build import check_gni error = check_gni.GniCheck() if error: results.append(output_api.PresubmitError(error)) finally: sys.path = original_sys_path results += input_api.RunTests( input_api.canned_checks.GetPylint( input_api, output_api, extra_paths_list=_GetPathsToPrepend(input_api), pylintrc='../pylintrc')) results += _CheckRegisteredMetrics(input_api, output_api) results += _CheckRegisteredDiagnostics(input_api, output_api) return results