def checkBuildPath(file_path):
    error_messages = []
    if ((not isBuildFixerExcludedFile(file_path)) and (not isApiFile(file_path)) and (not isSkylarkFile(file_path)) and (not isWorkspaceFile(file_path))):
        command = ('%s %s | diff %s -' % (ENVOY_BUILD_FIXER_PATH, file_path, file_path))
        error_messages += executeCommand(command, 'envoy_build_fixer check failed', file_path)
    if (isBuildFile(file_path) and (file_path.startswith((args.api_prefix + 'envoy')) or file_path.startswith((args.api_shadow_prefix + 'envoy')))):
        found = False
        for line in readLines(file_path):
            if ('api_proto_package(' in line):
                found = True
                break
        if (not found):
            error_messages += ['API build file does not provide api_proto_package()']
    command = ('%s -mode=diff %s' % (BUILDIFIER_PATH, file_path))
    error_messages += executeCommand(command, 'buildifier check failed', file_path)
    error_messages += checkFileContents(file_path, checkBuildLine)
    return error_messages
def checkBuildPath(file_path):
    error_messages = []
    if ((not isBuildFixerExcludedFile(file_path)) and (not isApiFile(file_path)) and (not isSkylarkFile(file_path)) and (not isWorkspaceFile(file_path))):
        command = ('%s %s | diff %s -' % (ENVOY_BUILD_FIXER_PATH, file_path, file_path))
        error_messages += executeCommand(command, 'envoy_build_fixer check failed', file_path)
    if (isBuildFile(file_path) and (file_path.startswith((args.api_prefix + 'envoy')) or file_path.startswith((args.api_shadow_prefix + 'envoy')))):
        found = False
        for line in readLines(file_path):
            if ('api_proto_package(' in line):
                found = True
                break
        if (not found):
            error_messages += ['API build file does not provide api_proto_package()']
    command = ('%s -mode=diff %s' % (BUILDIFIER_PATH, file_path))
    error_messages += executeCommand(command, 'buildifier check failed', file_path)
    error_messages += checkFileContents(file_path, checkBuildLine)
    return error_messages