From 9c61d64a11439b217fb86cd966501a079cb8b7f7 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 24 Dec 2021 22:23:00 +0300 Subject: feat(depotfmt): add terraform formatting to depotfmt Change-Id: I235e7fcbd49f11e71127ce31da9c11da4d220ff6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4584 Autosubmit: tazjin Tested-by: BuildkiteCI Reviewed-by: grfn --- tools/depotfmt.nix | 5 +++++ 1 file changed, 5 insertions(+) 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 ''${@} \ -- cgit 1.4.1