def fixBuildPath(file_path):
    replaceLines(file_path, functools.partial(fixBuildLine, file_path))
    error_messages = []
    if ((not isBuildFixerExcludedFile(file_path)) and (not isApiFile(file_path)) and (not isSkylarkFile(file_path)) and (not isWorkspaceFile(file_path))):
        if (os.system(('%s %s %s' % (ENVOY_BUILD_FIXER_PATH, file_path, file_path))) != 0):
            error_messages += [('envoy_build_fixer rewrite failed for file: %s' % file_path)]
    if (os.system(('%s -mode=fix %s' % (BUILDIFIER_PATH, file_path))) != 0):
        error_messages += [('buildifier rewrite failed for file: %s' % file_path)]
    return error_messages
def fixBuildPath(file_path):
    replaceLines(file_path, functools.partial(fixBuildLine, file_path))
    error_messages = []
    if ((not isBuildFixerExcludedFile(file_path)) and (not isApiFile(file_path)) and (not isSkylarkFile(file_path)) and (not isWorkspaceFile(file_path))):
        if (os.system(('%s %s %s' % (ENVOY_BUILD_FIXER_PATH, file_path, file_path))) != 0):
            error_messages += [('envoy_build_fixer rewrite failed for file: %s' % file_path)]
    if (os.system(('%s -mode=fix %s' % (BUILDIFIER_PATH, file_path))) != 0):
        error_messages += [('buildifier rewrite failed for file: %s' % file_path)]
    return error_messages