ios/PRESUBMIT.py
def _CheckBugInToDo(input_api, output_api):
  """ Checks whether TODOs in ios code are identified by a bug number."""
  errors = []
  for f in input_api.AffectedFiles():
    for line_num, line in f.ChangedContents():
      if _HasToDoWithNoBug(input_api, line):
        errors.append('%s:%s' % (f.LocalPath(), line_num))
  if not errors:
    return []

  plural_suffix = '' if len(errors) == 1 else 's'
  error_message = '\n'.join([
      'Found TO''DO%(plural)s without bug number%(plural)s (expected format is '
      '\"TO''DO(crbug.com/######)\":' % {'plural': plural_suffix}
  ] + errors) + '\n'

  return [output_api.PresubmitError(error_message)]
 Checks whether TODOs in ios code are identified by a bug number.
Checks whether TODOs in ios code are identified by a bug number.
Checks whether TODOs in ios code are identified by a bug number .
def _CheckBugInToDo(input_api, output_api):
  errors = []
  for f in input_api.AffectedFiles():
    for line_num, line in f.ChangedContents():
      if _HasToDoWithNoBug(input_api, line):
        errors.append('%s:%s' % (f.LocalPath(), line_num))
  if not errors:
    return []
  plural_suffix = '' if len(errors) == 1 else 's'
  error_message = '\n'.join([
      'Found TO''DO%(plural)s without bug number%(plural)s (expected format is '
      '\"TO''DO(crbug.com/######)\":' % {'plural': plural_suffix}
  ] + errors) + '\n'
  return [output_api.PresubmitError(error_message)]
def _CheckBugInToDo ( input_api , output_api ) : errors = [ ] for f in input_api . AffectedFiles ( ) : for line_num , line in f . ChangedContents ( ) : if _HasToDoWithNoBug ( input_api , line ) : errors . append ( '%s:%s' % ( f . LocalPath ( ) , line_num ) ) if not errors : return [ ] plural_suffix = '' if len ( errors ) == 1 else 's' error_message = '\n' . join ( [ 'Found TO' 'DO%(plural)s without bug number%(plural)s (expected format is ' '\"TO' 'DO(crbug.com/######)\":' % { 'plural' : plural_suffix } ] + errors ) + '\n' return [ output_api . PresubmitError ( error_message ) ]
Checks whether TODOs in ios code are identified by a bug number.
Checks whether TODOs in ios code are identified by a bug number .
""" Checks whether TODOs in ios code are identified by a bug number."""
input_api
output_api