-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Please add nomad fmt
command
#11757
Comments
Hi @nahsi and thanks for raising this request. I believe this addition would be very useful! |
Hi @jrasell @mikenomitch is the |
@jrasell I'm not entirely sure but I guess this should involve using |
Hey @rounakdatta, yeah I think just using If you base the implementation off of Packer's code, that could be a really good starting point if you'd like to contribute. @danishprakash, I think anything that relies on TF is going to be a no-go from our perspective. While we of course love TF, we don't want that as a hard dependency for Nomad. |
@mikenomitch you're right, I think I thought we could do something similar to how we do it in terraform-ls for the formatting even from the client but I now realize, as the name suggests, |
Alright @mikenomitch , I've started looking into Packer's implementation. It's clear, and I think I'll be able to make some progress tonight/tomorrow. @danishprakash I was willing to try my first Nomad contribution through this issue 🙂 |
Sure @rounakdatta, please feel free to take this up! |
@rounakdatta Are you working on this ? |
The hclfmt used to trip up if you have inline I have started using the example: template = <<EOF
#!/bin/bash
MY_VAR=${MY_VAR:-"0"}
...
...
EOF
}
|
Hello, if there is nobody working on that right now, I would like to implement the My idea is to implement it like here in hclfmt. Do we have any requirements how the input should be passed?
|
Hey @Trojan295, thanks so much for taking this! This will make a lot of people happy. I think if you try to roughly match terraform's fmt command that would be ideal. So if you have no argument (just I don't think it is necessary to add the EDIT: If there's further discussion to be had on this interface, lets have it on the PR. Should be cleaner than on this issue. :) |
PR is open on this and likely to merge for an early Nomad 1.4.x. I'll track this issue until that's been merged. Thanks, all! |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Please provide command
fmt
to format nomad jobs analogous toterraform fmt
andpacker fmt
.Right now I'm using
hclfmt
from hcl repo.To install it I use this command
go install github.com/hashicorp/hcl/v2/cmd/hclfmt@latest
.The text was updated successfully, but these errors were encountered: