-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format Rust, Nix and Bash via treefmt #47
Conversation
Can we add a .git-blame-ignore-revs which helps clean up |
Maintenance status of the repo is a little concerning. We might be able to get close to the same format with these options on https://github.com/mvdan/sh
|
Ohh I looked at your shfmt suggestion, I thought it was https://github.com/patrickvane/shfmt, which when compared to beautysh looked more concerning. Didn't know that https://github.com/mvdan/sh provides shfmt nowadays, switching to that now!
Turns out at least the tabs vs spaces is nicely handled without extra config because it adheres to our .editorconfig. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
treefmt-nix
is pretty cool.
lib.fileset.toSource { | ||
root = ./.; | ||
fileset = lib.fileset.gitTracked ./.; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look at that dogfooding!
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs | ||
|
||
# Reformatted all Nix files | ||
81d712a6c4e020bf545fb931b3106aff64871962 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
81d712a6c4e020bf545fb931b3106aff64871962 | ||
|
||
# Reformatted all Bash scripts | ||
b1306dd5ae96b0fb934256d91708733c1f850016 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prompted by #46 (comment) (cc @willbush). I didn't use a bash formatter, but https://github.com/lovesegfault/beautysh seems to almost match what I've been doing!
For Nix formatting we obviously use https://github.com/NixOS/nixfmt :)