Fix `fmt` for `.tfquery.hcl` files

Formatting support for these files was still gated behind an
experimental flag. This PR removes the flag and enables query file
formatting by default.
pull/38403/head
Daniel Banck 1 month ago committed by Daniel Banck
parent b4c5234c98
commit 7554bda28e

@ -32,6 +32,7 @@ var (
".tfvars",
".tftest.hcl",
".tfmock.hcl",
".tfquery.hcl",
}
)
@ -52,10 +53,6 @@ func (c *FmtCommand) Run(args []string) int {
c.input = os.Stdin
}
if c.Meta.AllowExperimentalFeatures {
fmtSupportedExts = append(fmtSupportedExts, ".tfquery.hcl")
}
args = c.Meta.process(args)
cmdFlags := c.Meta.defaultFlagSet("fmt")
cmdFlags.BoolVar(&c.list, "list", true, "list")

@ -186,9 +186,8 @@ func TestFmt_QueryFiles(t *testing.T) {
ui := cli.NewMockUi()
c := &FmtCommand{
Meta: Meta{
testingOverrides: metaOverridesForProvider(testProvider()),
Ui: ui,
AllowExperimentalFeatures: true,
testingOverrides: metaOverridesForProvider(testProvider()),
Ui: ui,
},
}
args := []string{gotFile}

Loading…
Cancel
Save