From c43746545c4cdc4a04e32a198d971f34dca88f20 Mon Sep 17 00:00:00 2001 From: Seth Flynn Date: Mon, 3 Feb 2025 05:18:34 -0500 Subject: ci: add hclfmt and tflint checks --- flake/ci.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'flake') diff --git a/flake/ci.nix b/flake/ci.nix index e8a1373..30cbd06 100644 --- a/flake/ci.nix +++ b/flake/ci.nix @@ -8,7 +8,8 @@ { perSystem = - { pkgs, ... }: + { config, pkgs, ... }: + { quickChecks = { actionlint = { @@ -21,6 +22,11 @@ script = "deadnix --fail ${self}"; }; + hclfmt = { + dependencies = [ pkgs.hclfmt ]; + script = "hclfmt -require-no-change ${self}/terraform/*.tf"; + }; + just = { dependencies = [ pkgs.just ]; script = '' @@ -39,6 +45,17 @@ dependencies = [ pkgs.statix ]; script = "statix check ${self}"; }; + + tflint = { + dependencies = [ pkgs.tflint ]; + script = '' + tflint --chdir=${self}/terraform --format=sarif |& tee $out || true + ''; + }; + }; + + legacyPackages = { + tflint = config.quickChecks.tflint.package; }; }; -- cgit v1.2.3