chore(tools/depotfmt): remove terraform fmt

This adds almost a gigabyte of closure size for formatting files that almost
never change.

I'll look into building just the formatter somehow, but it's not a very high
priority task.

Change-Id: Ib0f841e1a98133381c5ae154e2a57df8af52dc1f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12293
Tested-by: BuildkiteCI
Reviewed-by: emery <emery@dmz.rs>
Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
Vincent Ambo 2024-08-23 17:51:00 +03:00 committed by clbot
parent 6c31d72000
commit 3530841a13

View file

@ -3,22 +3,12 @@
{ pkgs, ... }: { pkgs, ... }:
let let
# terraform fmt can't handle multiple paths at once, but treefmt
# expects this
terraformat = pkgs.writeShellScript "terraformat" ''
echo "$@" | xargs -n1 ${pkgs.terraform}/bin/terraform fmt
'';
config = pkgs.writeText "depot-treefmt-config" '' config = pkgs.writeText "depot-treefmt-config" ''
[formatter.go] [formatter.go]
command = "${pkgs.go}/bin/gofmt" command = "${pkgs.go}/bin/gofmt"
options = [ "-w" ] options = [ "-w" ]
includes = ["*.go"] includes = ["*.go"]
[formatter.tf]
command = "${terraformat}"
includes = [ "*.tf" ]
[formatter.nix] [formatter.nix]
command = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" command = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"
includes = [ "*.nix" ] includes = [ "*.nix" ]