Skip to content

Commit

Permalink
feat: add terragrunt_hclfmt formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
reegnz committed Jan 24, 2024
1 parent 3d59cbd commit b98de82
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lua/conform/formatters/terragrunt_hclfmt.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://terragrunt.gruntwork.io/docs/reference/cli-options/#hclfmt",
description = "Format hcl files into a canonical format.",
},
command = "terragrunt",
args = { "hclfmt", "--terragrunt-hclfmt-file", "$FILENAME" },
stdin = false,
condition = function(self, ctx)
return vim.fs.basename(ctx.filename) ~= "terragrunt.hcl"
end,
}

0 comments on commit b98de82

Please sign in to comment.