Some formatting tools* do not support piping (stdin->stdout). One solution is to create a formatter that saves the content string to a temporary file, run the formatting tool and read back the temporary file.
This effectively applies to all existing formatters (e.g. the tool could be in docker, wsl etc), but there doesn't seem to be a good common abstraction.
*e.g. ludtwig, Twig-CS-Fixer, PHP-CS-Fixer
Some formatting tools* do not support piping (stdin->stdout). One solution is to create a formatter that saves the content string to a temporary file, run the formatting tool and read back the temporary file.
This effectively applies to all existing formatters (e.g. the tool could be in docker, wsl etc), but there doesn't seem to be a good common abstraction.
*e.g. ludtwig, Twig-CS-Fixer, PHP-CS-Fixer