casey / just

🤖 Just a command runner
https://just.systems
Creative Commons Zero v1.0 Universal
20.74k stars 454 forks source link

`just --fmt`: allow passing files to format #1760

Open katexochen opened 9 months ago

katexochen commented 9 months ago

Common linter integrations like treefmt pass the files that should be formatted as arguments to a formatter. Would be great if just could support this for easy integration with such tools.

casey commented 9 months ago

Can this be done by passing --justfile?

katexochen commented 9 months ago

Yes, it is possible to use the --justfile flag, thanks.

katexochen commented 9 months ago

Thinking about include files, this will be not enough as it currently can't handle multiple files. treefmt has a specification on what is required by the interface of a formatter, I think this is also applicable to other environments like bazel etc.