Trailing Spaces In Auto-Generated Lock Files Break
The sudden rise of CI workflow lint failures - like the recent CI doctor run - reveals a quiet obsession with whitespace: trailing spaces in auto-generated .lock.yml files are tripping yamllint, even though these files are machine-made. This isn’t just a formatting quirk; it’s a symptom of how automation amplifies human oversight gaps. The root cause? yamllint flags invisible spaces as errors, and with hundreds of generated workflow files, minor inconsistencies snowball into blockers. The core context: YAML’s whitespace rules are strict, but auto-generated content often slips past checks, especially in comment-heavy sections like ASCII art headers. Consider this: a single space at the end of a line - like # ___ _ _ - triggers a failure, even though the rest is clean.
Psychologically, we trust code that looks neat, but this lint rule reveals a deeper tension: between clean code ideals and the messy reality of automated outputs. The cultural driver? Teams prioritize clean formatting, yet auto-generated files are rarely edited directly, making strict linting counterproductive. Here is the deal: trailing-spaces: disable in .yamllint.yml is the simplest fix - quietly letting valid workflows pass without manual tweaks.
But there is a catch: blocking domains like pypi.org were flagged in a parallel alert, so ensure network.allowed includes trusted sources. Updating .yamllint.yml to disable trailing spaces preserves workflow integrity without slowing CI.
Hidden truths: not all tools catch trailing spaces - some linters ignore comment lines. Also, lint-yaml scripts often include wildcard globs that hit generated files, making them prone to failure. Finally, this isn’t about laziness - it’s about systems designed for readability, not machine parsers.
The bottom line: when workflows generate their own files, respect the automation. Disable the lint rule for comments, not the code. How often do you trust a tool to read what you meant, not what it wrote?
Related insight: boxes, lines, and spacing matter - even in code that writes itself.