tools/metrics/histograms/PRESUBMIT.py
def GetValidateHistogramsError(input_api, output_api, cwd, results):
  """Validates histograms format and index file."""
  exit_code = input_api.subprocess.call(
      [input_api.python_executable, 'validate_format.py'], cwd=cwd)

  if exit_code != 0:
    error_msg = (
        'Histograms are not well-formatted; please run %s/validate_format.py '
        'and fix the reported errors.' % cwd)
    results.append(output_api.PresubmitError(error_msg))

  exit_code = input_api.subprocess.call(
      [input_api.python_executable, 'validate_histograms_index.py'], cwd=cwd)

  if exit_code != 0:
    error_msg = (
        'Histograms index file is not up-to-date. Please run '
        '%s/histogram_paths.py to update it' % cwd)
    results.append(output_api.PresubmitError(error_msg))
Validates histograms format and index file.
Validates histograms format and index file.
Validates histograms format and index file .
def GetValidateHistogramsError(input_api, output_api, cwd, results):
  exit_code = input_api.subprocess.call(
      [input_api.python_executable, 'validate_format.py'], cwd=cwd)
  if exit_code != 0:
    error_msg = (
        'Histograms are not well-formatted; please run %s/validate_format.py '
        'and fix the reported errors.' % cwd)
    results.append(output_api.PresubmitError(error_msg))
  exit_code = input_api.subprocess.call(
      [input_api.python_executable, 'validate_histograms_index.py'], cwd=cwd)
  if exit_code != 0:
    error_msg = (
        'Histograms index file is not up-to-date. Please run '
        '%s/histogram_paths.py to update it' % cwd)
    results.append(output_api.PresubmitError(error_msg))
def GetValidateHistogramsError ( input_api , output_api , cwd , results ) : exit_code = input_api . subprocess . call ( [ input_api . python_executable , 'validate_format.py' ] , cwd = cwd ) if exit_code != 0 : error_msg = ( 'Histograms are not well-formatted; please run %s/validate_format.py ' 'and fix the reported errors.' % cwd ) results . append ( output_api . PresubmitError ( error_msg ) ) exit_code = input_api . subprocess . call ( [ input_api . python_executable , 'validate_histograms_index.py' ] , cwd = cwd ) if exit_code != 0 : error_msg = ( 'Histograms index file is not up-to-date. Please run ' '%s/histogram_paths.py to update it' % cwd ) results . append ( output_api . PresubmitError ( error_msg ) )
Validates histograms format and index file.
Validates histograms format and index file .
"""Validates histograms format and index file."""
input_api
output_api
cwd
results