diff options
author | Vincent Ambo <mail@tazj.in> | 2021-12-24T19·23+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2021-12-24T19·25+0000 |
commit | 9c61d64a11439b217fb86cd966501a079cb8b7f7 (patch) | |
tree | 03b1a00fa099faec86a174a3860bf9596e28cc6b /tools | |
parent | 21b2055eb14ddaf7893f0a0a53b2a145b2f0e230 (diff) |
feat(depotfmt): add terraform formatting to depotfmt r/3370
Change-Id: I235e7fcbd49f11e71127ce31da9c11da4d220ff6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4584 Autosubmit: tazjin <mail@tazj.in> Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depotfmt.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/depotfmt.nix b/tools/depotfmt.nix index 097bc29b4595..8a721492037e 100644 --- a/tools/depotfmt.nix +++ b/tools/depotfmt.nix @@ -8,6 +8,11 @@ let command = "${pkgs.go}/bin/gofmt" options = [ "-w" ] includes = ["*.go"] + + [formatter.tf] + command = "${pkgs.terraform}/bin/terraform" + options = [ "fmt" ] + includes = [ "*.tf" ] ''; in pkgs.writeShellScriptBin "depotfmt" '' exec ${pkgs.treefmt}/bin/treefmt ''${@} \ |