fluidattacks / makes

A software supply chain framework powered by Nix.
https://makes.fluidattacks.com/
MIT License
419 stars 41 forks source link

`numtide/treefmt` #586

Open blaggacao opened 2 years ago

blaggacao commented 2 years ago

zimbatm has finally gotten around to do https://github.com/numtide/treefmt

This is a standardized code formatter that should work uniformly and in parallel around many code formatters out there and work smoothly (enough) with editors, written in rust.

I think makes would benefit a great deal embracing this project, because of rust-like concurrency, but most of all, because of easy editor integration, rust-speed file walker (bash & nix afaik are slow) and a reasonably simple configuration format.

kamadorueda commented 2 years ago

we currently run each linter/formatter on a different job, on a different machine on CI,

image

this have some benefits:

and some trade-offs:


for the last part, I don't remember the last time I had to run a formatter locally, it's embedded in my editor: https://github.com/kamadorueda/machine/blob/main/src/config/system/userActivationScripts/vscode/default.nix#L26 linters are there too

kamadorueda commented 2 years ago

just to clarify, I'm not saying not 😁 we are open to community contributions for this

blaggacao commented 2 years ago

I'm predicting to hit this again somewhere around the next two weeks for more thorough design considerations :smile: