-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add taploFmt
TOML format function to mkLib
#674
Conversation
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.
Hi @eureka-cpu thanks for the PR!
Although I haven't seen the broader Rust community standardize on a toml formatter, this is is pretty self contained so I'm open to including it!
The last thing we need to do before merging this is updating the API docs to document how taploFmt
works! You can adapt the existing docs for cargoFmt
since they're very similar
Thanks for the review! I'll have those changes up shortly (: |
…fix src files for toml-fmt checks
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.
Thanks again for the contribution!
Motivation
Closes #673
Hello, this change adds a function to
mkLib
for checking formatting of TOML files. TOML files are extremely common, especially among Rust projects, and I find that in all of my use cases ofcrane
between projects I am always manually adding checks for the formatting ofCargo.toml
files, and other files such asdeny.toml
,rust-toolchain.toml
,rustfmt.toml
and so on.I have a working copy of this on a local project, otherwise I wasn't sure how to add tests for it. I'm also sure that the copy-pasted code I took from
cargoFmt.nix
may include some things that don't belong, or may otherwise be going about it the wrong way. Regardless, this is what worked for me, please do instruct me on how to get this to a mergable state, I would greatly appreciate it!Checklist
docs/API.md
(or general documentation) with changesCHANGELOG.md