packer-cn/website/data
Wilken Rivera acabc1c1aa
Add packer fmt command (#10225)
* Add packer fmt command

This change adds a new command that allows users to format one or more
HCL2 Packer configuration template files.

Related to: #9174

* command/fmt: Add check flag

Packer's fmt command now supports a check flag that will output the name
of any file that would be changed by the HCL2 formatting engine. The
check flag is mutually exclusive with the write flag and will only check
if formatting is needed.

The update write flag will now overwrite the source files with the newly
formatted HCL2 source unless the `-write=false` or `-check` is passed at
the command line.

* Returns a diagnostic error if Format is unable to show a diff - equivalent to `terraform fmt`
* Updates testing to run against #Format and not the private methods of the HCL2Formatter; fixes ShowDiff test failure on Windows
* Updates comments for exported functions

* Add docs for fmt command
2020-11-11 11:49:39 -05:00
..
docs-navigation.js Add packer fmt command (#10225) 2020-11-11 11:49:39 -05:00
guides-navigation.js 📌 Hard Pin Website Dependencies (#9543) 2020-07-13 12:33:16 +02:00
intro-navigation.js Refactored to redirects instead of hard external links in side nav model 2020-06-09 13:58:33 -04:00
subnav.js 📌 Hard Pin Website Dependencies (#9543) 2020-07-13 12:33:16 +02:00
version.js cut version 1.6.5 2020-10-30 19:31:46 +00:00