From 051e387d0cd24c612207454cafbb5da4786a3ef5 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Sun, 24 May 2020 18:30:52 -0500 Subject: [PATCH] build: use hashicorp hclfmt We have been using fatih/hclfmt which is long abandoned. Instead, switch to HashiCorp's own hclfmt implementation. There are some trivial changes in behavior around whitespace. --- GNUmakefile | 2 +- command/assets/example-short.nomad | 2 +- command/assets/example.nomad | 2 +- dev/docker-clients/client.nomad | 2 +- e2e/consul/input/consul_example.nomad | 2 +- e2e/metrics/input/helloworld.nomad | 2 +- e2e/metrics/input/simpleweb.nomad | 2 +- e2e/prometheus/prometheus.nomad | 2 +- jobspec/test-fixtures/tg-scaling-policy.hcl | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 311faf6f0..2fcff3db6 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -173,7 +173,7 @@ deps: ## Install build and development dependencies GO111MODULE=on go get -u github.com/a8m/tree/cmd/tree GO111MODULE=on go get -u github.com/magiconair/vendorfmt/cmd/vendorfmt GO111MODULE=on go get -u gotest.tools/gotestsum - GO111MODULE=on go get -u github.com/fatih/hclfmt + GO111MODULE=on go get -u github.com/hashicorp/hcl/v2/cmd/hclfmt@v2.5.1 GO111MODULE=on go get -u github.com/golang/protobuf/protoc-gen-go@v1.3.4 GO111MODULE=on go get -u github.com/hashicorp/go-msgpack/codec/codecgen@v1.1.5 diff --git a/command/assets/example-short.nomad b/command/assets/example-short.nomad index ae3de97d3..d450ff7a1 100644 --- a/command/assets/example-short.nomad +++ b/command/assets/example-short.nomad @@ -19,7 +19,7 @@ job "example" { network { mbits = 10 - port "db" {} + port "db" {} } } } diff --git a/command/assets/example.nomad b/command/assets/example.nomad index 8f8d5fffa..f78dc356b 100644 --- a/command/assets/example.nomad +++ b/command/assets/example.nomad @@ -316,7 +316,7 @@ job "example" { network { mbits = 10 - port "db" {} + port "db" {} } } # The "service" stanza instructs Nomad to register this task as a service diff --git a/dev/docker-clients/client.nomad b/dev/docker-clients/client.nomad index 4689df775..37248bfce 100644 --- a/dev/docker-clients/client.nomad +++ b/dev/docker-clients/client.nomad @@ -23,7 +23,7 @@ job "client" { network { mbits = 10 - port "http"{} + port "http" {} } } diff --git a/e2e/consul/input/consul_example.nomad b/e2e/consul/input/consul_example.nomad index 6ca291752..9ae5ad2e8 100644 --- a/e2e/consul/input/consul_example.nomad +++ b/e2e/consul/input/consul_example.nomad @@ -54,7 +54,7 @@ job "consul-example" { network { mbits = 10 - port "db" {} + port "db" {} } } diff --git a/e2e/metrics/input/helloworld.nomad b/e2e/metrics/input/helloworld.nomad index 5dbbe0319..4dd7a98e9 100644 --- a/e2e/metrics/input/helloworld.nomad +++ b/e2e/metrics/input/helloworld.nomad @@ -28,7 +28,7 @@ job "helloworld" { network { mbits = 10 - port "web" {} + port "web" {} } } diff --git a/e2e/metrics/input/simpleweb.nomad b/e2e/metrics/input/simpleweb.nomad index 232f6bcad..878ba6362 100644 --- a/e2e/metrics/input/simpleweb.nomad +++ b/e2e/metrics/input/simpleweb.nomad @@ -25,7 +25,7 @@ job "simpleweb" { network { mbits = 1 - port "http"{} + port "http" {} } } diff --git a/e2e/prometheus/prometheus.nomad b/e2e/prometheus/prometheus.nomad index e2952ae2c..31749fa59 100644 --- a/e2e/prometheus/prometheus.nomad +++ b/e2e/prometheus/prometheus.nomad @@ -69,7 +69,7 @@ EOH resources { network { mbits = 10 - port "prometheus_ui"{} + port "prometheus_ui" {} } } diff --git a/jobspec/test-fixtures/tg-scaling-policy.hcl b/jobspec/test-fixtures/tg-scaling-policy.hcl index f4eca297d..b446f7f6a 100644 --- a/jobspec/test-fixtures/tg-scaling-policy.hcl +++ b/jobspec/test-fixtures/tg-scaling-policy.hcl @@ -9,7 +9,7 @@ job "elastic" { foo = "bar" b = true val = 5 - f = .1 + f =.1 } } }