Closed zimbatm closed 1 year ago
Should it not bail by default if a configured formatter is not available? IMHO it would be more intuitive and is what I falsely believed was the case until recently.
I agree, defaulting to an error is better in this case. We could have a flag that gives the current behaviour: --allow-missing-formatter
for example?
Ok, you convinced me. Anybody wants to send a PR?
I have some time this week, I'll take a stab at it
Is your feature request related to a problem? Please describe.
Right now treefmt ignores commands if it cannot find the related executable. This allows developers to partially format the code tree even if they don't have all the dependencies installed.
The issue is that in CI, we want to be notified if a tool is missing.
Describe the solution you'd like
Either add a new
--fail-on-missing-command
flag, or change the behaviour of treefmt when--fail-on-change
is enabled.Describe alternatives you've considered
N/A
Additional context
Some internal repo: https://github.com/numtide/blended/issues/288