在一个混合语言的仓库中运行一个格式化计划,并使用 treefmt 保持生成的编辑是可预测的
Use treefmt when an agent needs one repo-level formatting plan across multiple languages instead of stitching formatter commands together ad hoc.
Prerequisites
treefmt, the underlying language formatters you plan to invoke, a repository-level treefmt configuration file, and shell access.
Installation
Basic usage or getting-started notes:
- What if that single command would handle all the formatters in parallel? And only format files that have changed since the previous run?
- When formatters are run in a script, they process all the files they encounter, regardless of whether or not
- You can install treefmt by downloading the binary. Find the binaries for different architectures here.
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/numtide/treefmt/HEAD/README.md
Documentation
- https://treefmt.com/latest/