feat: format the current directory by default#252
feat: format the current directory by default#252zimbatm wants to merge 1 commit intoNixOS:masterfrom
Conversation
The common case is to format folders, not stdin. This changes the default to format the current directory, and introduces a `--stdin` flag for users that want to wrap `nixfmt` into editors and other tools. See also NixOS/nix#11438
|
It looks like you're unaware of #240, where we deprecated directory recursing in favor of treefmt taking care of that. I'm not yet 100% sure on the interactions with your PRs 🤔 |
|
Indeed. With that direction in mind, I think we can drop this PR 👍 |
imagine spawning millions of processes instead of one 😍 |
|
Please save your snark for elsewhere. Nixfmt of course still accepts passing multiple files via CLI arguments, as is common practice in such applications. It is up to the caller to do the right thing. |
|
Well said @piegamesde, thanks Also, last time I touched treefmt, it only used a single process per 1024 files. It went through a rewrite by now, so I'm not sure if that's still the case, but if it's not that sounds like something to fix. |
|
Okay, thanks |
The common case is to format folders, not stdin.
This changes the default to format the current directory, and introduces
a
--stdinflag for users that want to wrapnixfmtinto editors andother tools.
See also NixOS/nix#11438