
Fixing YAML Indentation Errors With a Linter and Editor
A messy file with nine findings, reported by yamllint line by line, then repaired with yq and a project config. The workflow that finds and fixes indentation.
Everything you need to level up your coding skills.

A messy file with nine findings, reported by yamllint line by line, then repaired with yq and a project config. The workflow that finds and fixes indentation.

One page of YAML syntax: scalars, quoting, collections, block strings, anchors, documents, comments and the values that change type. Copy-ready snippets.

The same 33 scalar values loaded by a 1.1 parser and a 1.2 parser: booleans, octal, base 60 and floats. Which libraries implement which, and how to stay safe.

Sort XML records by a key with XSLT or lxml so two exports of the same data produce the same file, including numeric keys and nested children.

Two branches each add a dependency to the same pom.xml and Git reports a conflict. See why, then use the union merge driver and a manual rule that works.

A feed renamed price to cost and the loader kept running with empty columns. A short script compares element path snapshots and reports the change.

A one-line XML file turns every change into one giant diff. Two ways to fix it, a textconv diff driver and a formatted file in the repo, with real output.

Make a line diff of two XML files show real changes only, by canonicalizing both sides, then use xmldiff when you need structural edit actions.

Three XML files with the same meaning gave three different checksums. Canonical XML (C14N) fixes attribute order and quoting, but not whitespace.

A feed health check that tests the fetch, status, content type, well-formedness, item count and freshness, run on eight scenarios with its output.

A feed with a raw ampersand, a missing id, a bad date, a duplicate id and an extra element: repair what is safe, quarantine the rest, report each reject.

Weather APIs return columns as parallel arrays. Turn them into rows with pandas and DuckDB, handle nulls and unequal lengths, and keep units and zones.
We send one email when a new article is published. No spam.