Exemple #1
0
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
Exemple #2
0
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 CheckGeneratedRuntimeTests
    from presubmit import CheckExternalReferenceRegistration

    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 CheckGeneratedRuntimeTests(input_api.PresubmitLocalPath()):
        results.append(
            output_api.PresubmitError("Generated runtime tests check failed"))
    if not CheckExternalReferenceRegistration(input_api.PresubmitLocalPath()):
        results.append(
            output_api.PresubmitError(
                "External references registration check failed"))
    return results
Exemple #3
0
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 StatusFilesProcessor

    def FilterFile(affected_file):
        return input_api.FilterSourceFile(affected_file,
                                          white_list=None,
                                          black_list=_NO_LINT_PATHS)

    results = []
    if not CppLintProcessor().RunOnFiles(
            input_api.AffectedFiles(file_filter=FilterFile,
                                    include_deletes=False)):
        results.append(output_api.PresubmitError("C++ lint check failed"))
    if not SourceProcessor().RunOnFiles(
            input_api.AffectedFiles(include_deletes=False)):
        results.append(output_api.PresubmitError(
            "Copyright header, trailing whitespaces and two empty lines " \
            "between declarations check failed"))
    if not StatusFilesProcessor().RunOnFiles(
            input_api.AffectedFiles(include_deletes=True)):
        results.append(output_api.PresubmitError("Status file check failed"))
    results.extend(
        input_api.canned_checks.CheckAuthorizedAuthor(
            input_api,
            output_api,
            bot_whitelist=[
                '*****@*****.**'
            ]))
    return results
Exemple #4
0
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

    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 and trailing whitespaces check failed"))
    return results
Exemple #5
0
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