about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-24T19·23+0300
committerclbot <clbot@tvl.fyi>2021-12-24T19·25+0000
commit9c61d64a11439b217fb86cd966501a079cb8b7f7 (patch)
tree03b1a00fa099faec86a174a3860bf9596e28cc6b /tools
parent21b2055eb14ddaf7893f0a0a53b2a145b2f0e230 (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.nix5
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 ''${@} \