parameters: (input_api, output_api)
return_statement: return []
docstring: Checks to make sure no files in libbase.a have |@interface|.
docstring_summary: Checks to make sure no files in libbase.a have |
docstring_tokens: Checks to make sure no files in libbase . a have |
function: def _CheckNoInterfacesInBase(input_api, output_api):
    """Checks to make sure no files in libbase.a have |@interface|."""
    pattern = input_api.re.compile(r'^\s*@interface', input_api.re.MULTILINE)
    files = []
    for f in input_api.AffectedSourceFiles(input_api.FilterSourceFile):
      if (f.LocalPath().startswith('base/') and
          not f.LocalPath().endswith('_unittest.mm')):
        contents = input_api.ReadFile(f)
        if pattern.search(contents):
          files.append(f)
  
    if len(files):
      return [ output_api.PresubmitError(
          'Objective-C interfaces or categories are forbidden in libbase. ' +
          'See http://groups.google.com/a/chromium.org/group/chromium-dev/' +
          'browse_thread/thread/efb28c10435987fd',
          files) ]
    return []
function_tokens: def _CheckNoInterfacesInBase ( input_api , output_api ) : pattern = input_api . re . compile ( r'^\s*@interface' , input_api . re . MULTILINE ) files = [ ] for f in input_api . AffectedSourceFiles ( input_api . FilterSourceFile ) : if ( f . LocalPath ( ) . startswith ( 'base/' ) and not f . LocalPath ( ) . endswith ( '_unittest.mm' ) ) : contents = input_api . ReadFile ( f ) if pattern . search ( contents ) : files . append ( f ) if len ( files ) : return [ output_api . PresubmitError ( 'Objective-C interfaces or categories are forbidden in libbase. ' + 'See http://groups.google.com/a/chromium.org/group/chromium-dev/' + 'browse_thread/thread/efb28c10435987fd' , files ) ] return [ ]