Documentation
¶
Overview ¶
Command diffcheck is the toolkit's side of `./walle compare differential` (L.4): it runs the toolkit's List and cfndiff's FullDiff and Format on the cases toolkit-lib's driver runs, and writes what they report in the driver's form.
Run it from the repository root:
go run ./internal/tools/diffcheck inventory <assembly dir>... # the stacks the cases are made from go run ./internal/tools/diffcheck < cases.json # the toolkit's result for each case
inventory prints one JSON object, keyed by assembly directory: each stack, those in nested assemblies included, with its artifact ID, hierarchical ID, display name and template file, or the error loading the assembly.
Without arguments it reads a JSON array of cases on standard input and writes one JSON result per line, in the cases' order, as the driver in cmd/walle/internal/differential/js does; package differential describes both.
- A selection case lists the assembly with the case's selector and gives the IDs List returns, in order, or the failing error's code, where toolkit-lib gives its error's name.
- A diff case diffs two template files with cfndiff.FullDiff and gives the model, normalized, and the text cfndiff.Format writes, without colour, or cfndiff.FormatSecurity with the case's security option.
Both sides accept an assembly whose manifest still lists missing context, as actioncheck does, and the driver does with failOnMissingContext off. An error without a code, which toolkit-lib's errors all have, is named "(no code)".