def _V8PresubmitChecks(input_api, output_api): """Runs the V8 presubmit checks.""" import sys sys.path.append( input_api.os_path.join(input_api.PresubmitLocalPath(), 'tools')) from presubmit import CppLintProcessor from presubmit import SourceProcessor from presubmit import CheckRuntimeVsNativesNameClashes from presubmit import CheckExternalReferenceRegistration from presubmit import CheckAuthorizedAuthor results = [] if not CppLintProcessor().Run(input_api.PresubmitLocalPath()): results.append(output_api.PresubmitError("C++ lint check failed")) if not SourceProcessor().Run(input_api.PresubmitLocalPath()): results.append(output_api.PresubmitError( "Copyright header, trailing whitespaces and two empty lines " \ "between declarations check failed")) if not CheckRuntimeVsNativesNameClashes(input_api.PresubmitLocalPath()): results.append( output_api.PresubmitError( "Runtime/natives name clash check failed")) if not CheckExternalReferenceRegistration(input_api.PresubmitLocalPath()): results.append( output_api.PresubmitError( "External references registration check failed")) results.extend(CheckAuthorizedAuthor(input_api, output_api)) return results
def _V8PresubmitChecks(input_api, output_api): """Runs the V8 presubmit checks.""" import sys sys.path.append( input_api.os_path.join(input_api.PresubmitLocalPath(), 'tools')) from presubmit import CppLintProcessor from presubmit import SourceProcessor from presubmit import CheckAuthorizedAuthor from presubmit import CheckStatusFiles results = [] if not CppLintProcessor().Run(input_api.PresubmitLocalPath()): results.append(output_api.PresubmitError("C++ lint check failed")) if not SourceProcessor().Run(input_api.PresubmitLocalPath()): results.append(output_api.PresubmitError( "Copyright header, trailing whitespaces and two empty lines " \ "between declarations check failed")) if not CheckStatusFiles(input_api.PresubmitLocalPath()): results.append(output_api.PresubmitError("Status file check failed")) results.extend(CheckAuthorizedAuthor(input_api, output_api)) return results