Repository navigation
feat(builtins): add packer fmt formatter - #1708
Conversation
Add a `packer_fmt` builtin that formats Packer HCL2 templates (`*.pkr.hcl`) and variable files (`*.pkrvars.hcl`) with `packer fmt`. `check` runs `packer fmt -check`, `check_diff` builds a patch from `packer fmt -` via `hk util format-diff`, and `fix` rewrites files in place. `hk init` suggests the builtin when the project contains `*.pkr.hcl` files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters: 1
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
[Medium impact] The PR appears safe to merge, with the previous test-coverage finding addressed. SummaryAdds
No new actionable issues were found in the changes since the previous review. Reviews (2) · Last reviewed commit: "test(builtins): cover multiple files in ..." · Reviewed by Greptile |
Add a
packer_fmtbuiltin that formats Packer HCL2 templates (*.pkr.hcl) and variable files (*.pkrvars.hcl) withpacker fmt.checkrunspacker fmt -check,check_diffbuilds a patch frompacker fmt -viahk util format-diff, andfixrewrites files in place.hk initsuggests the builtin when the project contains*.pkr.hclfiles.Summary by CodeRabbit
hk initwith a Packer template nested underimages/, verifying successful initialization, thepacker_fmtreport, and its entry inhk.pkl.