numtide / treefmt

one CLI to format your repo
https://treefmt.com
MIT License
534 stars 32 forks source link

treefmt2 doesn't search for the project root anymore #308

Closed zimbatm closed 1 month ago

zimbatm commented 1 month ago

Describe the bug

When running treefmt in a sub-folder, it only formats that folder.

treefmt1 was walking up to find the treefmt.toml and then using that as the default TreeRoot variable. This was convenient because you can easily format the whole project from any place in the tree. And if you want to only format the current folder you can still run treefmt .

To Reproduce

Steps to reproduce the behavior:

  1. ...
  2. ...

Expected behavior

System information

Additional context