-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
Description
What feature do you want to see added?
I learnt about hclfmt which checks and formats HCL files.
I'd like to add it in a validation step in the pipeline, but unfortunatelly the original repo is archived since 2018: https://github.com/fatih/hclfmt
I found that this code is also now living in https://github.com/hashicorp/hcl/blob/main/cmd/hclfmt/main.go, but didn't find ay corresponding release asset.
I compiled and used it locally with success against docker bake files:
$ hclfmt -check -w docker-bake.hcl
My question is: how could I integrate it in our repos?
Other similar tools are using docker images wrapped in scripts, ex: https://github.com/jenkinsci/docker/blob/master/tools/hadolint
Should I...
- Create a docker image based on https://github.com/hashicorp/hcl/blob/main/cmd/hclfmt/main.go
- Build https://github.com/hashicorp/hcl/blob/main/cmd/hclfmt/main.go on the fly? (Would require proper go tooling in agents, and would be a bit wasteful)
- Simply include my built version in the repo?
- Find another alternative?
- Give up?
Upstream changes
No response
Are you interested in contributing this feature?
Yes.