def METHOD_NAME(rootdir, limit):
    """Create a temporary config with ColumnLimit set to 80."""
    cpp_file = os.path.join(rootdir, "src/main.cpp")
    proc = subprocess.run(
        ["clang-format", "--dump-config", cpp_file],
        capture_output=True,
        text=True,
    )
    proc.check_returncode()
    return re.sub(
        r"(ColumnLimit:\s*)\d+", r"\g<1>{}".format(limit), proc.stdout
    )