Beispiel #1
0
def RunChecks(input_api, output_api):  # pylint: disable=unused-argument
  results = []
  from tracing_build import check_gypi
  err = check_gypi.GypiCheck()
  if err:
    results += [err]
  return map(output_api.PresubmitError, results)
Beispiel #2
0
def _CheckChange(input_api, output_api):
  results = []

  original_sys_path = sys.path
  try:
    sys.path += [input_api.PresubmitLocalPath()]
    from tracing_build import check_gypi
    error = check_gypi.GypiCheck()
    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